Turn any GitHub repository into structured knowledge: architecture maps, dependency graphs, AI module explanations, and full developer documentation. Runs 100% locally via Ollama — no API key, no cloud, no cost.
Given a GitHub URL, Codexia runs a 5-stage pipeline:
- Fetch — GitHub API pulls the file tree and source content (no token required for public repos)
- Parse — AST extraction of functions, classes, and imports across 18+ languages
- Analyze — Ollama LLM explains each module: purpose, architectural layer, complexity
- Graph — Knowledge graph built from import relationships + layer hierarchy
- Document — Full markdown documentation generated and ready to commit
Everything runs on your machine. No data leaves your system.
- Python 3.10+
- Ollama installed and running locally
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# macOS / Windows
# Download installer from https://ollama.comollama pull llama3.2 # recommended — best quality
ollama pull phi3 # lighter and faster, lower quality
ollama pull mistral # good balance of speed and qualitycd codexia
pip install -r requirements.txt
# Flask UI
python app.py
# Open http://localhost:5000
# OR CLI
python cli.py analyze https://github.com/owner/repoNo .env file needed unless you want to change defaults.
python app.py
# Open http://localhost:5000Submit any public GitHub URL. Results stream in with a live progress indicator.
Outputs:
- Architecture overview with layer classification
- Interactive D3.js dependency graph (colored by layer)
- Per-module AI analysis cards with filter and search
- Full downloadable markdown documentation
python cli.py analyze https://github.com/owner/repoOptions:
--output -o Output directory (default: ./output)
--no-docs Skip markdown documentation generation
Output files written to ./output/:
{repo}-analysis.json— Full analysis data{repo}-graph.json— Graph nodes and edges{repo}-codexia.md— Markdown documentation
Set OLLAMA_MODEL to use any model you have pulled:
OLLAMA_MODEL=mistral python app.py
OLLAMA_MODEL=phi3 python cli.py analyze https://github.com/owner/repoOr add it to a .env file in the project root:
OLLAMA_MODEL=llama3.2
OLLAMA_URL=http://localhost:11434
Python, JavaScript, TypeScript, JSX/TSX, Java, Go, Ruby, PHP, C#, C/C++, Rust, Swift, Kotlin, Scala, Vue, Svelte
codexia/
├── core/
│ ├── fetcher.py GitHub API — file tree + content retrieval
│ ├── parser.py AST/regex code structure extraction
│ ├── analyzer.py Ollama — local LLM module + architecture analysis
│ ├── graph.py Dependency graph construction
│ └── docs.py Markdown documentation generation
├── templates/
│ ├── index.html Landing page + URL form
│ └── results.html Results: overview, graph, modules, docs
├── static/
│ └── style.css Dark terminal UI
├── app.py Flask application (threaded job model)
├── cli.py CLI entry point
└── requirements.txt
| Limit | Value |
|---|---|
| Requests per hour | 60 per IP |
| Max files analyzed | 35 (prioritized by path depth and size) |
| Max file size | 60 KB |
| Skipped directories | node_modules, .git, dist, build, vendor, __pycache__ |
For private repos or higher rate limits, add GITHUB_TOKEN=your_token to .env and add an Authorization header in core/fetcher.py.
| Variable | Required | Default | Description |
|---|---|---|---|
OLLAMA_URL |
No | http://localhost:11434 |
Ollama server address |
OLLAMA_MODEL |
No | llama3.2 |
Model to use for analysis |
FLASK_SECRET |
No | auto-generated | Flask session secret key |
"Cannot connect to Ollama"
ollama serve # start the Ollama server"Model not found"
ollama pull llama3.2 # or whichever model you setEmpty module analysis
Local models occasionally wrap JSON in prose. The parser handles this with a regex fallback. If results are sparse, try llama3.2 over phi3 — it produces cleaner JSON.
Timed out
Large repos on slow hardware can hit the 120s timeout per module. Switch to a lighter model (phi3) or reduce MAX_FILES in core/fetcher.py.
Codexia — Turning Codebases Into Understanding




