CLI¶
Install the opentraceai command-line tool to index repositories and run an MCP server from your terminal.
Prerequisites¶
- Python 3.12+
uvrecommended — makesuvxand isolated installs trivial. See theuvinstall guide.
Install¶
Run OpenTrace without installing it globally — uvx downloads and caches it on first use.
Best for: kicking the tires, or using it from a CI job.
Install globally in an isolated environment managed by uv. Re-running the command upgrades it in place.
Best for: daily use from any shell. This is the recommended permanent install.
Install into your current Python environment (ideally a venv).
Best for: an environment you already manage with pip.
Optional extras¶
A plain install already includes everything doc ingestion and cluster
detection need — markitdown[all] for PDF/DOCX/PPTX/XLSX/HTML/EPUB conversion,
networkx for clustering and the graph exporters, and the provider SDKs. There
is no graph extra to add.
Audio and video transcription is not supported: no audio extension is walked, so those files are never ingested.
| Extra | What it pulls in | Required for |
|---|---|---|
graph-leiden |
graspologic (Python < 3.13) |
The Leiden community detection algorithm. Without it, opentraceai cluster falls back to Louvain — slightly different output, not broken |
summarization |
optimum[onnxruntime], transformers |
Local code summarization via opentraceai augment |
If you run a feature that needs an extra you skipped, the CLI errors out with an actionable hint pointing at the right install command.
Using It¶
The package installs as opentraceai, but the CLI binary is opentrace (shorter alias — opentraceai also works).
opentrace index /path/to/repo # index a code repo
opentrace index /path/to/repo --wiki # also ingest docs into a labelled corpus
opentrace index /path/docs foo --wiki # index docs into a vault named foo
opentrace vault ingest /path/docs # docs-only: no repo required
opentrace vault list # vaults visible from current project
opentrace cluster && opentrace analyze # graph clustering + cross-cutting analysis
opentrace mcp # start an MCP server over stdio
opentrace --help # see all commands
The graph is stored at .opentrace/index.db at the repo root. Every opentrace command walks up from your current directory to find it, so you can run commands from any subdirectory.
What Next¶
- Index a repo end-to-end → Indexing
- Compile a wiki vault → Wiki & Vaults
- Connect an MCP client? → MCP Server
- Run it inside Claude Code? → Claude Code Plugin (installs the CLI automatically)
- Something not working? → Troubleshooting
- See what the graph exposes → Graph Tools