
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@probelabs/probe-chat
Advanced tools
CLI and web interface for Probe code search (formerly @probelabs/probe-web and @probelabs/probe-chat)
A command-line and web interface for interacting with Probe code search using AI models through the Vercel AI SDK.
examples/chat directorynpm install
.env file with your API keys:# API Keys (uncomment and add your key)
ANTHROPIC_API_KEY=your_anthropic_api_key
# OPENAI_API_KEY=your_openai_api_key
# GOOGLE_API_KEY=your_google_api_key
# Force a specific provider (optional)
# FORCE_PROVIDER=anthropic # Options: anthropic, openai, google
# Debug mode (set to true for verbose logging)
DEBUG=false
# Default model (optional)
# For Anthropic: MODEL_NAME=claude-3-7-sonnet-latest
# For OpenAI: MODEL_NAME=gpt-5.2
# For Google: MODEL_NAME=gemini-2.5-flash
# API URL configuration (optional)
# Generic base URL for all providers (if provider-specific URL not set)
# LLM_BASE_URL=https://your-custom-endpoint.com
# Provider-specific URLs (override LLM_BASE_URL)
# ANTHROPIC_API_URL=https://your-anthropic-endpoint.com
# OPENAI_API_URL=https://your-openai-endpoint.com
# GOOGLE_API_URL=https://your-google-endpoint.com
# Folders to search (comma-separated list of paths)
# If not specified, the current directory will be used by default
# ALLOWED_FOLDERS=/path/to/folder1,/path/to/folder2
# Web interface settings (optional)
# PORT=8080
# AUTH_ENABLED=false
# AUTH_USERNAME=admin
# AUTH_PASSWORD=password
Start the chat interface in CLI mode:
node index.js
Or with npm:
npm start
Start the chat interface in web mode:
node index.js --web
Or with npm:
npm run web
You can specify a custom port:
node index.js --web --port 3000
You can also specify a path to the codebase you want to search:
node index.js /path/to/codebase
For example, to search in a repository located at ../../tyk:
node index.js ../../tyk
This will override any ALLOWED_FOLDERS setting in your .env file.
-d, --debug: Enable debug mode for verbose logging-m, --model <model>: Specify the model to use (e.g., claude-3-7-sonnet-latest, gpt-5.2, gemini-2.5-flash)-f, --force-provider <provider>: Force a specific provider (options: anthropic, openai, google)-w, --web: Run in web interface mode-p, --port <port>: Port to run web server on (default: 8080)--prompt <value>: Use a custom prompt (values: architect, code-review, support, or path to a file)[path]: Path to the codebase to search (overrides ALLOWED_FOLDERS)During the chat, you can use these special commands:
exit or quit: End the chat sessionusage: Display token usage statisticsclear: Clear the chat history and start a new sessionThis CLI tool uses the Vercel AI SDK to interact with AI models and provides them with tools to search and analyze your codebase:
The AI is instructed to use these tools to answer your questions about the codebase, providing relevant code snippets and explanations.
The tool automatically generates a unique session ID for each chat session and passes it to the Probe CLI commands using the --session parameter. This enables caching of search results within a session, which can significantly improve performance when similar searches are performed multiple times.
The session ID is managed internally and doesn't require any user intervention. When you start a new chat session (or use the "clear" command), a new session ID is generated, and a new cache is created.
Probe Chat supports multiple AI providers, giving you flexibility in choosing which model to use for your code search and analysis:
Anthropic Claude
claude-3-7-sonnet-latestANTHROPIC_API_KEYOpenAI GPT
gpt-5.2OPENAI_API_KEYGoogle Gemini
gemini-2.5-flashGOOGLE_API_KEYYou can force Probe Chat to use a specific provider in two ways:
Using the command line option:
node index.js --force-provider anthropic
node index.js --force-provider openai
node index.js --force-provider google
Using the environment variable:
Add this to your .env file:
FORCE_PROVIDER=anthropic # or openai, google
When forcing a provider, Probe Chat will verify that you have the corresponding API key set. If the API key is missing, it will display an error message.
You can specify which model to use for each provider:
Using the command line option:
node index.js --model claude-3-7-sonnet-latest
node index.js --model gpt-5.2
node index.js --model gemini-2.5-flash
Using the environment variable:
Add this to your .env file:
MODEL_NAME=claude-3-7-sonnet-latest
Note that the model must be compatible with the selected provider. If you force a specific provider and specify a model, the model must be available for that provider.
You can configure custom API endpoints for each provider:
Generic endpoint for all providers:
LLM_BASE_URL=https://your-custom-endpoint.com
This will be used for all providers unless a provider-specific URL is set.
Provider-specific endpoints:
ANTHROPIC_API_URL=https://your-anthropic-endpoint.com
OPENAI_API_URL=https://your-openai-endpoint.com
GOOGLE_API_URL=https://your-google-endpoint.com
These override the generic LLM_BASE_URL for their respective providers. Provider-specific URLs always take precedence over the generic LLM_BASE_URL.
Probe Chat allows you to customize the system prompt used by the AI assistant. This can be useful for tailoring the assistant's behavior to specific use cases or domains.
By default, Probe Chat uses a "Code Explorer" prompt that's optimized for answering questions about code, explaining how systems work, and providing insights into code functionality.
The --prompt option accepts several predefined prompt types to specialize the assistant for different tasks:
code-explorer (default): Focuses on explaining and navigating code. The assistant will provide clear explanations of how code works, find relevant snippets, and trace function calls and data flow.
node index.js --prompt code-explorer
Note: This is the default behavior, so you don't need to specify this prompt explicitly.
architect: Focuses on software architecture and design. The assistant will analyze code from an architectural perspective, identify patterns, suggest improvements, and create high-level design documentation.
node index.js --prompt architect
code-review: Focuses on code quality and best practices. The assistant will identify issues, suggest improvements, and ensure code follows best practices.
node index.js --prompt code-review
support: Focuses on troubleshooting and problem-solving. The assistant will help diagnose errors, understand unexpected behaviors, and find solutions.
node index.js --prompt support
Each predefined prompt type maintains the core functionality of Probe Chat while specializing in a particular area of focus. The standard instructions for using tools and following the XML format are automatically included with all predefined prompts.
You can also provide a path to a file containing your own custom prompt:
node index.js --prompt /path/to/your/prompt.txt
The file should contain the complete system prompt that you want to use. This completely replaces the default system prompt. If you're creating a custom prompt, make sure to include instructions for using the available tools and following the XML format.
Example custom prompt file:
You are ProbeChat Custom, a specialized AI assistant for [your specific use case].
You focus on [specific area of expertise] and excel at [key strengths].
Follow these instructions carefully:
1. Analyze the user's request with a focus on [your specific focus area].
2. Use <thinking></thinking> tags to analyze the situation and determine the appropriate tool for each step.
3. Use the available tools step-by-step to fulfill the request.
4. Ensure to get really deep and understand the full picture before answering.
5. You MUST respond with exactly ONE tool call per message, using the specified XML format, until the task is complete.
6. Wait for the tool execution result (provided in the next user message in a <tool_result> block) before proceeding to the next step.
7. Once the task is fully completed, and you have confirmed the success of all steps, use the '<attempt_completion>' tool to provide the final result.
8. Prefer concise and focused search queries. Use specific keywords and phrases to narrow down results.
9. [Add any additional specialized instructions here]
You can also set a default prompt type using the environment variable:
PROMPT_TYPE=architect
Or specify a path to a custom prompt file:
CUSTOM_PROMPT=/path/to/your/prompt.txt
The command-line option takes precedence over the environment variable. Provider-specific URLs always take precedence over the generic LLM_BASE_URL.
index.js: Main entry point for both CLI and web interfacesprobeChat.js: Core chat functionalitywebServer.js: Web server implementationauth.js: Authentication middleware for web interfaceprobeTool.js: Tool definitions for code search, query, and extractiontokenCounter.js: Utility for tracking token usageindex.html: Web interface HTML templateApache-2.0
FAQs
CLI and web interface for Probe code search (formerly @probelabs/probe-web and @probelabs/probe-chat)
We found that @probelabs/probe-chat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.