mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-22 11:24:18 +00:00
feat: Implement fly/continue.sh script (#334)
Adds Continue CLI support on Fly.io by combining Fly.io's Machines API primitives with Continue's setup steps. Includes OpenRouter config injection via ~/.continue/config.json. Agent: gap-filler-fly-continue Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9e774d431e
commit
769510ec14
2 changed files with 59 additions and 1 deletions
58
fly/continue.sh
Normal file
58
fly/continue.sh
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
if [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/lib/common.sh" ]]; then
|
||||
source "$SCRIPT_DIR/lib/common.sh"
|
||||
else
|
||||
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/fly/lib/common.sh)"
|
||||
fi
|
||||
|
||||
log_info "Continue on Fly.io"
|
||||
echo ""
|
||||
|
||||
ensure_fly_cli
|
||||
ensure_fly_token
|
||||
|
||||
SERVER_NAME=$(get_server_name)
|
||||
create_server "${SERVER_NAME}"
|
||||
wait_for_cloud_init
|
||||
|
||||
log_warn "Installing Continue CLI..."
|
||||
run_server "npm install -g @continuedev/cli"
|
||||
|
||||
echo ""
|
||||
if [[ -n "${OPENROUTER_API_KEY:-}" ]]; then
|
||||
log_info "Using OpenRouter API key from environment"
|
||||
else
|
||||
OPENROUTER_API_KEY=$(get_openrouter_api_key_oauth 5180)
|
||||
fi
|
||||
|
||||
log_warn "Setting up environment variables..."
|
||||
inject_env_vars_fly \
|
||||
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}"
|
||||
|
||||
log_warn "Creating Continue config file..."
|
||||
run_server "mkdir -p ~/.continue"
|
||||
run_server "cat > ~/.continue/config.json << 'EOF'
|
||||
{
|
||||
\"models\": [
|
||||
{
|
||||
\"title\": \"OpenRouter\",
|
||||
\"provider\": \"openrouter\",
|
||||
\"model\": \"openrouter/auto\",
|
||||
\"apiBase\": \"https://openrouter.ai/api/v1\",
|
||||
\"apiKey\": \"${OPENROUTER_API_KEY}\"
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF"
|
||||
|
||||
echo ""
|
||||
log_info "Fly.io setup completed successfully!"
|
||||
echo ""
|
||||
|
||||
log_warn "Starting Continue CLI in TUI mode..."
|
||||
sleep 1
|
||||
clear
|
||||
interactive_session "source ~/.zshrc && cn"
|
||||
|
|
@ -1006,7 +1006,7 @@
|
|||
"github-codespaces/continue": "implemented",
|
||||
"e2b/continue": "implemented",
|
||||
"modal/continue": "implemented",
|
||||
"fly/continue": "missing",
|
||||
"fly/continue": "implemented",
|
||||
"civo/continue": "missing",
|
||||
"scaleway/continue": "implemented",
|
||||
"daytona/continue": "missing",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue