claude-glm-wrapper
v3.0.5
Published
Cross-platform wrapper for Claude Code with Z.AI GLM models (Bun Edition)
Downloads
68
Readme
Claude-GLM Wrapper (ccx)
📢 Community Fork Notice
This is an actively maintained community fork of the original claude-glm-wrapper. Now rewritten in Bun for 10x speed and single-binary simplicity.
Install via:
bunx claude-glm-wrapperor download the binary.
Use Z.AI's GLM models, Minimax, OpenAI, and more with Claude Code.
One Binary. Zero Friction.
Why ccx?
🚀 10x Faster: Native binary (written in Bun/TypeScript), starts instantly.
📦 Single Binary: No more "wrapper hell". One ccx executable handles everything.
🛡️ Safe & Clean: No more eval in shell scripts. Configs stored safely in ~/.config.
🔀 Multi-Provider: Switch between GLM, Minimax, OpenAI, Gemini, and Claude instantly.
🩺 Self-Healing: Includes a doctor command to diagnose and fix configuration issues automatically.
Quick Start
Installation
If you have Bun:
bunx claude-glm-wrapper setupManual Download (Mac/Linux/Windows):
- Download the latest release from GitHub Releases.
- Run
./ccx setup(or.\ccx.exe setupon Windows).
Setup Wizard
Run ccx setup to:
- Configure your API keys (Z.AI, Minimax, OpenAI, etc.).
- Install shell aliases (
cc,ccg,ccm...) automatically. - Verify your Claude Code installation.
Usage
Commands
| Command | Action |
|---------|--------|
| ccx | Run Claude Code with your default model (e.g. GLM-4.7) |
| ccx setup | Run the interactive setup wizard |
| ccx config | Open configuration file |
| ccx doctor | Run self-diagnostics to check API keys, paths, and dependencies |
| ccx update | Update to the latest version |
| ccx --model=gpt-4o | Run with a specific model override |
Aliases (Optional)
If you enabled aliases during setup:
| Alias | Equivalent Command |
|-------|-------------------|
| cc | claude (Standard Anthropic) |
| ccg | ccx --model=glm-4.7 |
| ccg45 | ccx --model=glm-4.5 |
| ccf | ccx --model=glm-4.5-air |
| ccm | ccx --model=MiniMax-M2.1 |
Multi-Provider Proxy
ccx automatically acts as a local proxy. You can use ANY supported provider by specifying the prefix:
ccx --model=openai:gpt-4o
ccx --model=gemini:gemini-1.5-pro
ccx --model=minimax:MiniMax-M2.1Or switch in-session using Claude's slash command:
/model openai:gpt-4o
Auto-Discovery (Zero Config)
ccx is smart! It automatically detects API keys in your environment variables, so you might not even need to run setup.
Supported variables:
ZAI_API_KEYorGLM_API_KEYMINIMAX_API_KEYOPENAI_API_KEYANTHROPIC_API_KEYGEMINI_API_KEYOPENROUTER_API_KEY
Configuration
Config is stored in ~/.config/claude-glm/config.json.
You can edit it with ccx config.
{
"zaiApiKey": "sk-...",
"minimaxApiKey": "...",
"providers": {
"openai": { "apiKey": "sk-..." }
},
"defaults": {
"model": "glm-4.7"
}
}Troubleshooting
"ccx: command not found" Ensure the binary is in your PATH, or that you've run the setup which helps install aliases.
"Error: 'claude' command not found"
Run ccx doctor or ccx setup — it will offer to install Claude Code for you automatically!
License
MIT
