All your knowledge. One search. AI-ready.
Index your code, docs, notes, and wikis locally.
Let AI assistants search everything you know.
or cargo install kdex ยท more options
SQLite FTS5 gives sub-millisecond full-text search across all your indexed content.
MCP server for GitHub Copilot, Claude Desktop, and Ollama integration.
Code repos, Obsidian vaults, markdown wikis, any text-based knowledge.
Your data stays on your machine. Works offline. No cloud dependencies.
Add GitHub repos by URL. Auto-cloned, auto-synced, always up-to-date.
Export/import your setup. One command to replicate on any machine.
Works with your favorite AI tools via MCP:
cargo install kdex
kdex index ~/code/my-project kdex add --remote owner/repo # Index a GitHub repo
kdex "authentication" # Just type your query!
kdex mcp # Start MCP server for AI assistants
curl -sSf https://urbanisierung.github.io/kdex/install.sh | sh
Downloads the latest binary to ~/.local/bin. No Rust required. To update, re-run the same command.
cargo install kdex
git clone https://github.com/urbanisierung/kdex.git cd kdex cargo install --path .
Download from GitHub Releases for Linux, macOS, and Windows.
Launch the full-screen interactive interface:
kdex
| Key | Action |
|---|---|
Tab | Switch between Search and Repos views |
? | Toggle help overlay |
Ctrl+Q | Quit application |
โ/โ | Navigate results or browse search history |
Enter | Select / Open file |
Esc | Clear search / Go back |
Ctrl+P | Toggle preview panel |
Ctrl+O | Open file in editor |
Search indexed content (default command โ just type your query!)
kdex "your query" kdex search "pattern" --repo my-project --file-type rust kdex "auth" --fuzzy --limit 20
| Flag | Short | Description |
|---|---|---|
--repo | -r | Filter by repository name |
--file-type | -t | Filter by file type (rust, markdown, python...) |
--limit | -l | Maximum results (default: 10) |
--semantic | -s | Use semantic (vector) search |
--hybrid | -H | Combine lexical + semantic search |
--fuzzy | Typo-tolerant fuzzy matching | |
--regex | Regular expression search | |
--group-by-repo | -g | Cluster results by repository |
Add and index a local directory
kdex index /path/to/project kdex index . --name "my-docs"
| Flag | Description |
|---|---|
--name | Custom name for the repository |
Add a remote GitHub repository
kdex add --remote owner/repo kdex add --remote https://github.com/owner/repo.git --branch develop kdex add --remote owner/repo --shallow
| Flag | Description |
|---|---|
--remote | GitHub repo (owner/repo or full URL) |
--branch | Branch to clone (default: main) |
--name | Custom repository name |
--shallow | Shallow clone (faster, less disk) |
List all indexed repositories
kdex list kdex list --json
Remove a repository from the index
kdex remove my-project
Sync remote repositories
kdex sync # Sync all remote repos kdex sync owner/repo # Sync specific repo
Show index statistics
kdex stats
Export knowledge graph
kdex graph > knowledge.dot # DOT format for Graphviz kdex graph --json > graph.json # JSON format
Check index health (orphans, broken links)
kdex health
Find files linking to a target
kdex backlinks my-note
List all tags from indexed markdown
kdex tags
Build AI context from search results
kdex context "authentication" --tokens 4000 --format markdown
| Flag | Description |
|---|---|
--tokens | Max token limit (default: 8000) |
--format | Output format: markdown, text, json |
Start MCP server for AI assistants
kdex mcp
Automatically configure MCP for AI tools
kdex add-mcp copilot # Configure GitHub Copilot CLI kdex add-mcp gemini # Configure Gemini CLI kdex add-mcp claude # Configure Claude Desktop
Update kdex (script-based installs only)
kdex self-update
Manage configuration
kdex config show # Show current config kdex config export -o backup.yaml # Export to file kdex config import backup.yaml # Import from file
Generate shell completions
kdex completions bash >> ~/.bashrc kdex completions zsh >> ~/.zshrc kdex completions fish > ~/.config/fish/completions/kdex.fish
Connect kdex to AI assistants via the Model Context Protocol. Use kdex add-mcp <tool> to auto-configure, or manually add:
kdex add-mcp claude or add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"kdex": { "command": "kdex", "args": ["mcp"] }
}
}
kdex add-mcp copilot or add to ~/.config/github-copilot/mcp.json:
{
"mcpServers": {
"kdex": { "command": "kdex", "args": ["mcp"] }
}
}
kdex add-mcp gemini or add to ~/.gemini/settings.json:
{
"mcpServers": {
"kdex": { "command": "kdex", "args": ["mcp"], "timeout": 30000 }
}
}
Run kdex MCP server and configure Open WebUI to use it:
# Start kdex MCP server kdex mcp # Configure Open WebUI's MCP client to connect to kdex
| Tool | Description |
|---|---|
search | Search indexed content with query, limit, repo, file_type filters |
list_repos | List all indexed repositories with status and file counts |
get_file | Get full content of a file by path |
get_context | Get lines of context around a specific line number |
| Flag | Description |
|---|---|
--json | Output as JSON for scripting |
--quiet | Suppress non-error output |
--no-color | Disable colored output |
-v, --verbose | Enable verbose output |
--debug | Enable debug mode with backtraces |
kdex auto-detects knowledge vault types:
| Icon | Type | Detection |
|---|---|---|
| ๐ | Obsidian | .obsidian/ folder |
| ๐ | Logseq | logseq/ folder |
| ๐ณ | Dendron | dendron.yml file |
| ๐ | Generic | Default for all other repos |
Config file location: ~/.config/kdex/config.toml
# Example config.toml max_file_size_mb = 10 enable_semantic_search = true default_search_mode = "hybrid" strip_markdown_syntax = false index_code_blocks = true