ProbeLocal, AI-Ready Code Intelligence
Make AI work with large codebases, and natively understand it.
Make AI work with large codebases, and natively understand it.
npx -y @buger/probe "+stemming -lexer"
Fast semantic code search with elastic search syntax
npx -y @buger/probe-chat
Built-in AI agent. OpenAI or Anthropic (API key required)
Extract complete functions, classes and structures. Not just lines of code - full context every time.
Probe runs locally without requiring embedding generation. No indexing needed, works like a full elastic search for your code.
Integrate with Cline, GitHub Copilot, or any MCP-compatible AI assistant.
Setup Guide →
Advanced text-based queries, token limiting, and large repo handling.
CLI Guide →
A source of truth for how your product works. Enables quick issue resolution, documentation generation, and architecture understanding.
Deployment Guide →
Embed Probe into your Node.js apps with our SDK.
SDK Guide →
Find complete code blocks with semantic understanding. Probe combines ripgrep's speed with tree-sitter's AST parsing to return only the relevant code. Supports full Elastic Search syntax for powerful queries.
Advanced search examples:
# Basic search with natural language
probe search "user authentication" ./src
# Token-limited search for AI context windows
probe search "error handling" --max-tokens 8000
# Elastic search syntax with operators
probe search "(login OR auth) AND NOT test" ./src
# Extract full code just by specifying line number
probe extract src/auth.js:15
# Extract by function/symbol name using # syntax
probe extract "src/main.rs#authenticateUser"
# Extract from unstructurred command output
go test ./... | probe extract
$ probe search "error handling" --max-tokens 8000 --format json
{
"results": [
{
"file": "src/error.ts",
"lines": [10, 25],
"node_type": "function",
"code": "function handleApiError(error: ApiError) { ... }",
"matched_keywords": ["error", "handle"],
"rank": 1,
"score": 0.95
}
...
],
}
// Extract from test output, like a backtrace of failed test line
$ go test ./... | probe extract
## File: user_auth_test.go
Lines: 56-62
```
function TestUserAuth(t *testing.T) {
user := createTestUser()
token, err := authenticateUser(user.credentials)
assert.NoError(t, err)
assert.NotEmpty(t, token)
}
```
Built by developers for developers, Probe is designed to be easy to install and extend:
# Use the core Probe tool without installation
npx -y @buger/probe search "error handling" ./src
# Start an interactive AI chat with your codebase
npx -y @buger/probe-chat
# Start the web interface on localhost:3000
npx -y @buger/probe-web
// Example of using Probe's Node.js SDK
import { search } from '@buger/probe';
const results = await search({
query: "error handling",
path: "./src",
options: {
maxResults: 10,
contextLines: 3,
maxTokens: 8000 // Token-aware for AI context windows
}
});
console.log(`Found ${results.length} matches`);
Probe enhances AI coding assistants with accurate code context, enabling them to understand your entire codebase:
import { search } from '@buger/probe';
import { ChatOpenAI } from '@langchain/openai';
import { tools } from '@buger/probe';
// Create AI assistant with code search capability
const searchTool = tools.createSearchTool();
const model = new ChatOpenAI()
.withTools([searchTool]);
// Ask questions about your codebase
const result = await model.invoke([
{ role: "system",
content: "You are a code assistant." },
{ role: "user",
content: "How is error handling implemented?" }
]);
Find code based on its structure, not just text content, using AST-aware pattern matching:
# Find all try/catch blocks
probe query -p "try $$$BODY catch ($ERROR) $$$HANDLER" ./src
# Find all React useEffect hooks with dependencies
probe query -p "useEffect(() => $$$BODY, [$$$DEPS])" ./src
# Find all functions that call a specific method
probe query -p "function $NAME($$$) { $$$; fetchData($$$); $$$; }" ./src
Probe adapts to different workflows and use cases. Select the approach that works best for you:
Enhance your AI-powered editor with deep code understanding
AI Editor Integration →Use code as a source of truth for how your product works, resolve issues quickly, and generate documentation
Deployment Guide →