Skip to main content

Open source CLI coding agent powered by Claude

Project description

Open Claude Code

Python Version License

 ██████╗ ██████╗ ███████╗███╗   ██╗     ██████╗██╗      █████╗ ██╗   ██╗██████╗ ███████╗
██╔═══██╗██╔══██╗██╔════╝████╗  ██║    ██╔════╝██║     ██╔══██╗██║   ██║██╔══██╗██╔════╝
██║   ██║██████╔╝█████╗  ██╔██╗ ██║    ██║     ██║     ███████║██║   ██║██║  ██║█████╗
██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║    ██║     ██║     ██╔══██║██║   ██║██║  ██║██╔══╝
╚██████╔╝██║     ███████╗██║ ╚████║    ╚██████╗███████╗██║  ██║╚██████╔╝██████╔╝███████╗
 ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝     ╚═════╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
                               ██████╗ ██████╗ ██████╗ ███████╗
                              ██╔════╝██╔═══██╗██╔══██╗██╔════╝
                              ██║     ██║   ██║██║  ██║█████╗
                              ██║     ██║   ██║██║  ██║██╔══╝
                              ╚██████╗╚██████╔╝██████╔╝███████╗
                               ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝

An open-source CLI coding assistant that reproduces Claude Code with full transparency.

🔄 This project is a fork of Mistral Vibe, modified to be fully compatible with Anthropic's Claude API format. Our goal is to provide an open-source alternative that lets you see exactly how an AI coding assistant works under the hood.

Why Open Claude Code?

While Claude Code is a powerful coding assistant, it operates as a closed-source tool. Open Claude Code aims to:

  • 🔓 Full Transparency: See exactly how the AI assistant processes your requests, makes tool calls, and generates responses
  • 📖 Streaming Output: Support streaming ouput, you don't have to wait for serveral minutes in claude code terminal without any feedback due the non-streaming
  • 🔌 Claude API Compatible: Native support for Anthropic's /v1/messages API format, including streaming
  • 🛠️ Extensible: Add custom tools, providers, and configurations
  • 🌐 Provider Flexibility: Use Anthropic's API directly, or configure custom endpoints (proxies, self-hosted models)
  • 📖 Learn by Doing: Understand how agentic AI coding assistants work by examining the source code

Key Features

  • Native Anthropic API Support: First-class support for Claude models via Anthropic's native API format
  • Multi-Provider Architecture: Supports OpenAI-compatible APIs, Anthropic, and custom providers
  • Interactive Chat: A conversational AI agent that understands your requests and breaks down complex tasks
  • Powerful Toolset:
    • Read, write, and patch files (read_file, write_file, search_replace)
    • Execute shell commands in a stateful terminal (bash)
    • Recursively search code with grep (with ripgrep support)
    • Manage a todo list to track the agent's work
  • Project-Aware Context: Automatically scans your project's file structure and Git status
  • Advanced CLI Experience: Autocompletion, persistent history, beautiful themes
  • Safety First: Tool execution approval system

[!WARNING] Works on Windows, but we officially support and target UNIX environments.

Installation

Using uv (recommended)

uv tool install claude-vibe

Using pip

pip install claude-vibe

From source

git clone https://github.com/anthropics/open-claude-code.git
cd open-claude-code
uv sync
uv run ccvibe

Quick Start

  1. Navigate to your project's root directory:

    cd /path/to/your/project
    
  2. Run Open Claude Code:

    ccvibe
    
  3. If this is your first time running, it will:

    • Create a default configuration file at ~/.vibe/config.toml
    • Prompt you to enter your API key
    • Prompt you to configure the API base URL (for custom endpoints)
    • Save your settings for future use
  4. Start interacting with the agent!

Configuration

Provider Configuration

Open Claude Code supports multiple API providers. Configure them in ~/.vibe/config.toml:

# Anthropic (Claude) - Native API support
[[providers]]
name = "anthropic"
api_base = "https://api.anthropic.com"
api_key_env_var = "ANTHROPIC_API_KEY"
api_base_env_var = "ANTHROPIC_API_BASE"  # Optional: override via environment
api_style = "anthropic"  # Use native Anthropic API format
backend = "generic"

# OpenAI-compatible provider
[[providers]]
name = "openai"
api_base = "https://api.openai.com/v1"
api_key_env_var = "OPENAI_API_KEY"
api_style = "openai"
backend = "generic"

