When experiencing various large models, managing configurations for different AI
platforms (securely storing API keys) becomes a burden.
However, if you use home-manager to manage dotfiles like me (which ensures
consistent software and configuration across multiple devices),
I recommend encrypting API keys with age and mounting the decrypted tokens as
files during rebuild.
Then use pkgs.writeShellScriptBin
to wrap the original commands and configure
the corresponding environment variables.
Usage
# Run claude-code with subscription
claude
# Run claude-code with ZhiPu's large model
zhipu
# Temporarily run claude-code with ZhiPu's fast model
ANTHROPIC_MODEL=glm-4.5-x zhipu