This repo holds two statusline variants and the config needed to run Claude Code either on a real Anthropic Claude model or on the MiniMax API. This guide is the canonical way to switch between them (and back).
⚠️ Never commit your real API token. The MiniMax setup needs your MiniMax key in~/.claude/settings.json. Keep that key only in your local settings file — it is config, not code, and must stay out of this repo.
Use this when you want Claude Code to run on Claude (Opus/Sonnet/Haiku) via your Anthropic Pro/Max subscription or an Anthropic API key.
-
Remove the MiniMax
envblock from~/.claude/settings.json. That block is what reroutes Claude Code to MiniMax — delete the whole"env": { ... }object that containsANTHROPIC_BASE_URL,ANTHROPIC_AUTH_TOKEN, and theMiniMax-M2.7model overrides. Leave everything else (permissions,hooks,statusLine,enabledPlugins) untouched. -
Install the Claude statusline:
cp claude-statusline/statusline-command.sh ~/.claude/statusline-command.sh chmod +x ~/.claude/statusline-command.sh
-
Restart Claude Code, then authenticate:
- Subscription: run
claude, then/loginand sign in with your Anthropic account. The bottom bar should stop showing "Not logged in". - API key: instead, set
ANTHROPIC_API_KEY(env var or a freshenvblock).
- Subscription: run
-
Verify:
env | grep ANTHROPIC # should NOT show api.minimax.io or MiniMax-M2.7
The statusline model field should read a Claude model (e.g.
Opus 4.8).
See claude-statusline/ for what the Claude statusline shows.
Use this to route Claude Code through MiniMax's Anthropic-compatible API.
-
Add the MiniMax
envblock to~/.claude/settings.json(full instructions and the exact JSON are inminimax-claude-code/). Put your real MiniMax key inANTHROPIC_AUTH_TOKEN. -
Install the MiniMax statusline:
cp minimax-statusline/statusline-command.sh ~/.claude/statusline-command.sh chmod +x ~/.claude/statusline-command.sh
(Requires the
mmxCLI for the quota display; without it the quota segment is just omitted.) -
Restart Claude Code and verify:
env | grep ANTHROPIC # should show api.minimax.io + MiniMax-M2.7
See minimax-statusline/ and
minimax-claude-code/ for details.
| Claude | MiniMax | |
|---|---|---|
| Usage tracking | Native rate_limits (5h / 7d), no extra CLI |
mmx quota (daily / weekly), needs mmx CLI |
| Extra indicator | Effort level (high / xhigh) |
China peak / off-peak hours |
| Shared | folder · branch · context bar · model · cost | same |
Before switching, snapshot your live files so you can roll back exactly:
BK=~/.claude/backups/$(date +%Y-%m-%d)
mkdir -p "$BK"
cp ~/.claude/settings.json "$BK/settings.json.bak"
cp ~/.claude/statusline-command.sh "$BK/statusline-command.bak.sh"Keep that backup folder local — settings.json contains your API token.