main
- step_ai_tools: shell ssh non-interactive không load bashrc nên tool cài qua npm/nvm bị miss — tự thêm ~/.local/bin, ~/.npm-global/bin vào PATH và nạp nvm.sh nếu có - Bước 7 mới: kill chrome/chromium headless mồ côi (PPID=1 hoặc systemd --user) kèm crashpad, xóa --user-data-dir dưới /tmp của chúng Co-Authored-By: Claude Code <noreply@anthropic.com>
~/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%