Add backend launcher scripts and refresh cleanup utility
Introduce claude-glm and claude-tk wrappers with secure keychain token lookup and backend model defaults, and replace cleanup.sh with the updated cleanup script entrypoint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# claude-gpt — Run Claude Code with GPT backend
|
||||
#
|
||||
# Usage:
|
||||
# claude-gpt [args...]
|
||||
#
|
||||
# Setup API key (reuse existing):
|
||||
# macOS:
|
||||
# security add-generic-password -a "$USER" -s TK_AI_API_TOKEN -w "YOUR_KEY"
|
||||
# Linux:
|
||||
# echo "YOUR_KEY" | secret-tool store --label "AI API Token" service TK_AI_API_TOKEN
|
||||
|
||||
KEY_NAME="TK_AI_API_TOKEN"
|
||||
|
||||
get_token() {
|
||||
if command -v security >/dev/null 2>&1; then
|
||||
security find-generic-password -s "$KEY_NAME" -w 2>/dev/null && return
|
||||
fi
|
||||
if command -v secret-tool >/dev/null 2>&1; then
|
||||
secret-tool lookup service "$KEY_NAME" 2>/dev/null && return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
TOKEN=$(get_token)
|
||||
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "❌ Missing GPT token ($KEY_NAME)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export ANTHROPIC_BASE_URL="https://ai.acbpro.com"
|
||||
export ANTHROPIC_AUTH_TOKEN="$TOKEN"
|
||||
export ANTHROPIC_DEFAULT_OPUS_MODEL="gpt-5.3-codex(high)"
|
||||
export ANTHROPIC_DEFAULT_SONNET_MODEL="gpt-5.3-codex(medium)"
|
||||
export ANTHROPIC_DEFAULT_HAIKU_MODEL="gpt-5.3-codex(medium)"
|
||||
|
||||
echo "→ Backend: GPT"
|
||||
|
||||
exec claude "$@"
|
||||
Reference in New Issue
Block a user