CLI Reference
The CodeBroker CLI is a powerful tool for indexing, querying, and managing semantic graphs of your repositories.
codebroker init
Initializes the semantic graph database configuration in the current directory.
Usage
bash
Example
codebroker init --template node
✓ Initialized .codebroker.json
codebroker index
Builds or updates the semantic graph by parsing all tracked files.
Usage
bash
Example
codebroker index --workers 8
✓ Graph built successfully in 1.4s
codebroker validate
Checks graph integrity and reports on missing references or unresolved dependencies.
Usage
bash
Example
codebroker validate
Graph Integrity: 100%
codebroker query
Semantically searches the graph and returns exact relevant symbols.
Usage
bash
Example
codebroker query "authentication flow"
Found 3 entrypoints matching 'authentication flow'.
codebroker mcp
Starts the Model Context Protocol server for AI integration.
Usage
bash
Example
codebroker mcp --port 3000
Starting CodeBroker MCP Server on port 3000...