probelabs/probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
Probe – AI‑aware code‑search and reasoning engine
One‑line summary – Probe is a local, AST‑aware code‑search engine that can be driven directly from the command line or through a built‑in LLM‑agent. It lets large‑language‑model assistants understand whole functions, classes or structs in enterprise‑size repositories without any indexing or embedding step.
What it does (as described in the README)
- Parses source files with Tree‑sitter to build an abstract syntax tree (AST) for each supported language.
- Semantic search using Elasticsearch‑style boolean queries (AND, OR, NOT, field filters, file‑type filters, etc.).
- Returns complete code blocks (functions, classes, structs) rather than line fragments.
- Provides AST pattern matching (
probe query) so you can search for structural templates likefn $NAME($$$) -> Result<$RET>. - Zero‑setup indexing – the engine scans the filesystem on‑the‑fly; no embedding model, vector DB, or external service is required.
- Deterministic ranking with BM25/TF‑IDF (and optional hybrid BERT reranking) and token‑budget controls (
--max‑tokens). - Built‑in agent (
probe agent) that talks to any LLM provider (Anthropic, OpenAI, Google, Bedrock) and orchestrates multi‑step searches, extraction, and even code edits. - MCP integration – the agent can be registered as an MCP server for editors like Claude Code, allowing the editor to call Probe tools directly.
- Node.js SDK and Vercel AI SDK bindings so developers can embed the search/agent in their own applications.
- Fully local – all search work happens on your machine; only the LLM calls go out to the chosen provider.
Core features (concise list)
| Feature | Detail |
|---|---|
| AST‑aware parsing | Uses Tree‑sitter for >20 languages (Rust, Python, TS/JS, Go, C/C++, Java, etc.). |
| Semantic search | Boolean query language, file‑type (ext:) and directory (dir:) filters, BM25/TF‑IDF ranking. |
| Zero indexing | No pre‑computed embeddings; instant results on any repo. |
| Deterministic output | Same query → same results, no stochastic vector similarity drift. |
| Token‑aware budgeting | --max‑tokens limits the amount of code sent to the LLM. |
| Built‑in LLM agent | Handles multi‑step reasoning, code editing, delegation, bash execution. |
| MCP server mode | Register as probe server for AI‑enabled editors (Claude Code, Codex, etc.). |
| CLI & SDK | `probe search |
| Hybrid ranking | Optional BERT reranker for higher‑quality results. |
| Cross‑platform install | npm global, curl script, PowerShell script, or build from source (Rust/Cargo). |
Typical use‑cases
- Spec‑driven development – ask the agent “How is authentication implemented?” and get the full function(s) that implement it.
- Code reviews & onboarding – quickly surface all relevant symbols around a change without manually grepping.
- Automated refactoring – combine
agentwith--allow-editto let the LLM propose and apply edits. - Tooling integration – plug the CLI tools into custom IDE extensions or CI pipelines for static analysis.
- Offline environments – run on air‑gapped machines because search never requires external services.
Quick‑start (from the README)
# Install globally via npm (recommended)
npm install -g @probelabs/probe
# One‑shot question using the built‑in agent (any LLM provider)
npx -y @probelabs/probe agent "How is authentication implemented?"
# Semantic search from the terminal
npx -y @probelabs/probe search "authentication AND login" ./src
# AST pattern query (Rust example)
npx -y @probelabs/probe query "fn $NAME($$$) -> Result<$RET>" --language rust
For editor integration, add a small JSON block to ~/.claude/claude_desktop_config.json that registers the Probe MCP server (see the README for the exact snippet).
Supported languages (as listed)
Rust, JavaScript/JSX, TypeScript/TSX, Python, Go, C/C++, Java, Ruby, PHP, Swift, Solidity, Crystal, C#, Bash, QML, Markdown, HTML, YAML, and others via Tree‑sitter.
Installation options
| Method | Command |
|---|---|
| npm (global) | npm install -g @probelabs/probe |
| curl (macOS/Linux) | `curl -fsSL https://raw.githubusercontent.com/probelabs/probe/main/install.sh |
| PowerShell (Windows) | `iwr -useb https://raw.githubusercontent.com/probelabs/probe/main/install.ps1 |
| From source | git clone https://github.com/probelabs/probe.git && cd probe && cargo build --release && cargo install --path . |
License
The repository states a License section but does not specify the exact SPDX identifier in the README. Check the LICENSE file in the repo for the precise terms.
Where to learn more
- Full docs: https://probelabs.com/probe
- CLI reference:
docs/probe-cli/* - Agent SDK:
docs/probe-agent/sdk/* - Community: GitHub Issues and Discord (links in the README).
All information above is taken directly from the project's README; no external assumptions have been added.
Related
- Project
- Project
- Project
- Project
- Project