@QingQ77: Provides coding agents with tree-sitter-based, structured, byte-precise, low-token codebase access https://github.com/Entelligentsia/grove… Wrote a dual-purpose tool in Rust: can be used as both a CLI and via MCP protocol

X AI KOLs Timeline Tools

Summary

Grove is a Rust-powered tool that uses tree-sitter to provide coding agents with structured, byte-precise, token-efficient access to codebases, supporting 27 languages via CLI and MCP server.

Provides coding agents with structured, byte-precise, token-efficient codebase access based on tree-sitter https://github.com/Entelligentsia/grove… A dual-purpose tool written in Rust: can be used both as a CLI and via the MCP protocol. The core leverages tree-sitter syntax trees to provide AI agents with code structure information—no need for grep or reading entire files. Supports 27 languages with 7 tools: outline (view file skeleton), source (get source code of a single symbol), map (view directory dependencies), callers (find callers), definition (jump to definition), symbols (search symbols), check (check syntax errors).
Original Article
View Cached Full Text

Cached at: 07/01/26, 12:07 PM

Provides structured, byte-precise, token-cheap codebase access for coding agents based on tree-sitter. Written in Rust, it is a two-faced tool: runs as a CLI and via the MCP protocol. The core uses tree-sitter’s syntax tree to provide code structure information to AI agents, without grep or reading entire files. Supports 27 languages, with 7 tools: outline (view file skeleton), source (get source of a single symbol), map (view directory dependencies), callers (find who calls it), definition (jump to definition), symbols (search symbols), check (check syntax errors).


Entelligentsia/grove

Source: https://github.com/Entelligentsia/grove

grove — structural sight for coding agents

grove gives coding agents structural, byte-precise, token-cheap access to a codebase via tree-sitter — instead of reading whole files. One engine, seven tools, two faces (a human CLI grove and an MCP server grove serve), with grammars loaded at runtime from a WASM registry, so adding a language needs no recompile and no toolchain on the consumer.

grove in action — install + an agent answering a question with grove, no grep, no whole-file reads (asciinema cast: docs/assets/grove_demo.cast — play it interactively with asciinema play docs/assets/grove_demo.cast.)

Why grove

