BuddhiAI CLI
A Python CLI that builds a code graph of a repository, serves it to coding agents over MCP, and scaffolds a Google Antigravity agent harness.
At a Glance
About BuddhiAI CLI
BuddhiAI CLI is an open-source command-line tool that turns a repository into a code graph, a documentation set, and an agent harness for AI coding agents. Running buddhi init scans supported source files, writes a graph under .buddhi/graphs/, plans code documentation, and scaffolds a Google Antigravity harness. The project is published under the MIT license and installed from PyPI as buddhi-ai.
What It Is
BuddhiAI CLI is a developer tool that gives AI coding agents structured context about a codebase. It uses tree-sitter to extract files, directories, classes, functions and methods, along with their containment, import and call relationships. The graph is stored as JSON, as a SQLite database, and as an interactive Cytoscape.js HTML visualization. Supported languages are Python, JavaScript, TypeScript/TSX, Go, Rust, C#, Java, Kotlin and Swift. Import and call resolution is best-effort, and unresolved references become external placeholder nodes.
MCP Server and Graph Analysis
The buddhi-mcp server runs over stdio and is scoped to a workspace. It exposes tools for topology-aware code search (buddhi_search), AST-pruned and token-budget-aware file reading (buddhi_read), memory queries (buddhi_memory), WCAG color contrast checking (check_contrast) and accessibility verification (verify_a11y). The buddhi graph commands report statistics, communities, cycles, shortest paths between symbols, and the blast radius of changes.
Documentation and Memory
buddhi docs generates documentation in Google's Open Knowledge Format from the graph, including an architecture report, community articles, god-node deep dives and per-symbol concept files. It can build or serve a Pelican static site with client-side symbol search. buddhi memory manages structured, source-aware memory concepts with a line and size budget, validation, compaction and promotion of Spec-Driven Development decisions.
Antigravity Agent Harness
The harness added under .agents/ includes slash-command skills such as /specify, /spec-plan, /spec-tasks, /implement, /verify, /ask, /quick-plan and /document-codebase, which together cover a Spec-Driven Development lifecycle. It also contains read-only specialist agents, always-on rules, templates, a memory index, and a PreToolUse hook that denies destructive commands. Rerunning buddhi init is idempotent and does not overwrite edited harness files. Utilities under buddhi scripts include an output-compression engine, which the README says reduces LLM token use by 60-90% on developer commands, along with accessibility checks and anti-slop filters.
Community Discussions
Be the first to start a conversation about BuddhiAI CLI
Share your experience with BuddhiAI CLI, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
BuddhiAI CLI core is released under the MIT License and can be installed and used without charge.
- MIT License
- Code graph generation via tree-sitter
- MCP server (buddhi-mcp)
- Code documentation generation (OKF/Pelican)
- Antigravity agent harness scaffolding
Capabilities
Key Features
- Tree-sitter code graph with JSON, SQLite and interactive HTML outputs
- Graph analysis: blast radius, communities, cycles, paths, statistics
- MCP server with code search, compressed file reading, memory, contrast and accessibility tools
- OKF documentation generation with Pelican static site and live server
- Antigravity agent harness with skills, specialist agents, rules and hooks
- Spec-Driven Development workflow commands
- OKF v0.2 project memory management
- Accessibility (A11Y.md) static gate and WCAG contrast checker
- Anti-slop filter suite
- RTK command output compression for token savings
