🔬

Deep Code Understanding

Extract complete functions, classes and structures. Not just lines of code - full context every time.

🛡️

Local Search Engine

Probe runs locally without requiring embedding generation. No indexing needed, works like a full elastic search for your code.

🖥️

For AI Code Editor Users

Integrate with Cline, GitHub Copilot, or any MCP-compatible AI assistant.

Setup Guide →

⌨️

For CLI Power Users

Advanced text-based queries, token limiting, and large repo handling.

CLI Guide →

🏢

Chat with Code

A source of truth for how your product works. Enables quick issue resolution, documentation generation, and architecture understanding.

Deployment Guide →

🛠️

For AI Tooling Developers

Embed Probe into your Node.js apps with our SDK.

SDK Guide →

Intelligent Code Search

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)
}
```

Developer-Friendly Tools

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`);

Supercharge Your AI Assistant

Probe enhances AI coding assistants with accurate code context, enabling them to understand your entire codebase:

  • Complete Context: Get entire functions and classes, not fragments
  • Token-Aware: Limits results to fit AI context windows
  • Multiple Integration Options: MCP server, CLI chat, or SDK
  • Privacy Note: When using with external AI services, code snippets are sent to those services
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?" }
]);

Advanced Pattern Matching

Find code based on its structure, not just text content, using AST-aware pattern matching:

  • AST-Grep Patterns: Search for specific code structures
  • Placeholder Variables: Match function names, parameters, and bodies
  • Structure-Aware Matching: Find patterns regardless of formatting
# 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

Choose Your Path

Probe adapts to different workflows and use cases. Select the approach that works best for you:

🖥️ AI Code Editor User

Enhance your AI-powered editor with deep code understanding

AI Editor Integration →

⌨️ CLI Power User

Ask questions about your code directly from your terminal

CLI AI Workflows →

🏢 Chat with Code

Use code as a source of truth for how your product works, resolve issues quickly, and generate documentation

Deployment Guide →

🛠️ AI Tooling Developer

Build custom AI-powered code tools with the Node.js SDK

SDK & LangChain →