Skip to main content

AI-powered terminal assistant for coding tasks

Project description

Ripperdoc

an open-source, extensible AI coding agent that runs in your terminal

GitHub stars

Ripperdoc is a powerful, extensible AI coding agent that runs directly in your terminal. Inspired by tools like Claude Code, Aider, and Goose, Ripperdoc helps you write code, refactor projects, execute shell commands, and manage files through natural language conversations.

What Makes Ripperdoc Different?

  • 🔌 Model Agnostic - Works with Anthropic Claude, OpenAI, Google Gemini, DeepSeek, and any OpenAI-compatible API
  • 🎣 Extensible Architecture - 30+ built-in tools with hooks system for custom workflows
  • 🤖 Multi-Agent Coordination - Built-in task graph and team collaboration for complex workflows
  • 📚 Skill System - Load capability bundles on-demand (PDF, Excel, PowerPoint, custom languages)
  • 🔌 MCP Integration - First-class Model Context Protocol server support
  • 🛡️ Safe by Default - Permission system with configurable rules and hooks
  • 🎨 Beautiful UI - Rich terminal interface with themes, syntax highlighting, and interactive TUIs
  • ⚡ Background Tasks - Run long-running commands asynchronously with real-time monitoring

中文文档 | Contributing | Documentation

Core Features

🛠️ Powerful Tool System

  • Built-in Tools - File operations (Read, Write, Edit, NotebookEdit), code search (Grep, Glob, LSP, LS), shell execution (Bash with foreground/background modes), subagent delegation, task graph, MCP integration, and more
  • Jupyter Support - Direct .ipynb notebook editing with cell manipulation
  • Background Tasks - Run commands asynchronously with real-time monitoring and status tracking

🤖 Multi-Agent Architecture

  • Task Graph System - Persistent task management with dependencies, blockers, and ownership
  • Team Coordination - Multi-agent collaboration with structured messaging and coordination
  • Specialized Subagents - Built-in agents for code review, exploration, planning, and test generation

🔌 Extensibility

  • Skill System - Load SKILL.md bundles to extend capabilities (PDF, Excel, PowerPoint, custom languages)
  • Hooks System - Execute custom scripts at lifecycle events with decision control
  • Custom Commands - Define reusable slash commands with parameter substitution
  • MCP Integration - Connect to Model Context Protocol servers for extended capabilities

🎨 User Experience

  • Rich Terminal UI - Beautiful interface with syntax highlighting and progress indicators
  • Theme Support - Customizable color schemes and styling options
  • Interactive TUIs - Terminal UIs for managing agents, models, permissions, and hooks
  • Safe Mode - Permission prompts with configurable rules for dangerous operations

💾 Session Management

  • Persistent History - Full conversation history with search and replay
  • Session Forking - Create branches from any conversation state
  • Usage Tracking - Monitor token usage and costs across sessions

Installation

Quick Install

pip install git+https://github.com/quantmew/ripperdoc.git

From Source

git clone https://github.com/quantmew/ripperdoc.git
cd ripperdoc
pip install -e .

Development Setup

# Install with development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy ripperdoc

# Code formatting
black ripperdoc

# Linting
ruff ripperdoc

Quick Start

Launch Interactive Session

ripperdoc

Command-Line Options

ripperdoc [OPTIONS]

Options:

  • --yolo - Skip permission prompts (safe mode is on by default)
  • --model <model_name> - Specify model (e.g., claude-sonnet-4-20250514, gpt-4o)
  • --tools <tool_list> - Filter available tools (comma-separated, or "" for none)
  • --no-mcp - Disable MCP server integration
  • --verbose - Enable verbose logging
  • --theme <theme_name> - Set UI theme

Environment Variables:

  • RIPPERDOC_ENABLE_TASKS=false - Use legacy Todo tools instead of Task Graph
  • RIPPERDOC_TASK_LIST_ID - Force a shared Task Graph list ID across sessions
  • RIPPERDOC_MODEL - Default model to use
  • RIPPERDOC_TEMPERATURE - Default temperature (0.0-2.0)
  • RIPPERDOC_API_KEY - API key for configured provider
  • RIPPERDOC_CONFIG_DIR - Override where user-level Ripperdoc config/data are stored
  • RIPPERDOC_AUTOCOMPACT_PCT_OVERRIDE - Override auto-compaction trigger percentage (1-100, capped at default threshold)
  • RIPPERDOC_TMPDIR - Override internal temp root; Ripperdoc uses <this-path>/ripperdoc/
  • RIPPERDOC_EXIT_AFTER_STOP_DELAY - In stdio/SDK mode, auto-exit after this many milliseconds of runtime idleness (positive integer only)
  • RIPPERDOC_REMOTE_CONTROL_BASE_URL - Remote Control control-plane base URL (used by ripperdoc remote-control)
  • RIPPERDOC_REMOTE_CONTROL_ACCESS_TOKEN - Bearer token for Remote Control control-plane API
  • RIPPERDOC_REMOTE_CONTROL_INGRESS_URL - Optional override for session-ingress host (defaults to base URL)
  • ENABLE_TOOL_SEARCH - Controls deferred MCP tool search mode: auto (default, on at 10% context), auto:N, true, false

