You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMM is a multi-model API gateway: By intercepting the BaseURL configuration of code agents, it centralizes all requests and routes them to upstream model providers, supporting ClaudeCode, OpenCode, Codex and other popular code agent tools.
Architecture
Screenshots
Key Features
Multi-model API Gateway: Configure multiple models (each with different API Key, BaseURL, model name), call with a unified ID, and the gateway automatically routes to the correct upstream
Code Agent Integration: Intercept ClaudeCode/OpenCode/Codex's BaseURL configuration to centralize their requests through the CMM gateway
Dual Protocol Support: Compatible with OpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Codex (/v1/responses) protocols
Web Admin Interface: Visual configuration for models and ClaudeCode settings management
Startup Service: Support for macOS/Linux/Windows system service installation
Quick Start
# Install
npm install -g @asathinkeroops/cmm
# Install global auto-start service
cmm install
# Open configuration page to configure models
cmm config
Usage
# Show help
cmm --help
# Install startup service
cmm install
# Uninstall startup service
cmm uninstall
# View current configuration
cmm config
# View service status
cmm status
Build from source
go install github.com/asathinkeroops/cmm@latest
API Endpoints
Model Management
Method
Path
Description
GET
/cmm/models
Get model list
GET
/cmm/models/:id
Get specific model
POST
/cmm/models
Create model
PUT
/cmm/models/:id
Update model
DELETE
/cmm/models/:id
Delete model
DELETE
/cmm/models
Clear all models
ClaudeCode Configuration
Method
Path
Description
GET
/cmm/claudecode
Get full ClaudeCode settings
PUT
/cmm/claudecode
Update full ClaudeCode settings
GET
/cmm/claudecode/env
Get ClaudeCode env variables
PUT
/cmm/claudecode/env
Update ClaudeCode env variables
API Proxy
Method
Path
Description
POST
/v1/chat/completions
OpenAI protocol proxy
POST
/v1/messages
Anthropic protocol proxy
POST
/v1/messages/count_tokens
Anthropic count_tokens proxy
POST
/v1/responses
Codex protocol proxy
Admin Interface
Method
Path
Description
GET
/admin
Web admin interface
GET
/admin/*
SPA routing support
Development
Requirements
Go 1.26+
Node.js 18+ (for frontend development)
Common Commands
# Run the program
go run .# Start server
go run . serve
# Build
go build -o cmm .# Add new subcommand
cobra-cli add <command-name># Frontend developmentcd frontend
pnpm install
pnpm dev
# Frontend build
pnpm build
CMM is a multi-model API gateway: By intercepting the BaseURL configuration of code agents, it centralizes all requests and routes them to upstream model providers, supporting ClaudeCode, OpenCode, Codex and other popular code agent tools.