Skip to content

iuhoay/claude-code-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Bridge (ccb)

A tool for switching between different Claude Code service providers.

Features

  • Switch between multiple Claude Code providers with a simple command
  • Interactive provider selection menu
  • Support for custom API endpoints and authentication
  • Environment variable management for different providers

Installation

Homebrew (recommended)

brew tap iuhoay/claude-code-bridge
brew install claude-code-bridge

Manual

  1. Make the ccb script executable:

    chmod +x ccb
  2. Move it to your PATH (optional):

    mv ccb /usr/local/bin/

Configuration

Create a configuration file at ~/.config/claude_code_bridge/providers.json:

{
  "providers": {
    "anthropic": {
      "name": "Anthropic Official",
      "description": "Uses Claude Code's default configuration, no environment variables needed"
    },
    "z_ai": {
      "name": "Z.AI",
      "base_url": "https://api.z.ai/api/anthropic",
      "auth_token": "your_z_ai_token_here",
      "model": "GLM-4.5",
      "small_model": "GLM-4.5-X"
    }
  }
}

Usage

Interactive selection

ccb

Direct provider selection

ccb anthropic
ccb z_ai --help

Show help

ccb --help

Requirements

  • jq for JSON parsing
  • Claude Code installed

Environment Variables

  • CCB_CONFIG_DIR: Configuration directory (default: ~/.config/claude_code_bridge)
  • CCB_CONFIG_FILE: Configuration file path (default: $CCB_CONFIG_DIR/providers.json)

About

Claude Code Bridge - Switch between different Claude Code service providers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages