Skip to main content

Claude Code Mate (CCM) - A companion tool for Claude Code, enabling flexible LLM integration through LiteLLM proxy.

Project description

Claude Code Mate (CCM)

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. 🤖✨

Installation

# Install with uv
uv pip install claude-code-mate

# Or with pip
pip install claude-code-mate

Usage

$ ccm -h
usage: cccm [-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 --follow --lines 100

This tool manages a LiteLLM proxy running with: litellm --config ~/.claude-code-mate/config.yaml

Quick Start

Start the LiteLLM proxy:

ccm start

Set up the environment variables according to the given 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

Default config (at ~/.claude-code-mate/config.yaml):

litellm_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

You need to update the environment variables if master_key is changed.

Resources

License

MIT

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

claude_code_mate-0.1.0.tar.gz (288.2 kB view details)

Uploaded Source

Built Distribution

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

claude_code_mate-0.1.0-py3-none-any.whl (295.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_code_mate-0.1.0.tar.gz.

File metadata

  • Download URL: claude_code_mate-0.1.0.tar.gz
  • Upload date:
  • Size: 288.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for claude_code_mate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0e2a99a9c3168cb0f56e8bad1a9b77d26264470378d436459f495a4525d1a66
MD5 14c8686c04af88907d68ccf937092dab
BLAKE2b-256 d1e9b88b2bc2a45d2396ace67c2bed2e86252c28a64a6eb1571a4ebe4d784bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_code_mate-0.1.0.tar.gz:

Publisher: ci.yml on RussellLuo/claude-code-mate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_code_mate-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_code_mate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e17a791cd878559151a7ed11974be3da8d301906f04a7ee607bc8c38c77845cf
MD5 0a511db72a44b48ca55c49d58515717a
BLAKE2b-256 9446734444f84d330613cab9a7e9d0600a566d085b2cdc241cf73b96677fa17c

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_code_mate-0.1.0-py3-none-any.whl:

Publisher: ci.yml on RussellLuo/claude-code-mate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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