Gabb CLI
Gabb is a Rust CLI that builds a local code index so editors and AI coding assistants can answer questions like "where is this implemented?" without shipping your sources to a remote service. It includes an indexing daemon that stays in sync with filesystem changes.
Status
- Indexes TypeScript/TSX, Rust, and Kotlin, storing results in a local SQLite database
- Commands:
gabb daemon start/stop/restart/status,gabb symbols,gabb symbol,gabb implementation,gabb usages,gabb definition,gabb duplicates,gabb mcp-server - Outputs: symbol definitions, relationships (implements/extends), and references
- MCP server for AI assistant integration (Claude Desktop, Claude Code)
Quickstart
# 1) Build (or install) the CLI
# 2) Start the daemon in background from your project root
# 3) Query the index
The daemon will crawl your workspace, index all supported files, and keep the SQLite database up to date as files change. Use -v/-vv to increase logging.
Query commands (symbols, usages, etc.) will auto-start the daemon if it's not running.
Installation
- Prerequisite: Rust toolchain (Edition 2024). Install via rustup.
- Install locally from source:
- Or build without installing:
Usage
Flags:
--root: workspace to index (defaults to current directory)--db: SQLite database path (defaults to.gabb/index.db)--rebuild: delete any existing DB at--dband perform a full reindex before watching-v,-vv: increase log verbosity Symbols command filters:--file: only show symbols from a given file path--kind: filter by kind (function,class,interface,method,struct,enum,trait)--limit: cap the number of rows returned Implementation command:- Identify the symbol via
--fileand--line/--characteror embed the position as--file path:line:char - Finds implementations via recorded edges (implements/extends/trait impl/overrides); falls back to same-name matches
Usages command:
- Identify the symbol under the cursor (same options as above)
- Lists recorded references from the index; if none are present (e.g., cross-file Rust calls not yet linked), falls back to a best-effort name scan across all indexed files in the workspace root
- Skips matches that overlap the symbol’s own definition span
Symbol command:
- Look up symbols by exact name (optional file/kind filters)
- Shows definition location (line/col), qualifier, visibility, container, incoming/outgoing edges, and recorded references for each match
What gets indexed:
- Files:
*.ts,*.tsx,*.rs,*.kt,*.kts - Data stored: symbols (functions, classes, interfaces, methods, etc.), relationships (implements/extends), references
- Storage: SQLite with WAL enabled for safe concurrent reads
MCP Server (AI Assistant Integration)
Gabb includes an MCP (Model Context Protocol) server that exposes code indexing tools to AI assistants like Claude. This allows Claude to search symbols, find definitions, usages, and implementations in your codebase.
Available Tools
| Tool | Description |
|---|---|
gabb_symbols |
List or search symbols in the codebase |
gabb_symbol |
Get detailed information about a symbol by name |
gabb_definition |
Go to definition for a symbol at a source position |
gabb_usages |
Find all usages/references of a symbol |
gabb_implementations |
Find implementations of an interface, trait, or abstract class |
gabb_daemon_status |
Check the status of the gabb indexing daemon |
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Replace /path/to/your/project with your workspace path. The MCP server will auto-start the daemon if needed.
Claude Code Configuration
Add the following to your Claude Code MCP settings:
Using --root . means gabb will use the current working directory as the workspace root.
Project Layout
src/main.rs: CLI entrypoint and logging setupsrc/daemon.rs: filesystem watcher and incremental indexing loopsrc/indexer.rs: full/index-one routines and workspace traversalsrc/languages/: language parsers (TypeScript, Rust, Kotlin) built on tree-sittersrc/store.rs: SQLite-backed index storesrc/mcp.rs: MCP server implementation for AI assistant integrationARCHITECTURE.md: deeper design notes
Development
- Format and lint:
cargo fmt && cargo clippy --all-targets --all-features - Tests:
cargo test - Docs:
cargo doc --open
Roadmap
- Additional commands (find implementations/usages) backed by the stored relationships
- More languages by swapping in new tree-sitter grammars
- Richer queries (duplicates, unused code) atop the same index
Contributing
Issues and PRs are welcome. Please:
- Keep commits focused and prefer Conventional Commits (
feat: ...,fix: ...) - Add or update tests when changing indexing behavior
- Run
cargo fmt,cargo clippy, andcargo testbefore submitting