High-performance local AI workspace, codebase intelligence, and persistent cross-session memory for AI coding agents and terminal power users.
Single Go binary (~34MB). Zero Python virtual environments, zero Docker required. Everything runs locally on your machine.
# Go install (Recommended)
go install github.com/tevfik/gleann/cmd/gleann@latest
# Or One-Liner (Linux & macOS) — installs the lite build
curl -sSfL https://raw.githubusercontent.com/tevfik/gleann/main/scripts/install.sh | sh
# With bitllm.c local embeddings, FAISS and the tree-sitter code graph
curl -sSfL https://raw.githubusercontent.com/tevfik/gleann/main/scripts/install.sh | GLEANN_VARIANT=full shGLEANN_VARIANT |
Includes | Platforms |
|---|---|---|
lite (default) |
pure Go; no bitllm.c, FAISS or code graph | all |
eif |
+ bitllm.c local embeddings (EIF runtime) | linux-amd64, linux-arm64, darwin-arm64 |
full |
+ bitllm.c, FAISS, tree-sitter code graph, Kuzu | linux-amd64, linux-arm64, darwin-arm64 |
Later, update gleann and its plugins from the latest GitHub release:
gleann update --check # is a newer release available?
gleann update # replace this binary (checksum-verified when the release has SHA256SUMS)
gleann plugin update # update installed plugins (e.g. docs) the same way# Index a codebase with AST call-graph intelligence
gleann index build my-code --docs ./src --graph
# Index documents, PDFs, or Markdown notes
gleann index build my-docs --docs ./documents# Auto-configure all detected AI tools (Cursor, Claude Code, Windsurf, Zed, etc.)
gleann installNow ask questions, search semantically, or let your AI editor use Gleann over MCP:
# Semantic search
gleann search my-code "auth middleware rate limiting"
# RAG Q&A directly in your terminal
gleann ask my-code "How are database migrations handled?"Choose your workflow to see how Gleann accelerates your engineering:
Connect Gleann directly to Claude Code, Cursor, Windsurf, Cline, Zed, JetBrains, or Neovim.
- 1-Click Setup: Run
gleann installto automatically register the Model Context Protocol (MCP) server across 17+ AI platforms. - Context Field Theory (Φ Scoring): Dynamic re-ranking prioritizes recency, frequency, and code proximity.
- Shell Output Compression: 95+ regex patterns collapse verbose Git, Go, NPM, and Docker logs before they reach the LLM context window.
- Token Gain Tracking: Monitor cumulative token savings across sessions with
gleann_gain. - 👉 Read the MCP Setup Guide & Agent Integration.
Vector search alone misses function calls, callers, and dependencies. Gleann combines vector search with an AST code graph in KùzuDB.
- AST Chunking: Tree-sitter partitions functions, structs, and interfaces cleanly at syntax boundaries.
- Call-Graph Traversal: Discover callers and callees with
gleann graph callers <symbol>. - Blast Radius Analysis: Trace upstream impact before making breaking changes with
gleann graph explain <symbol>. - 👉 Read the Code Graph Guide & Tree-sitter Details.
Extract complex multi-page documents, PDFs, and spreadsheets without losing table structure.
- Table-Aware Chunker: Preserves Markdown tables atomically or splits rows while replicating headers across sub-chunks.
- Docling BitNet Vision (bitllm.c): In-process IBM Docling BitNet 1.58-bit VLM for scanned/raster PDFs and diagrams.
- Pure-Go Fast Path: Digital PDFs and DOCX files extract in milliseconds without Python overhead.
- 👉 Read the Hierarchical GraphRAG Guide & Plugin Architecture.
Give your AI coding assistant institutional memory that survives terminal restarts.
- Tiered Memory: Short (session state), Medium (sprints/TODOs), and Long (permanent architectural decisions).
- Auto-Injection: Relevant memories are automatically injected into every prompt.
- CLI Commands:
gleann memory remember "Database migrations must always use snake_case" --tag convention gleann memory search "architecture" gleann memory context
- 👉 Read the Memory Engine Guide.
Work directly from your shell without leaving the keyboard.
- Interactive Chat: Multi-turn conversations with streaming, cancellation, collapsible reasoning and source cards (
gleann chat my-code)./indexpicks which indexes and tags to search,@symbolattaches a definition from the code graph.--classicselects the old interface. - Pipe Support: Send compiler logs or diffs directly into Gleann (
git diff | gleann ask my-code "Review changes"). - Multi-Index Fan-Out: Query documentation and source code simultaneously (
gleann ask docs,code "How does auth work?"). - 👉 Read the Cookbook.
Running gleann install auto-detects and installs configuration for:
| Platform | Integration Type | Supported Features |
|---|---|---|
| Claude Code | PreToolUse Hook + CLAUDE.md | MCP Tools + Auto Memory Injection |
| Cursor | .cursor/rules + MCP Config |
Semantic Code Search + Full Documents |
| Windsurf | .windsurf/rules + MCP Config |
Graph Traversal + Impact Analysis |
| Cline / Roo Code | .clinerules + MCP Config |
File Maps + AST Breadcrumbs |
| Zed | settings.json MCP |
Fast Codebase Retrieval |
| Neovim | Avante / CodeCompanion MCP | In-editor RAG & Context |
| JetBrains | .junie/guidelines.md + MCP |
Multi-Index Knowledge Retrieval |
| Gemini CLI / Codex | Agent Hooks + Config | Shell Compression + Token Gain |
| Aider / OpenClaw | Skills + System Prompt | Long-Term Memory Recall |
gleann index build my-code --docs ./src --graph # Index source code with call graph
gleann index build my-docs --docs ./docs # Index technical documentation
gleann index list # List all indexes, status, and tags
gleann index watch my-code --docs ./src --graph # Auto-sync index on file changesgleann search my-code "connection pool timeout" # Fast semantic search
gleann search my-code "connection pool timeout" --rerank # Search with cross-encoder reranking
gleann ask my-code "Explain how auth tokens are verified" # RAG Q&A with local/cloud LLM
gleann ask docs,code "How to configure SSL?" # Multi-index federated querygleann graph callers "HandleRequest" --index my-code # Find all callers of a symbol
gleann graph deps "HandleRequest" --index my-code # Downstream dependencies
gleann graph explain "HandleRequest" --index my-code # Full blast radius contextgleann memory remember "JWT secrets are rotated every 90 days"
gleann memory search "rotation"
gleann install # Auto-configure AI editors
gleann mcp # Launch stdio MCP server- Getting Started Guide — Step-by-step onboarding walkthrough
- Cookbook & Recipes — Practical examples for real-world codebases
- Architecture & Internals — In-depth engine mechanics & data flow
- Configuration & Models — Model recommendations (Ollama, llama.cpp, Cloud)
- Hierarchical GraphRAG — Multi-level document structure & KùzuDB
- Plugin System — Custom extractors for audio, video, and documents
- REST API Reference — OpenAPI endpoints & curl examples
- Troubleshooting — FAQ and common resolutions
Contributions are welcome! Please check CONTRIBUTING.md for development setup.
Licensed under the MIT License.
