CLI User Guide
The cbintel CLI is an interactive terminal interface for exploring and experimenting with the graph execution pipeline.
Installation
Quick Start
# Interactive mode
npm run dev
# Run a test query
npm run dev -- -t "Research AI safety"
# List available templates
npm run dev -- --templates
# Run auto experiments
npm run dev -- --auto 5
Running Modes
Interactive Mode
Launches a full-screen terminal UI with:
- Status bar showing current template, mode, and workspace
- Message history with syntax highlighting
- Input box for queries and commands
Test Mode
npm run dev -- -t "query" [--template name]
Runs a single query non-interactively. Useful for scripting and CI/CD.
Examples:
npm run dev -- -t "Research AI safety"
npm run dev -- -t "Elon Musk" --template person_deep_research
npm run dev -- -t "Apple Inc" --template corporate_intelligence
npm run dev -- -t "https://cnn.com" --template news_50_states
Auto Mode
npm run dev -- --auto [count]
Runs automated experiments to discover pipeline capabilities and edge cases.
Examples:
npm run dev -- --auto # Run 5 experiments (default)
npm run dev -- --auto 10 # Run 10 experiments
npm run dev -- -a 3 # Short form, 3 experiments
Production Mode
npm run build # Compile TypeScript
npm run start # Run compiled code
Commands Reference
Navigation
| Command |
Description |
/help |
Show help panel with commands and templates |
/templates |
Jump to templates list |
/clear |
Clear message history |
/exit |
Exit the CLI |
Query Execution
| Command |
Description |
<query> |
Run query with current template |
/run <template> <input> |
Run specific template with input |
/use <template> |
Set default template for queries |
Workspace Management
| Command |
Description |
/workspace create <name> |
Create new workspace |
/workspace list |
List all workspaces |
/workspace use <id> |
Set active workspace |
/workspace info |
Show current workspace details |
/workspace clear |
Clear active workspace |
Auto Mode
| Command |
Description |
/auto |
Toggle auto-experimentation mode |
/auto stats |
Show experiment statistics |
/auto stop |
Stop auto mode |
Templates
Research Templates
| Template |
Description |
Parameters |
simple_search |
Basic web search and summarization |
query |
person_deep_research |
Comprehensive background research on any individual |
person_name, context? |
opponent_deep_dive |
Multi-source research on a political opponent |
opponent_name, geo_focus? |
corporate_intelligence |
Deep research into company operations and leadership |
company_name, ticker?, industry? |
Geographic Templates
| Template |
Description |
Parameters |
news_50_states |
Screenshot a news site from all 50 US states |
url |
geo_news_comparison |
Compare how news appears in different regions |
url, regions |
Change Tracking Templates
| Template |
Description |
Parameters |
recent_website_changes |
Track what changed on a website recently |
url, days_back? |
historical_change_tracker |
Track website changes over time with archive analysis |
target_urls, date_from?, date_to? |
position_tracker |
Track stance/position changes over time |
person_name, topic |
Analysis Templates
| Template |
Description |
Parameters |
competitor_comparison |
Side-by-side analysis of multiple companies |
companies[] |
topic_sentiment_tracker |
Analyze sentiment around a topic across sources |
topic, subtopics? |
media_coverage_analysis |
Analyze media coverage patterns and bias |
subject |
Advanced Templates
| Template |
Description |
Parameters |
autonomous_research_agent |
AI-driven research with iterative discovery |
query, depth? |
tor_search_crawl |
Search and crawl dark web sources |
query |
Usage Examples
Basic Research
# Start interactive mode
npm run dev
# Type a query
> Research recent developments in quantum computing
# Or use a specific template
> /run person_deep_research "Sam Altman"
Workspace Workflow
# Create a workspace for a project
> /workspace create "Q1 Competitor Analysis"
# Run queries - jobs are automatically associated
> /run corporate_intelligence "OpenAI"
> /run corporate_intelligence "Anthropic"
> /run corporate_intelligence "Google DeepMind"
# Check workspace stats
> /workspace info
Template Switching
# Set default template
> /use topic_sentiment_tracker
# Now all queries use this template
> AI regulation
> climate policy
> healthcare reform
# Switch to another template
> /use person_deep_research
> Elon Musk
> Jensen Huang
Auto Experimentation
# Interactive auto mode
> /auto
# Experiments run automatically...
> /auto stats # Check progress
> /auto stop # Stop experiments
# Command-line auto mode
npm run dev -- --auto 20
Auto Mode Details
Auto mode runs experiments to discover pipeline capabilities and test edge cases.
What Gets Tested
| Category |
Examples |
| Topic Queries |
AI safety, quantum computing, campaign finance, CRISPR trials |
| Person Research |
Elon Musk, Sam Altman, Jensen Huang |
| Company Research |
OpenAI, Anthropic, Google DeepMind |
| Edge Cases |
Empty queries, unicode, emojis, XSS attempts, SQL injection |
Statistics Tracked
- Total experiments run
- Success/failure count and rate
- Average execution duration
- Recent experiment history
Sample Output
🤖 cbintel-cli AUTO MODE
Running 5 experiments...
======================================================================
[1/5] topic:tech
Template: simple_search
Query: "AI safety regulations 2024"
Status: ...... ✓ 5.4s (4 stages, 6 ops)
[2/5] company
Template: corporate_intelligence
Query: "OpenAI"
Status: ................... ✓ 20.4s (5 stages, 18 ops)
[3/5] edge:unicode/Japanese
Template: simple_search
Query: "日本語テスト"
Status: .... ✓ 3.2s (4 stages, 6 ops)
======================================================================
📊 SUMMARY
Total: 5
Succeeded: 5 (100.0%)
Failed: 0 (0.0%)
Avg time: 12.3s
Configuration
Environment Variables
| Variable |
Default |
Description |
CBINTEL_API_URL |
http://127.0.0.1:9003 |
Jobs API endpoint |
Example
# Use production API
CBINTEL_API_URL=http://intel.nominate.ai:9003 npm run dev
# Use local development server
CBINTEL_API_URL=http://localhost:9003 npm run dev
Command-Line Flags
| Flag |
Short |
Description |
--help |
-h |
Show help message |
--test <query> |
-t |
Run non-interactive test |
--template <name> |
|
Template for test mode |
--auto [count] |
-a |
Run auto experiments |
--count <n> |
-n |
Number of experiments |
--templates |
-T |
List available templates |
Architecture
┌─────────────────────────────────────────────────────┐
│ cbintel [simple_search] [human] /help │
├─────────────────────────────────────────────────────┤
│ │
│ You: Research AI safety │
│ Agent: Running template: simple_search... │
│ Agent: Completed: 4 stages, 6 operations │
│ │
├─────────────────────────────────────────────────────┤
│ > _ │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Jobs API (port 9003) │
│ POST /api/v1/jobs/graph → Job submission │
│ GET /api/v1/jobs/{id} → Status polling │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Graph Executor │
│ Stages → Operations → Results │
└─────────────────────────────────────────────────────┘
Troubleshooting
"Raw mode is not supported"
This error occurs when running interactive mode without a TTY (e.g., in a pipe or CI). Use test mode instead:
npm run dev -- -t "query"
API Connection Failed
Check that the Jobs API is running:
curl http://127.0.0.1:9003/
Or specify the correct URL:
CBINTEL_API_URL=http://intel.nominate.ai:9003 npm run dev
Template Not Found
List available templates:
npm run dev -- --templates
See Also