Skip to main content

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
  • Image Paste Support: Paste images directly from clipboard with Ctrl+V - images appear as [image#1] placeholders (macOS supported)
  • 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

Installation

uv pip install ccvibe --sytem

From source

git clone https://github.com/linkedlist771/open-claude-code
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
  • Paste Images: Press Ctrl+V to paste image from clipboard (粘贴图片:按 Ctrl+V 从剪贴板粘贴图片)
  • Clear Images: Press Ctrl+Shift+X to clear all attached images (清除图片:按 Ctrl+Shift+X 清除所有附加的图片)
  • 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.

Metadata

Release files for ccvibe 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccvibe 1.1.4
File Size Uploaded Provenance Actions
ccvibe-1.1.4.tar.gz 271.4 kB Without provenance Details for ccvibe-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ccvibe 1.1.4
File Interpreter ABI Platform Actions
ccvibe-1.1.4-py3-none-any.whl Python 3 none any Details for ccvibe-1.1.4-py3-none-any.whl

Total release size: 447.9 kB

Release files / ccvibe-1.1.4.tar.gz

Download URL ccvibe-1.1.4.tar.gz
Size 271.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f6681618174a4cb90e13ad962d346efbbc76d3c28574db237b46944d9e7f3b
BLAKE2b-256 checksum
How to use checksums
3d96121b11769b01df31282ec5d2e8641b7d48af7c1ebff0e0767d2d0e8558c6
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / ccvibe-1.1.4-py3-none-any.whl

Download URL ccvibe-1.1.4-py3-none-any.whl
Size 176.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0185c2e972ee80e5ac0a596658920bf83139ba716cea4dccdb056bda8e5ca38a
BLAKE2b-256 checksum
How to use checksums
0d757937a8238627be49ff569e3971c7c994281b91e79b60b2e80fcf0bbda2ec
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for ccvibe 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page