Task Graph scope behavior:

  • By default, task lists are session-scoped (new session starts clean; resume/continue keeps the same tasks)
  • Set RIPPERDOC_TASK_LIST_ID to intentionally share one task list across sessions

Remote Control Bridge

Run a local bridge process that accepts remote work and spawns ripperdoc --sdk-url sessions:

export RIPPERDOC_REMOTE_CONTROL_BASE_URL="https://your-remote-control-host"
export RIPPERDOC_REMOTE_CONTROL_ACCESS_TOKEN="your-access-token"
ripperdoc remote-control

Basic Usage Examples

Code Analysis:

> Can you explain what this function does?
> Find all references to the `parse_config` function

File Operations:

> Read the main.py file and suggest improvements
> Create a new component called UserProfile.tsx
> Update all imports to use the new package structure

Code Generation:

> Create a new Python script that implements a REST API client
> Generate unit tests for the auth module
> Add error handling to the database connection code

Advanced Features

Skills System

Extend Ripperdoc with reusable Skill bundles stored in SKILL.md files:

Skill Locations:

  • ~/.ripperdoc/skills/<skill-name>/SKILL.md (personal skills)
  • .ripperdoc/skills/<skill-name>/SKILL.md (project-specific, can be committed to git)

Skill Frontmatter:

