ProxyCLI / proxy
kek
Fresh start: Go 1.23 + go-git/v5 compatibility
f606b10
#!/bin/bash
# CLIProxyAPIPlus Quick Access Script
# Usage: ./proxy <command>
BASE_URL="http://localhost:8317/v1"
API_KEY="sk-client-key-1"
case "$1" in
models|m)
echo "πŸ“‹ Available Models:"
curl -s -H "Authorization: Bearer $API_KEY" "$BASE_URL/models" | jq -r '.data[].id'
;;
test|t)
echo "πŸ§ͺ Testing Proxy..."
curl -s -H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-2.5-pro","messages":[{"role":"user","content":"Hello from CLIProxyAPIPlus!"}]}' \
"$BASE_URL/chat/completions" | jq -r '.choices[0].message.content'
;;
status|s)
echo "πŸ” Server Status:"
curl -s http://localhost:8317/ | jq .
;;
auth|a)
echo "πŸ”‘ Configured Accounts:"
ls -lh ~/.cli-proxy-api/
;;
logs|l)
echo "πŸ“ Recent Logs:"
tail -30 ~/CLIProxyAPIPlus/server.log
;;
start)
echo "▢️ Starting CLIProxyAPIPlus..."
cd ~/CLIProxyAPIPlus && nohup ./cli-proxy-api-plus -config config.yaml > server.log 2>&1 &
sleep 2
echo "βœ… Server started on http://localhost:8317"
;;
stop)
echo "⏹️ Stopping CLIProxyAPIPlus..."
killall cli-proxy-api-plus
echo "βœ… Server stopped"
;;
restart|r)
echo "πŸ”„ Restarting CLIProxyAPIPlus..."
~/CLIProxyAPIPlus/proxy stop
sleep 2
~/CLIProxyAPIPlus/proxy start
;;
*)
echo "CLIProxyAPIPlus Quick Access"
echo ""
echo "Commands:"
echo " models|m - List available models"
echo " test|t - Send test request"
echo " status|s - Check server status"
echo " auth|a - Show configured accounts"
echo " logs|l - View recent logs"
echo " start - Start proxy server"
echo " stop - Stop proxy server"
echo " restart|r - Restart proxy server"
echo ""
echo "Examples:"
echo " ~/CLIProxyAPIPlus/proxy models"
echo " ~/CLIProxyAPIPlus/proxy test"
echo " ~/CLIProxyAPIPlus/proxy auth"
;;
esac