main
~/bin — Custom CLI Utilities
Environment Variables
All scripts accept environment variables as the primary credential source. If set, the secret store (macOS Keychain / Linux libsecret) is skipped.
| Variable | Used by | Description |
|---|---|---|
GLM_API_KEY |
claude-glm, glm-quota |
Zhipu AI (GLM) API key |
TK_AI_API_TOKEN |
claude-tk, ask |
TK AI API token |
Precedence
- Environment variable (if set, used directly)
- Secret store (macOS Keychain via
security, or Linuxsecret-tool) - Error if neither source provides a value
Usage Examples
# Override for a single invocation
GLM_API_KEY=xxx claude-glm
# Export for the session
export TK_AI_API_TOKEN=xxx
ask "how to find large files"
Secret Store Setup
macOS (Keychain):
security add-generic-password -a "$USER" -s GLM_API_KEY -w "YOUR_KEY"
security add-generic-password -a "$USER" -s TK_AI_API_TOKEN -w "YOUR_KEY"
Linux / Arch (libsecret):
echo "YOUR_KEY" | secret-tool store --label "GLM API Key" service GLM_API_KEY
echo "YOUR_KEY" | secret-tool store --label "AI API Token" service TK_AI_API_TOKEN
Languages
Shell
100%