Agents burn tokens and round-trips grep-ing and read-ing whole files to answer “where is this defined / what does it do / who calls it.” grove replaces that with one symbol at a time, by exact bytes, behind a stable id the agent passes between turns.

  • Token-cheapoutline a 1700-line file as a skeleton; source one symbol’s body, not the whole file. A map call returns a directory’s definitions + references in one shot.
  • Byte-precise & stable — every result carries a symbol-id (:#@, 1-based) you pass forward across turns.
  • One engine, two faces — the same Rust binary drives the CLI and an MCP server, so a human and an agent see the same thing.
  • Runtime grammars — all 27 official tree-sitter grammars load from a hosted WASM registry; new languages are a registry entry, not a recompile.

Not an LSP. grove is a syntactic, tree-sitter-powered shell for agents — not a semantic language server. It speaks MCP (not LSP), parses (doesn’t analyze), and locates (doesn’t refactor): no type inference, completion, rename, or type-resolved go-to-def. It’s the cheap syntactic layer beneath where an LSP’s semantics begin — complementary, not competitive. Full reasoning: Is grove an LSP?.

27 languages out of the box — one binary, grammars loaded at runtime from the hosted WASM registry:

Bash C C++ C# Go Java JavaScript Julia PHP Python Ruby Rust Scala TypeScript TSX Agda² CSS² Embedded Template² Haskell² HTML² JSDoc² JSON² OCaml² OCaml Interface² CodeQL² Regex² Verilog²

² minimal profile — core tools only (callers/definition degrade); full profile = all tools. `` = no official logo. Profiles are data, not compiled in. See Languages & grammars.

See VISION.md for the product vision.

Quick start

# 1. install (one line — detects platform, verifies sha256)
curl -fsSL https://raw.githubusercontent.com/Entelligentsia/grove/main/install.sh | sh

# 2. wire it into a project (in the project root)
grove init

grove init detects the project’s languages, auto-fetches their grammars, and writes .mcp.json (the tools exist) + a CLAUDE.md steering directive (the agent reaches for grove instead of grep) + grove.lock. That’s it — your agent now has structural sight.

Other install channels (Homebrew, npm, cargo, agent skill) and --as mcp|skill|both are in Install and Setup.

As an agent skill (Claude Code, Cursor, Codex, Cline, …):
npx skills add Entelligentsia/grove — the skill self-installs the binary on
first use if it’s missing. See Setup.

Evaluated on real codebases

grove is measured in is-grep-enough (https://github.com/Entelligentsia/is-grep-enough) — a fair, blind-judged comparison of three navigation regimes (text baseline, structural grove, semantic lsp) given the same agent the same prompt across 50 tasks: 10 large, popular, grammar-backed repos × 5 rungs of climbing complexity (locate a symbol → trace flow → recover an architecture). Same substrate, one variable — the navigation capability.

Explore every run in the live dashboard (https://entelligentsia.github.io/is-grep-enough/).

Same answer, far fewer tokens — across 5 rungs of task complexity grove ties on answer quality and runs about 2x leaner on context, 2.8x leaner on the hardest tasks (https://entelligentsia.github.io/is-grep-enough/)

The result is a curve, not a verdict:

  • Answer quality ties — and on the hardest traces grove is the more reliable one. Grounding ~0.97 and completeness ~0.99 across all three arms; grep is enough to be correct most of the time. But where text search drifts on a dense trace — the C++ L5 architecture trace drops baseline grounding to 0.80 — grove holds 0.97, because it cites the real syntax tree instead of guessing line numbers.

  • grove runs leaner on context, and the lead widens with complexity. ~395K mean tokens vs 567K (lsp) and 780K (baseline) overall — roughly half the text-search context. By the hardest rung (architecture / binding-spine), baseline pushes ~1.5M tokens against grove’s ~534K — 2.8× leaner (on the TypeScript L5 trace, 2.43M → 570K, 4.3× leaner) — while grove stays tightest on quality.

  • Reported honestly, including where grove doesn’t win. On trivial locate-one-symbol tasks (L1), grove’s fixed structural-call overhead means it isn’t the cheapest — plain text search is. grove pays off on the navigation that actually costs tokens: tracing flow, mapping a subsystem, recovering an architecture. Token throughput isn’t the billed bill — much of baseline’s volume is cheap cache reads — but it is what drives context-window pressure and latency.

Full methodology, per-repo data, blind judgements, and every raw transcript: is-grep-enough (https://github.com/Entelligentsia/is-grep-enough) · live dashboard (https://entelligentsia.github.io/is-grep-enough/).

The tools

CommandWhat it returns
outlinegrove outline <file>a file’s definition skeleton (kind · name · parent · signature · id)
symbolsgrove symbols --name <name>repo-wide symbol search — --name is exact, --name-contains for substring
sourcegrove source <symbol-id>one symbol’s full source — no whole-file read
checkgrove check <file>ERROR / MISSING nodes — post-edit syntax check (exit 1 if any)
callersgrove callers -d <symbol-id>call sites of a symbol, each with its enclosing function
mapgrove map <directory>directory dependency graph: definitions + outgoing references, no bodies
definitiongrove definition <name> / --at <file:line:col>go-to-def, by name or from a usage position

Add --json to any command for the agent-facing shape. Full reference + examples: Tools.

As a library — grove-core

The same engine ships as a standalone crate, grove-core, so you can embed grove’s structural queries directly in Rust — no subprocess, no CLI. The grove binary is a thin clap + MCP shell over it. The crate is clap-free; grammars still load at runtime from the WASM registry, so nothing is compiled in.

On crates.io as grove-cst — CST for the concrete syntax trees tree-sitter builds (grove-core is taken by an unrelated crate). Alias it so imports stay use grove_core::...:

# Cargo.toml
[dependencies]
grove_core = { package = "grove-cst", version = "0.1" }
use std::path::Path;
use grove_core::{init, ops};

fn main() -> anyhow::Result<()> {
    let project = Path::new(".");
    // 1. Provision grammars for this project's languages — fetches any missing
    //    grammar into the OS cache and pins grove.lock. Run once.
    for action in init::provision_project(project, false)? {
        println!("provisioned: {action}");
    }

    // 2. Query — grammars resolve from the cache. Every definition under `src/`,
    //    gitignore-aware, as typed results.
    for s in ops::symbols(&project.join("src"), None, None, false, false)? {
        println!("{} {} — {}:{}", s.kind, s.name, s.file, s.line);
    }
    Ok(())
}

(Offline? Set GROVE_REGISTRY= to resolve grammars from a pinned registry and skip the fetch — see core/README.md.)

The consumer surface is the ops module — the same seven tools (outline, symbols, source, check, callers, map, definition), returning typed Symbol / Defect / CallSite / FileMap values (re-exported at the crate root). init::provision_project is the grammar-provisioning entry point behind grove init. Crate overview and full API surface: core/README.md · core/src/lib.rs.

Documentation

  • Install — curl/Homebrew/npm/cargo, build from source, the agent skill
  • Setupgrove init, --as mcp|skill|both, what it writes, offline/dry-run
  • Languages & grammars — the WASM registry, fetch/lock, where grammars live, profiles
  • Tools — the seven tools, --json, symbol-id, examples
  • MCP servergrove serve, .mcp.json, steering, error model
  • Librarygrove-core: embed the engine in Rust (no CLI, no subprocess)
  • Roadmap & repo layout — what’s not done yet, source map
  • FAQIs grove an LSP? and other positioning questions
  • VISION.md — product vision · CHANGELOG.md — releases
  • Eval: Entelligentsia/is-grep-enough (https://github.com/Entelligentsia/is-grep-enough) — text vs structural vs semantic navigation, same agent, 50 blind-judged tasks · live dashboard (https://entelligentsia.github.io/is-grep-enough/)
  • Registry: Entelligentsia/grove-registry (https://github.com/Entelligentsia/grove-registry) · Homebrew tap: Entelligentsia/homebrew-grove (https://github.com/Entelligentsia/homebrew-grove)

Status

Pre-1.0. callers/definition are name-based (no receiver-type resolution); 12 languages ship a minimal profile (core tools only); no incremental reparse yet. Details and the rest of the roadmap: Roadmap.

Similar Articles

@VincentLogic: This open-source project cuts Claude Code's costs by 25%. It doesn't build new models or a new IDE. It just draws a "code map" for the AI coding agent. Traditional approach: the model reads the entire repo → token explosion. Its approach: first parse the code with Tree-si…

X AI KOLs Timeline

An open-source project uses Tree-sitter to parse code into a graph structure and store it in local SQLite, providing a code map for AI coding agents, thereby reducing token consumption and costs. On average, it saves 57% tokens and reduces costs by 25%. Supports tools like Claude Code, Cursor, aider, etc.

@austinit: Hey friends! Highly recommend CodeGraph: a tool that turns your entire codebase into a structured knowledge graph! It uses Tree-sitter to accurately parse AST, supports 20+ languages, and can be directly fed to AI agents like Claude/Cursor. Before modifying code, instantly see the impact scope, with incredibly accurate context. In practice, tokens are saved by 16% and tool calls reduced by 58%, all local and super secure. Start with one command: npx @colbymchenry/codegraph. A must-have for heavy AI coding! https://colbymchenry.github.io/codegraph/ Worth a try!

X AI KOLs Timeline

CodeGraph is a local-first tool that converts codebases into structured knowledge graphs. It uses Tree-sitter to precisely parse ASTs and supports over 20 languages. Through the MCP protocol, it directly feeds AI coding agents like Claude and Cursor, helping quickly analyze code impact scope while reducing token consumption and tool call frequency.