exocore-cli
v2.0.1
Published
Persistent External Brain for AI Coding Assistants. Solves context amnesia via 3-pass extraction, graph topology, and MCP.
Maintainers
Readme
Exocore 🧠
A Persistent External Brain for AI Coding Assistants.
Exocore solves the "context amnesia" problem for LLMs and AI coding agents by compiling your entire codebase into a dense, highly compressed Knowledge Graph. It provides structural, semantic, and mathematical insights into your architecture and exposes them via an MCP (Model Context Protocol) server.
Instead of pasting thousands of lines of raw code into Claude, Cursor, or ChatGPT, you provide them with an architectural map.
🚀 Features
- 3-Pass Knowledge Extraction:
- Pass 1 (Structural): AST parsing via
ts-morphto discover real dependencies, classes, and function calls. - Pass 2 (Audio): Extracts text from meeting recordings and videos using Whisper.
- Pass 3 (Semantic): Uses local LLMs (via Ollama) to read your documentation and infer abstract concepts, design decisions, and system constraints.
- Pass 1 (Structural): AST parsing via
- God Node Analytics: Runs mathematical algorithms (Louvain community detection + PageRank) to automatically identify "God Nodes" (high-centrality single points of failure) and system boundaries.
- Offline Graph Visualizer: Generates an interactive, 3D-force-directed topology map (
graph.html) of your software architecture. - MCP Server Included: Exposes graph querying to any MCP-compatible agent (Claude Code, Cursor) allowing them to fetch exact dependencies dynamically without blowing up the token context window.
📦 Installation
You can install Exocore globally using npm:
```bash npm install -g exocore-cli ```
(Requires Node.js v18 or higher)
🛠️ Usage
1. Build the Knowledge Graph
Navigate to the root of any codebase and run:
```bash exocore build . ```
This will scan your project and generate an exocore-out/ directory containing:
exocore.json— The raw graph database.graph.html— The interactive graph visualizer.EXOCORE_REPORT.md— A high-level markdown summary of your project's architecture.
Options:
--model <name>: Specify your Ollama model (default:mistral).--skip-semantic: Skip Pass 3 LLM extraction for a faster build.--skip-audio: Skip audio transcription.
2. Querying the Graph
Find the shortest architectural path between two entities: ```bash exocore query "src/index.js" "src/graph-engine.js" ```
Get a natural language explanation of a specific module: ```bash exocore explain "src/visualizer.js" ```
Perform an impact analysis before making a risky change: ```bash exocore impact "src/parser.js" ```
3. Connect to AI Agents (MCP Server)
Start the Model Context Protocol (MCP) server so your AI agent can dynamically query your codebase graph:
```bash exocore mcp ```
You can configure Claude Code or Cursor to connect to this local MCP server process to grant them god-level understanding of your repo.
4. Interactive Visualizer
Just open exocore-out/graph.html in any web browser to see your project's topology!
⚙️ Prerequisites for Advanced Features
- Ollama: Required for Pass 3 Semantic Extraction. Download it from ollama.com and run
ollama pull mistral(or your preferred model). - Whisper CLI: Required for Pass 2 Audio Extraction. Install via pip:
pip install openai-whisper.
📄 License
MIT License.
