Skip to content

Arxchibobo/bobo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ• Bobo CLI

Portable AI Engineering Assistant

npm version License: MIT

An AI-powered CLI assistant with embedded engineering knowledge, a pluggable skill system, persistent memory, and project-aware context β€” designed to be your pair-programming partner in the terminal.

Bobo CLI 介绍


Quick Start

# Install
npm install -g bobo-ai-cli

# Initialize
bobo init
bobo config set apiKey sk-your-anthropic-key

# Start interactive REPL
bobo

# Or run a one-shot prompt
bobo "explain this codebase"

Features

⚑ Claude Code Architecture (v2.1.0)

Bobo CLI v2.1.0 implements advanced AI agent patterns inspired by Claude Code:

  • πŸ” Verification Agent β€” 'Try to break it' philosophy with adversarial testing (build/test/lint + boundary probing)
  • 🎭 Role-Based Sub-Agents β€” Explore (read-only), Plan (strategy), Worker (execution), Verify (validation)
  • πŸ—œοΈ Three-Tier Compression β€” Microcompact (tool result clearing) β†’ Auto-compact (87% threshold + circuit breaker) β†’ Full compact (LLM summary)
  • πŸ›‘οΈ Tool Governance Pipeline β€” Input validation β†’ Risk classification β†’ Permission checks β†’ Execution hooks β†’ Telemetry
  • πŸ’Ύ Cache Boundary Optimization β€” STATIC/DYNAMIC prompt separation for provider caching (Anthropic prompt caching compatible)
  • πŸŒ™ KAIROS Dream Mode β€” Automated memory consolidation (reads logs β†’ LLM distillation β†’ structured insights)

🧠 Knowledge System

9 built-in knowledge files that shape the assistant's behavior and engineering methodology:

File Type Description
system.md always Core identity, work mode, and personality
rules.md always Coding standards, honest reporting, git workflow
agent-directives.md always 10 mechanical override rules (edit safety, context decay, phased execution)
engineering.md on-demand Task routing, search strategies, three-file pattern
error-catalog.md on-demand Top 10 high-frequency error patterns with quick fixes
verification.md on-demand Adversarial verification protocol
task-router.md on-demand Task classification and strategy selection
dream.md on-demand Memory consolidation protocol
advanced-patterns.md on-demand Memory taxonomy, compact protocol, sub-agent architecture

On-demand files are loaded automatically when the user's message matches trigger keywords.

🧩 Skill System

47 skills (2 built-in + 45 importable) covering coding, research, verification, context management, self-improvement, and domain-specific tools:

bobo skill list              # List all skills
bobo skill enable semrush    # Enable a skill
bobo skill disable coding    # Disable a skill
bobo skill import ~/skills/  # Batch import from directory

Core skills (enabled by default):

  • coding β€” Code standards, zero-comment principle, review checklist
  • research β€” Search strategies, information synthesis
  • adversarial-verification β€” Break-it-don't-confirm-it validation
  • context-compressor β€” Nine-section context compression
  • context-budget-analyzer β€” Token usage analysis
  • proactive-self-improving β€” Automatic experience capture and evolution
  • high-agency β€” Sustained motivation and ownership mindset
  • memory-manager β€” Structured long-term memory management
  • deep-research β€” Multi-model deep research with citations

πŸ”§ Tool System

18 tools available to the AI assistant:

Category Tools
File read_file, write_file, edit_file, search_files, list_directory
Shell shell
Memory save_memory, search_memory
Git git_status, git_diff, git_log, git_commit, git_push
Planner create_plan, update_plan, show_plan
Web web_search, web_fetch

πŸ’Ύ Memory System

Persistent memory across sessions with structured categories:

  • user β€” Preferences and habits
  • feedback β€” Corrections and confirmations
  • project β€” Active tasks and goals
  • reference β€” External knowledge not in code
  • experience β€” Lessons learned

Memory is stored in ~/.bobo/memory.md with a 5KB auto-slim cap and daily logs in ~/.bobo/memory/.

πŸ“ Project Awareness

Drop a .bobo/ directory in any project to provide project-specific context:

cd my-project
bobo project init    # Creates .bobo/project.json

Bobo automatically detects and loads AGENTS.md, CLAUDE.md, and CONVENTIONS.md from the project root.

Architecture

