Every one of the 14 MCP tools is directly accessible from the terminal — no agent, no MCP client, no JSON-RPC handshake required. CLI mode is ideal for CI/CD pipelines, shell scripts, quick one-off queries, and debugging the knowledge graph without opening an IDE.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DeusData/codebase-memory-mcp/llms.txt
Use this file to discover all available pages before exploring further.
CLI Syntax
Common Examples
The --raw Flag
By default, CLI output is formatted for human readability. Add --raw before the tool name to get unformatted JSON on stdout, suitable for piping to jq or other tools:
Management Commands
These top-level commands control the binary and agent configuration — they are separate from thecli subcommand and do not take JSON arguments.
Auto-Index Configuration
Enable automatic indexing so that new projects are indexed the moment an MCP session starts:auto_index is enabled, previously-indexed projects are also registered with the background watcher for ongoing git-based change detection, so the graph stays fresh without any manual re-indexing.
Use Cases
CI/CD Integration
Run
cli index_repository in your pipeline after checkout to pre-build the graph artifact. Combine with cli detect_changes to annotate pull requests with affected symbols.Shell Scripting
Use
--raw and jq to extract structured data — dead functions, import lists, route inventories — and pipe them into other tools or reports.Debugging
Reproduce unexpected agent behaviour by replaying the exact tool call from your terminal. Compare JSON output before and after reindexing to confirm the graph is correct.
All 14 Tools via CLI
Any tool that works over MCP works identically from the command line. Here is a quick reference:| Tool | Example JSON |
|---|---|
index_repository | {"repo_path": "/abs/path"} |
list_projects | {} |
delete_project | {"project": "my-repo"} |
index_status | {"project": "my-repo"} |
search_graph | {"name_pattern": ".*Auth.*", "label": "Class"} |
trace_path | {"function_name": "HandleRequest", "direction": "inbound"} |
detect_changes | {"project": "my-repo"} |
query_graph | {"query": "MATCH (f:Function) WHERE f.name =~ '.*Test.*' RETURN f.name"} |
get_graph_schema | {"project": "my-repo"} |
get_code_snippet | {"qualified_name": "my-repo.src.main.HandleRequest"} |
get_architecture | {"project": "my-repo"} |
search_code | {"pattern": "TODO", "project": "my-repo"} |
manage_adr | {"action": "list", "project": "my-repo"} |
ingest_traces | {"project": "my-repo", "traces": [...]} |
All paths passed to CLI tools must be absolute paths. Relative paths are not resolved against the current working directory.