cgx-cli-0.1.5 is not a library.
cgx-cli
Command-line interface for cgx — turn any Git repository into a queryable knowledge graph.
Installation
The binary is named cgx. If cgx --version prints command not found, add Cargo's bin directory to your shell PATH, then restart your terminal:
# zsh (~/.zshrc) or bash (~/.bashrc / ~/.bash_profile)
# fish (~/.config/fish/config.fish)
fish_add_path "$HOME/.cargo/bin"
Quick Start
# Index your repo
# Explore in terminal
# Explore in browser
# Find risky files
# Query the graph
# Export
# Publish to GitHub Pages
Commands
| Command | Description |
|---|---|
cgx analyze |
Index current repo into DuckDB graph |
cgx view |
Terminal TUI (Ratatui) |
cgx view --web |
Launch browser graph (WebGL) |
cgx serve |
HTTP API server for web UI |
cgx query |
Query subcommands: find, deps, blast-radius, chain, owners, search, community, dead-code |
cgx hotspots |
High churn × high coupling files |
cgx blame-graph |
Ownership by contributor |
cgx diff |
Architecture diff between commits |
cgx impact |
Downstream impact of recent changes |
cgx export |
JSON, Mermaid, DOT, SVG, GraphML |
cgx publish |
Push graph to GitHub Pages |
cgx setup |
Auto-configure MCP for Cursor, Claude Code, etc. |
cgx mcp |
Start MCP stdio server |
cgx doctor |
Run diagnostics |
cgx clean |
Remove indexed data |
cgx update |
Check for updates |
AI Chat
The browser UI includes a built-in chat panel powered by:
- OpenAI (GPT-4o-mini) — set
OPENAI_API_KEY - Anthropic (Claude Haiku) — set
ANTHROPIC_API_KEY,CGX_CHAT_PROVIDER=anthropic - Ollama (local) —
ollama pull codellama && cgx serve - Any OpenAI-compatible API — Together, Fireworks, Groq, etc.
License
MIT