bobo CLI v2.1.0 β€” Claude Code-inspired Agent Architecture
β”‚
β”œβ”€β”€ System Prompt Assembly (STATIC/DYNAMIC separation)
β”‚   STATIC (cacheable):
β”‚   β‘  Knowledge (3 always-load + 6 on-demand)
β”‚   β‘‘ Skills (active skill prompts)
β”‚   β‘’ BOBO.md project instructions
β”‚   ━━━━━━━━ DYNAMIC BOUNDARY ━━━━━━━━
β”‚   DYNAMIC (session-specific):
β”‚   β‘£ Memory (persistent user/project/feedback data)
β”‚   β‘€ Project context (.bobo/ + auto-detected files)
β”‚   β‘₯ Environment (CWD + turn count + decay warnings)
β”‚
β”œβ”€β”€ Agent Loop (with governance)
β”‚   β”œβ”€β”€ Streaming responses with tool calls
β”‚   β”œβ”€β”€ Tool Governance Pipeline:
β”‚   β”‚   Input validation β†’ Risk classification β†’ PreToolUse Hook β†’
β”‚   β”‚   Permission check β†’ Execution β†’ PostToolUse Hook β†’ Telemetry
β”‚   β”œβ”€β”€ Three-tier compression:
β”‚   β”‚   60%: Microcompact (clear old tool results)
β”‚   β”‚   87%: Auto-compact (with circuit breaker)
β”‚   β”‚   95%: Full compact (LLM summary)
β”‚   └── Max 20 iterations per turn
β”‚
β”œβ”€β”€ Sub-Agent System (role-based)
β”‚   β”œβ”€β”€ explore  β€” Read-only exploration
β”‚   β”œβ”€β”€ plan     β€” Strategy without execution
β”‚   β”œβ”€β”€ worker   β€” Full tools + anti-recursion
β”‚   └── verify   β€” Adversarial validation
β”‚
β”œβ”€β”€ Verification Agent
β”‚   β”œβ”€β”€ Build/Test/Lint enforcement
β”‚   β”œβ”€β”€ Adversarial probing (boundary tests, API calls)
β”‚   └── Verdict: PASS / FAIL / PARTIAL
β”‚
β”œβ”€β”€ KAIROS Dream Mode
β”‚   β”œβ”€β”€ Auto-trigger: 50+ entries or 24h since last dream
β”‚   β”œβ”€β”€ LLM distillation: Logs β†’ Insights (confidence-scored)
β”‚   └── Memory consolidation: Dedupe + category organization
β”‚
β”œβ”€β”€ Structured Knowledge (advanced)
β”‚   β”œβ”€β”€ knowledge/rules/     β€” 15+ domain rule files
β”‚   β”œβ”€β”€ knowledge/skills/    β€” 140+ structured skill files
β”‚   β”œβ”€β”€ knowledge/workflows/ β€” 6 workflow templates
β”‚   └── knowledge/memory/    β€” Extracted patterns
β”‚
└── CLI Commands
    β”œβ”€β”€ bobo [prompt]        β€” One-shot or REPL mode
    β”œβ”€β”€ bobo config          β€” Configuration management
    β”œβ”€β”€ bobo init            β€” Initialize ~/.bobo/
    β”œβ”€β”€ bobo knowledge       β€” View knowledge base
    β”œβ”€β”€ bobo skill           β€” Skill management
    β”œβ”€β”€ bobo spawn <task>    β€” Background sub-agent (with role)
    β”œβ”€β”€ bobo agents          β€” Manage sub-agents
    β”œβ”€β”€ bobo kb              β€” Structured knowledge search
    β”œβ”€β”€ bobo rules           β€” Browse engineering rules
    β”œβ”€β”€ bobo skills          β€” Structured skill browser
    β”œβ”€β”€ bobo template        β€” Project scaffolding
    └── bobo project         β€” Project configuration

REPL Commands

Command Description
/help Show available commands
/status Session status (model, turns, CWD)
/knowledge List loaded knowledge files
/skills List active skills
/plan Show current task plan
/compact Compress context (nine-section summary)
/dream πŸŒ™ KAIROS memory consolidation (LLM-powered insight extraction)
/verify [task] πŸ” Run verification agent with adversarial testing
/spawn <task> Spawn background sub-agent (with role support)
/agents List all sub-agents and their status
/clear Clear conversation history
/history Show turn count
/quit Exit

Configuration

bobo config set apiKey sk-your-key    # API key (required)
bobo config set model gpt-4o          # Model name
bobo config set baseUrl https://...   # API base URL
bobo config set maxTokens 8192        # Max response tokens
bobo config list                      # Show all config

Configuration is stored in ~/.bobo/config.json. The API key is masked in config list output.

Supported Providers

Bobo CLI uses the OpenAI-compatible API format. It works with:

  • Anthropic (default) β€” baseUrl: https://api.anthropic.com/v1
  • OpenAI β€” baseUrl: https://api.openai.com/v1
  • Azure OpenAI β€” Set your Azure endpoint as baseUrl
  • Any OpenAI-compatible API β€” Ollama, Together, Groq, etc.

Knowledge Customization

Adding custom knowledge

Place .md files in ~/.bobo/knowledge/ β€” they'll be loaded as custom context:

echo "# My Team Standards\n\nAlways use TypeScript strict mode." > ~/.bobo/knowledge/team.md

Importing skills from OpenClaw

If you use OpenClaw, you can import its skills directly:

bobo skill import ~/.openclaw/workspace/skills/

Contributing

Contributions are welcome! Please:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Run tests (npm test)
  4. Ensure the build passes (npm run build)
  5. Submit a PR

Development

git clone https://github.com/Arxchibobo/bobo-cli.git
cd bobo-cli
npm install
npm run dev    # Run with tsx (hot reload)
npm run build  # Compile TypeScript
npm test       # Run tests

License

MIT β€” see LICENSE for details.

About

πŸ• Big Bobbie β€” Portable AI Assistant CLI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors