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
codebroker init [flags]

Example

codebroker init --template node
✓ Initialized .codebroker.json

codebroker index

Builds or updates the semantic graph by parsing all tracked files.

Usage

bash
codebroker index [flags]

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
codebroker validate

Example

codebroker validate
Graph Integrity: 100%

codebroker query

Semantically searches the graph and returns exact relevant symbols.

Usage

bash
codebroker query "<search-term>"

Example

codebroker query "authentication flow"
Found 3 entrypoints matching 'authentication flow'.

codebroker mcp

Starts the Model Context Protocol server for AI integration.

Usage

bash
codebroker mcp [flags]

Example

codebroker mcp --port 3000
Starting CodeBroker MCP Server on port 3000...