BZZAI Helper
Switch between Zai API and Anthropic Default in Claude Code with TUI Menu
Quick Start (npx)
No installation required - run directly:
npx bzzai-helper
nano ~/.zai/env.sh
npx bzzai-helper
npx bzzai-helper on
npx bzzai-helper off
npx bzzai-helper status
Manual Install
git clone https://github.com/Natthaphan/bzzai.git ~/bzzai
cd ~/bzzai
echo 'export PATH="$PATH:~/bzzai/bin"' >> ~/.zshrc
source ~/.zshrc
bzzai on
bzzai off
bzzai status
bzzai menu
API Key Configuration
Create ~/.zai/env.sh (auto-created on first run):
mkdir -p ~/.zai
nano ~/.zai/env.sh
ZAI_AUTH_TOKEN="your-api-key-here"
ZAI_BASE_URL="https://api.z.ai/api/anthropic"
ZAI_TIMEOUT_MS="3000000"
ZAI_DEBUG="0"
Important: Avoid Signature Errors ⚠️
When switching from Zai back to Anthropic, you may encounter:
Invalid signature in thinking block
Solution: Run /compact or /clear in Claude Code before switching.
/compact
/clear
Anthropic → Zai (bzzai on) | No |
Zai → Anthropic (bzzai off) | Yes |
╔═════════════════════════════════╗
║ BZZAI Toggle Menu ║
╚═════════════════════════════════╝
Status: [OFF] Zai DISABLED
─────────────────────────────────────
> Enable Zai Switch to Zai API
Disable Zai Switch back to Anthropic
Check Status Show current status
Edit Config Edit API config
Quit Exit
↑↓ Navigate Enter Select q Quit
License
MIT