bzzai-helper
v1.0.4
Published
Toggle Zai API for Claude Code via TUI Menu
Maintainers
Readme
BZZAI Helper
Switch between Zai API and Anthropic Default in Claude Code with TUI Menu
Quick Start (npx)
No installation required - run directly:
# First run - creates config file automatically
npx bzzai-helper
# Edit API key
nano ~/.zai/env.sh
# Usage
npx bzzai-helper # Open TUI menu
npx bzzai-helper on # Enable Zai
npx bzzai-helper off # Disable Zai
npx bzzai-helper status # Check statusManual Install
# Clone repo
git clone https://github.com/Natthaphan/bzzai.git ~/bzzai
cd ~/bzzai
# Add to PATH
echo 'export PATH="$PATH:~/bzzai/bin"' >> ~/.zshrc
source ~/.zshrc
# Usage
bzzai on
bzzai off
bzzai status
bzzai menuAPI Key Configuration
Create ~/.zai/env.sh (auto-created on first run):
mkdir -p ~/.zai
nano ~/.zai/env.shZAI_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 blockSolution: Run /compact or /clear in Claude Code before switching.
# Before running: bzzai off
/compact
# or
/clear| Switch Path | Need /compact? |
|------------|----------------|
| Anthropic → Zai (bzzai on) | No |
| Zai → Anthropic (bzzai off) | Yes |
TUI Menu
╔═════════════════════════════════╗
║ 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 QuitLicense
MIT