---
name: pdf-processing
description: Comprehensive PDF manipulation toolkit
allowed-tools: Read, Write, Bash
argument-hint: "<input-file>"
arguments: [input_file]
when-to-use: Use when user asks for PDF extraction or transforms
version: 1.0.0
user-invocable: true
model: claude-sonnet-4-20250514
max-thinking-tokens: 20000
context: fork
agent: explore
paths: docs/**, src/**
---

Hooks System

Execute custom scripts at lifecycle events with decision control:

Hook Events:

  • PreToolUse - Before tool execution (can block/modify)
  • PostToolUse - After successful tool execution
  • PostToolUseFailure - After tool execution failure
  • PermissionRequest - When permission is requested
  • UserPromptSubmit - When user submits input
  • SessionStart/End - Session lifecycle
  • SubagentStart/Stop - Subagent lifecycle

Hook Configuration:

{
  "hooks": [
    {
      "event": "PreToolUse",
      "command": "npm run lint",
      "blocking": true,
      "include_tools": ["Write", "Edit"]
    }
  ]
}

MCP Integration

Ripperdoc supports the Model Context Protocol for extending capabilities:

# List available MCP servers
> /mcp

# Query MCP resources
> What MCP servers are available?
> Query the context7 documentation for React hooks

Custom Commands

Define reusable slash commands with parameter substitution:

Command File: .ripperdoc/commands/deploy.md

---
description: Deploy application to production
---

Deploying $ARGUMENTS to production...

!`npm run build && npm run deploy`

Usage: /deploy my-feature-branch

Slash Commands

Ripperdoc provides powerful slash commands for session management:

Session Commands:

  • /exit - Exit the session
  • /clear - Clear conversation history
  • /compact - Compact conversation history
  • /fork - Create new session branch from current state
  • /resume - Resume a previous session
  • /rewind - Rewind conversation to a previous state
  • /rename - Rename current session
  • /copy - Copy last assistant response to clipboard
  • /export - Export conversation to file or clipboard

Configuration Commands:

  • /config - Manage configuration
  • /models - Manage model providers
  • /tools - View available tools
  • /permissions - Manage permission rules
  • /hooks - Manage hooks configuration
  • /themes - Change UI theme
  • /output_language - Set output language
  • /output_style - Set output style
  • /oauth - Manage OAuth tokens
  • /plugins - Manage plugin configuration

Information Commands:

  • /help - Show help information
  • /status - Show session status
  • /stats - Show usage statistics
  • /cost - Show cost tracking
  • /doctor - Run system diagnostics

Feature Commands:

  • /skills - List available skills
  • /agents - Manage subagents
  • /tasks - Task graph management
  • /todos - Legacy todo management
  • /commands - List custom commands
  • /context - Manage context
  • /memory - Manage memory
  • /mcp - MCP server management
  • /add_dir - Add additional working directories
  • /btw - Ask a quick side question without interrupting the main conversation

Project Navigation

> Show me all the Python files in the project
> Find where the user authentication logic is implemented
> List all API endpoints in the project
> Explain the architecture of this codebase

Background Tasks

> Run the tests in the background
> Start the dev server and monitor its output
> Check status of background tasks

Architecture

Core Components

  • CLI Layer (ripperdoc/cli/) - Terminal interface, UI components, command handlers
  • Core Layer (ripperdoc/core/) - Agent definitions, configuration, hooks, providers
  • Tools Layer (ripperdoc/tools/) - Built-in tools for file operations, code analysis, orchestration, and more
  • Protocol Layer (ripperdoc/protocol/) - Stdio protocol handler for SDK communication
  • Utils Layer (ripperdoc/utils/) - Shared utilities for logging, permissions, file operations

Tool Categories

File Operations:

  • Read - Read file contents with optional offset/limit
  • Write - Create new files or overwrite existing
  • Edit - Replace exact string matches in files
  • NotebookEdit - Edit Jupyter notebook cells

Code Analysis:

  • Grep - Search code using regex patterns
  • Glob - File pattern matching
  • LSP - Language Server Protocol integration
  • LS - List files and directories

Shell Operations:

  • Bash - Execute shell commands (foreground & background)
  • TaskStop - Stop background tasks
  • Sleep - Pause execution without blocking other tools

Agent & Orchestration:

  • Agent - Delegate to specialized subagents
  • TaskCreate/Update/Get/List - Task graph management
  • TeamCreate/Delete - Multi-agent team coordination
  • SendMessage - Inter-agent messaging

Planning & Isolation:

  • EnterPlanMode/ExitPlanMode - Structured planning workflow
  • EnterWorktree/ExitWorktree - Isolated worktree environment

Extensibility:

  • Skill - Load skill bundles on-demand
  • ToolSearch - Discover and activate tools
  • AskUserQuestion - Interactive user prompts

MCP Integration:

  • ListMcpServers/Resources - List MCP servers and resources
  • ReadMcpResource - Read MCP resource content
  • mcp__<server>__authenticate - Dynamic MCP server authentication tools

Management:

  • TodoRead/TodoWrite - Legacy todo management

Supported Providers

  • Anthropic - Claude 3.5 Sonnet, Claude 3 Opus, Haiku
  • OpenAI - GPT-4, GPT-4 Turbo, GPT-3.5
  • Google - Gemini Pro, Gemini Flash
  • DeepSeek - DeepSeek Coder, DeepSeek Chat
  • Custom - Any OpenAI-compatible API

Development

Project Structure

ripperdoc/
├── cli/              # CLI interface and UI components
├── core/             # Core functionality and configuration
│   ├── hooks/        # Hooks system implementation
│   ├── providers/    # LLM provider implementations
│   └── query/        # Query processing loop
├── tools/            # Built-in tool implementations
├── protocol/         # Stdio protocol handler
│   └── stdio/        # Protocol implementation
├── utils/            # Utility functions
└── data/             # Model pricing and context data

Testing

# Run all tests
pytest

# Run specific test file
pytest tests/test_bash_tool.py

# Run with coverage
pytest --cov=ripperdoc

Code Quality

# Type checking
mypy ripperdoc

# Code formatting
black ripperdoc

# Linting
ruff check ripperdoc

# Format with Black
black ripperdoc

Configuration

Config File Location

  • ~/.ripperdoc/config.json - User-level configuration
  • .ripperdoc/config.json - Project-level configuration (overrides user config)

Example Configuration

{
  "model": "claude-sonnet-4-20250514",
  "temperature": 1.0,
  "api_key": "your-api-key",
  "permission_rules": {
    "Bash": {
      "rule": "ask",
      "commands": ["rm -rf", "sudo", ">:"]
    }
  },
  "hooks": {
    "hooks": [
      {
        "event": "PreToolUse",
        "command": "npm run lint",
        "blocking": true
      }
    ]
  },
  "theme": "default",
  "enable_tasks": true
}

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

Changelog

See CHANGELOG.md for version history and updates.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Key License Terms

  • ✅ Commercial Use
  • ✅ Distribution
  • ✅ Modification
  • ✅ Patent Grant
  • ✅ Private Use
  • ✅ Sublicensing
  • ❌ Trademark Use

Acknowledgments

Inspired by and built with ideas from:

  • Claude Code - Anthropic's official CLI
  • aider - AI pair programming tool
  • Goose - Extensible AI assistant
  • Cursor - AI-powered code editor

Resources


Made with ❤️ by the Ripperdoc team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ripperdoc-0.6.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ripperdoc-0.6.2-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file ripperdoc-0.6.2.tar.gz.

File metadata

  • Download URL: ripperdoc-0.6.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ripperdoc-0.6.2.tar.gz
Algorithm Hash digest
SHA256 9fee070ee1ea5e8c6ca7662f73f6964173629b30172c0a0d8b1c247feb433673
MD5 1b48ea6f195c3e3d46b5cec945737b83
BLAKE2b-256 55975e3f16fd47c07dce30adf4b71262b90136194af7a0341630c0118ad79031

See more details on using hashes here.

File details

Details for the file ripperdoc-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: ripperdoc-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ripperdoc-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 557411d56f01cbbc0febbffba814217c11eb44ac809306e5b00d8a092aba507b
MD5 ba825f451ec826f19e16d3aac6211726
BLAKE2b-256 14b86c1fe419e36b1e29bdc6fce062775293a51344cf5ab17abdaebaa3e2e6bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page