Environment Variables

February 14, 2026 ยท View on GitHub

Complete reference of environment variables for Probe CLI and Probe Agent.


AI Provider Keys

VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key
OPENAI_API_KEYOpenAI GPT API key
GOOGLE_GENERATIVE_AI_API_KEYGoogle Gemini API key
AWS_ACCESS_KEY_IDAWS access key (for Bedrock)
AWS_SECRET_ACCESS_KEYAWS secret key (for Bedrock)
AWS_SESSION_TOKENAWS session token (optional)
AWS_REGIONAWS region (for Bedrock)

Example:

export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...

Probe CLI Variables

Debug & Logging

VariableValuesDescription
DEBUG1 or unsetEnable detailed debug output with timing
NO_COLORAny valueDisable colored output
RUST_BACKTRACE1 or fullShow Rust stack traces on errors

Example:

DEBUG=1 probe search "query" ./
NO_COLOR=1 probe search "query" ./ | less
RUST_BACKTRACE=1 probe search "query" ./

Performance Tuning

VariableValuesDefaultDescription
PROBE_PARSER_POOL_SIZENumbermax(CPU cores, 4)Tree-sitter parser thread pool size
PROBE_TREE_CACHE_SIZENumberAutoParse tree cache size
PROBE_NO_PARSER_WARMUP1 or unsetunsetSkip parser warmup phase
PROBE_OPTIMIZE_BLOCKS1 or unsetunsetEnable block optimization

Example:

# Use 8 parser threads
PROBE_PARSER_POOL_SIZE=8 probe search "query" ./

# Skip warmup for faster cold start
PROBE_NO_PARSER_WARMUP=1 probe search "query" ./

SIMD Control

VariableValuesDefaultDescription
DISABLE_SIMD_TOKENIZATION1 or unsetunsetDisable SIMD tokenization
DISABLE_SIMD_RANKING1 or unsetunsetDisable SIMD ranking
DISABLE_SIMD_PATTERN_MATCHING1 or unsetunsetDisable SIMD patterns

Example:

# Disable all SIMD (for debugging)
DISABLE_SIMD_RANKING=1 probe search "query" ./

Behavior

VariableValuesDefaultDescription
PROBE_NO_GITIGNORE1 or unsetunsetIgnore .gitignore files globally
PROBE_SESSION_IDString-Default session ID for caching

Example:

# Search all files including ignored
PROBE_NO_GITIGNORE=1 probe search "query" ./

MCP Variables

Configuration

VariableValuesDefaultDescription
MCP_CONFIG_PATHFile path-Path to MCP config file
MCP_MAX_TIMEOUTMilliseconds1800000Maximum timeout (30s min, 2h max)

Example:

export MCP_CONFIG_PATH=/path/to/mcp.config.json
export MCP_MAX_TIMEOUT=120000  # 2 minutes

Per-Server Configuration

Environment variables can configure individual MCP servers:

# Pattern: MCP_SERVERS_<NAME>_<PROPERTY>
MCP_SERVERS_GITHUB_COMMAND=npx
MCP_SERVERS_GITHUB_ARGS=-y,@modelcontextprotocol/server-github
MCP_SERVERS_GITHUB_TRANSPORT=stdio
MCP_SERVERS_GITHUB_ENABLED=true
MCP_SERVERS_GITHUB_TIMEOUT=60000
MCP_SERVERS_GITHUB_ALLOWLIST=search_*,get_*
MCP_SERVERS_GITHUB_BLOCKLIST=delete_*

# Use these to override config file settings

Debug

VariableValuesDescription
DEBUG_MCP1 or unsetEnable MCP debug logging

Example:

DEBUG_MCP=1 probe mcp

Probe Agent SDK Variables

Timeouts

VariableValuesDefaultDescription
ENGINE_ACTIVITY_TIMEOUTMilliseconds180000Engine activity timeout (3 min)

Range: 5000 (5s) to 600000 (10 min)

Provider Selection

The SDK auto-detects providers based on these environment variables:

# Priority order for auto-detection:
# 1. Claude Code CLI (if 'claude' command exists)
# 2. Codex CLI (if 'codex' command exists)
# 3. Anthropic (if ANTHROPIC_API_KEY set)
# 4. OpenAI (if OPENAI_API_KEY set)
# 5. Google (if GOOGLE_GENERATIVE_AI_API_KEY set)
# 6. Bedrock (if AWS credentials set)

Node.js Variables

VariableValuesDescription
NODE_OPTIONSOptionsNode.js runtime options
NODE_ENVdevelopment, productionEnvironment mode

Example:

# Increase memory for large codebases
NODE_OPTIONS=--max-old-space-size=8192 npx probe-chat ./large-codebase

Quick Reference

Minimal Setup

# Just need one API key
export ANTHROPIC_API_KEY=sk-ant-...
probe search "query" ./

Performance Optimized

export PROBE_PARSER_POOL_SIZE=8
export PROBE_NO_PARSER_WARMUP=1
probe search "query" ./

Debug Mode

export DEBUG=1
export DEBUG_MCP=1
export RUST_BACKTRACE=1
probe search "query" ./

MCP Server

export MCP_CONFIG_PATH=~/.config/probe/mcp.json
export MCP_MAX_TIMEOUT=120000
probe mcp

Configuration File Locations

These locations are checked for configuration (in order):

MCP Config

  1. $MCP_CONFIG_PATH (if set)
  2. ./.mcp/config.json
  3. ./mcp.config.json
  4. ~/.config/probe/mcp.json
  5. ~/.mcp/config.json
  6. ~/Library/Application Support/Claude/mcp_config.json (macOS)

Claude Desktop (for MCP integration)

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json