codedb Skill
Use the codedb plugin for fast, structured code intelligence queries via the codedb CLI. It provides tree-sitter-based structural parsing, trigram-accelerated full-text search, O(1) inverted word index, and reverse dependency graphs.
Commands
codedb <resource> <action>— Execute codedb commandscodedb self version— Print codedb versioncodedb tree run— Show file tree with language and symbol countscodedb outline run— List all symbols in a file (functions, structs, imports, with line numbers)codedb find run— Find where a symbol is defined across the codebasecodedb search run— Full-text search (trigram-accelerated, case-insensitive)codedb search regex— Regex search across the codebasecodedb word run— O(1) exact word lookup via inverted indexcodedb hot run— Show recently modified filescodedb nuke run— Remove all codedb data, snapshots, and kill processescodedb _ _— Catch-all passthrough to codedb CLI (codedb ls, codedb git status, etc.)
Quick Start
1. Install
codedb --version
2. Explore a Codebase
Get the file tree:
dcli codedb tree run
Outline symbols in a specific file:
dcli codedb outline run --path src/main.zig
3. Find Symbols and Search
Find where a symbol is defined:
dcli codedb find run --name AgentRegistry
Full-text search (trigram-accelerated):
dcli codedb search run --query "handleAuth"
Regex search:
dcli codedb search regex --pattern "handle[A-Z]\w+"
Exact word lookup (O(1) inverted index):
dcli codedb word run --identifier Store
4. Recently Modified Files
dcli codedb hot run
5. Nuke Codedb Data
Remove all codedb data, snapshots, and kill processes:
dcli codedb nuke run
Agent Notes
- codedb CLI pays ~55ms process startup per invocation. For repeated queries, consider running
codedb serveas a long-running HTTP server on:7719instead. - Results are structured (JSON-like) rather than raw line dumps — significantly fewer tokens for AI agents.
- Sensitive files (.env, credentials, keys) are auto-excluded from indexing.
- Telemetry is on by default. Disable with
CODEDB_NO_TELEMETRY=1or--no-telemetry. - For passthrough of undocumented subcommands, use
dcli codedb _ _ <args...>(e.g.,dcli codedb _ _ -- --help).