Claude Code Mate (CCM) - A companion tool for Claude Code, enabling flexible LLM integration through LiteLLM proxy.
Project description
Claude Code Mate
A companion tool for Claude Code, enabling flexible LLM integration through LiteLLM proxy.
The code (as well as the README) of Claude Code Mate is mainly vibe coded by Claude Code, with some adjustments and enhancements made by the author. 🤖✨
中文博客:轻松解锁Claude Code:国内用户的多元模型新玩法。
Installation
# Install with uv
uv pip install --system claude-code-mate
# Or with pip
pip install claude-code-mate
Or with Admin UI enabled (only support Python 3.9-3.12 for now):
# Install with uv
uv pip install --system --python 3.12 "claude-code-mate[ui]"
# Or with pip
pip install "claude-code-mate[ui]"
Usage
$ ccm -h
usage: ccm [-h] {start,stop,restart,status,logs} ...
A companion tool for Claude Code, enabling flexible LLM integration through LiteLLM proxy.
positional arguments:
{start,stop,restart,status,logs}
Available commands
start Start the LiteLLM proxy in background
stop Stop the running LiteLLM proxy
restart Restart the LiteLLM proxy
status Show current proxy status
logs Show proxy logs
options:
-h, --help show this help message and exit
Examples:
ccm start
ccm stop
ccm restart
ccm status
ccm logs
ccm logs -f -n 100
This tool manages a LiteLLM proxy running with: litellm --config ~/.claude-code-mate/config.yaml
Quick Start
Start the LiteLLM proxy:
export OPENROUTER_API_KEY=your-api-key
ccm start
Set up the environment variables according to the output instructions:
export ANTHROPIC_BASE_URL=http://0.0.0.0:4000
export ANTHROPIC_AUTH_TOKEN=sk-1234567890
Then run Claude Code with your desired model:
claude --model claude-3.5-haiku
Configuration
UI disabled (YAML-based)
Default config (at ~/.claude-code-mate/config.yaml):
general_settings:
master_key: sk-1234567890
model_list:
- model_name: claude-3.5-haiku
litellm_params:
model: openrouter/anthropic/claude-3.5-haiku
api_key: os.environ/OPENROUTER_API_KEY
api_base: https://openrouter.ai/api/v1
Edit the config as needed, then restart the proxy to apply changes:
ccm restart
Note that you need to update the environment variables if master_key is changed.
UI enabled (UI-based)
If you find it cumbersome to manually edit the config file, you can use the Admin UI.
[!NOTE] The models configured in
~/.claude-code-mate/config.yamlare considered static in the UI: they cannot be edited or deleted via the UI. For better experience, it's recommended to configure all models via the UI if you like to use the UI.
Admin UI
If you installed Claude Code Mate with Admin UI enabled, you can access the UI for model management and usage tracking:
ccm ui
[!NOTE] The default username and password are
adminandsk-1234567890(i.e., themaster_key) respectively.
Model Management
Usage Tracking
For more details, please check out LiteLLM Proxy - Admin UI.
Resources
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_code_mate-0.2.0.tar.gz.
File metadata
- Download URL: claude_code_mate-0.2.0.tar.gz
- Upload date:
- Size: 807.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfd41e0e9c4f1e45f085d8f236f389f2dc2c92db77cdd8ceb82178e734e751ed
|
|
| MD5 |
b46604afb8e027b609c1965e91d30b4c
|
|
| BLAKE2b-256 |
1034590a7bb40fdc7d450cecc4983e7dc02c36b78ec9eaba1db16a6921cb6fee
|
Provenance
The following attestation bundles were made for claude_code_mate-0.2.0.tar.gz:
Publisher:
ci.yml on RussellLuo/claude-code-mate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_mate-0.2.0.tar.gz -
Subject digest:
dfd41e0e9c4f1e45f085d8f236f389f2dc2c92db77cdd8ceb82178e734e751ed - Sigstore transparency entry: 543151914
- Sigstore integration time:
-
Permalink:
RussellLuo/claude-code-mate@2ac48134bb7125eaff3d2c4f10e180487375e4cd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/RussellLuo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2ac48134bb7125eaff3d2c4f10e180487375e4cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_code_mate-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claude_code_mate-0.2.0-py3-none-any.whl
- Upload date:
- Size: 815.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c251a1f9fc07926f172a6aec2b74345b7f208177086fa35ec7548c83e94bf86b
|
|
| MD5 |
5ea7925ea92847e5f1e78f2816ef41f9
|
|
| BLAKE2b-256 |
92e94ea9cfc26eeed7ed2c15196e34c6eba783471b97e2dea5dc66f366765d56
|
Provenance
The following attestation bundles were made for claude_code_mate-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on RussellLuo/claude-code-mate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_mate-0.2.0-py3-none-any.whl -
Subject digest:
c251a1f9fc07926f172a6aec2b74345b7f208177086fa35ec7548c83e94bf86b - Sigstore transparency entry: 543151932
- Sigstore integration time:
-
Permalink:
RussellLuo/claude-code-mate@2ac48134bb7125eaff3d2c4f10e180487375e4cd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/RussellLuo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2ac48134bb7125eaff3d2c4f10e180487375e4cd -
Trigger Event:
push
-
Statement type: