CLI reference
The codemarrow command indexes a project and answers questions about it from the command line — for scripts and CI — or serves the same tools to an MCP client.
Usage#
usage
codemarrow index [--project dir]codemarrow tools [--json]codemarrow call <tool> [json-args] [--project dir] [--no-index]codemarrow mcp [--project dir] [--no-index]index#
Index the project (incrementally) and print a JSON summary.
shell
codemarrow index --project ~/src/my-apptools#
List every tool with its description. With --json, print each tool’s full input schema.
shell
codemarrow tools --jsoncall#
Run one tool and print its JSON result. Arguments are a JSON object; the index is brought up to date first unless you pass --no-index.
shell
codemarrow call find_symbol '{"query":"login"}'codemarrow call impact '{"id":42,"depth":4}' --no-indexA real result, from CodeMarrow indexing its own repository (trimmed to one caller):
codemarrow call get_callers '{"id":676}'
{ "symbol": { "id": 676, "name": "*Indexer.Run", "kind": "function", "file": "internal/index/index.go", "line": 239 }, "callers": [ { "symbol_id": 40, "symbol": "openIndex", "file": "cmd/codemarrow/main.go", "line": 146, "code": "ix.Run", "kind": "call", "confidence": "ambiguous" } ]}See the tools reference for every tool’s arguments.
mcp#
Serve every tool over MCP on stdin/stdout. See connecting an agent.
shell
codemarrow mcp --project .Flags#
--project dir— the project directory. Defaults to the current directory.--no-index— use the existing index as it is, without updating it first.--json— withtools, print full tool schemas as JSON.