# Custom endpoint (e.g., proxy or self-hosted)
[[providers]]
name = "custom"
api_base = "https://your-proxy.example.com"
api_key_env_var = "CUSTOM_API_KEY"
api_style = "anthropic"  # or "openai" depending on the API format
backend = "generic"

API Styles

  • anthropic: Native Anthropic /v1/messages API format with full streaming support
  • openai: OpenAI-compatible /chat/completions format

API Key Configuration

  1. Interactive Setup: Run ccvibe and follow the prompts
  2. Environment Variables:
    export ANTHROPIC_API_KEY="your_api_key"
    export ANTHROPIC_API_BASE="https://your-custom-endpoint.com"  # Optional
    
  3. .env File: Create ~/.vibe/.env:
    ANTHROPIC_API_KEY=your_api_key
    ANTHROPIC_API_BASE=https://your-custom-endpoint.com
    

Model Configuration

[[models]]
name = "claude-sonnet-4-5-20250929"
provider = "anthropic"
alias = "claude-sonnet-4-5"
input_price = 3.0
output_price = 15.0

# Set the active model
active_model = "claude-sonnet-4-5"

Usage

Interactive Mode

ccvibe
  • Multi-line Input: Press Ctrl+J or Shift+Enter
  • File Paths: Reference files with @ (e.g., @src/main.py)
  • Shell Commands: Prefix with ! to bypass the agent (e.g., !ls -l)

Programmatic Mode

ccvibe --prompt "Refactor the main function to be more modular."

With Auto-Approve

ccvibe --auto-approve "Fix all linting errors in the project"

Architecture

Open Claude Code uses a modular adapter pattern for API communication:

┌─────────────────────────────────────────────────────────┐
│                    Open Claude Code                      │
├─────────────────────────────────────────────────────────┤
│                     Agent Core                           │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐     │
│  │   Tools     │  │   Context   │  │   History   │     │
│  └─────────────┘  └─────────────┘  └─────────────┘     │
├─────────────────────────────────────────────────────────┤
│                   Backend Layer                          │
│  ┌─────────────────────┐  ┌─────────────────────┐      │
│  │  Anthropic Adapter  │  │   OpenAI Adapter    │      │
│  │  (/v1/messages)     │  │ (/chat/completions) │      │
│  └─────────────────────┘  └─────────────────────┘      │
├─────────────────────────────────────────────────────────┤
│                   Provider Config                        │
│         api_base, api_key, api_style, etc.              │
└─────────────────────────────────────────────────────────┘

MCP Server Support

Extend capabilities with Model Context Protocol servers:

[[mcp_servers]]
name = "fetch_server"
transport = "stdio"
command = "uvx"
args = ["mcp-server-fetch"]

Custom Tools

Add custom tools by placing Python files in ~/.vibe/tools/:

from vibe.core.tools.base import BaseTool, BaseToolConfig

class MyCustomTool(BaseTool):
    name = "my_tool"
    description = "Does something useful"

    async def execute(self, **kwargs):
        # Your implementation
        pass

Acknowledgments

This project is based on Mistral Vibe by Mistral AI. We thank them for open-sourcing their work, which made this project possible.

License

Copyright 2025 Mistral AI (original work) Copyright 2025 Open Claude Code Contributors (modifications)

Licensed under the Apache License, Version 2.0. See LICENSE for details.

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

ccvibe-1.1.3.tar.gz (266.2 kB view details)

Uploaded Source

Built Distribution

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

ccvibe-1.1.3-py3-none-any.whl (171.3 kB view details)

Uploaded Python 3

File details

Details for the file ccvibe-1.1.3.tar.gz.

File metadata

  • Download URL: ccvibe-1.1.3.tar.gz
  • Upload date:
  • Size: 266.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ccvibe-1.1.3.tar.gz
Algorithm Hash digest
SHA256 d37d1b38b5474b37e78fe5d0972aad7b9e16ac2fa887fbb28e94b8c1b29e9a6b
MD5 de6970e4560cd6eeaf43b44d7e1f10b2
BLAKE2b-256 a9c469994e761c4f0276fde0ea6a0b4dce38b5576463a904bd5e9cf493513799

See more details on using hashes here.

File details

Details for the file ccvibe-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: ccvibe-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 171.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ccvibe-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71e1cd1ca802ca27dc6a0a7e373774cd9a116daa32dc2b7fea47ca791756028b
MD5 0e60d19fe74807c67b51d7a5f17dfb3d
BLAKE2b-256 4aae1fbc0440c394edbc67a2650d58ea7dd1781fcb1ae1e9442477c457339d31

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