feat: Add kilocode scripts for hetzner, digitalocean, vultr, linode, lambda, aws-lightsail, gcp (#114)

Agent: gap-filler

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
A 2026-02-09 19:46:21 -08:00 committed by GitHub
parent 086bc76c8d
commit fc48279ecb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 384 additions and 7 deletions

62
aws-lightsail/kilocode.sh Normal file
View file

@ -0,0 +1,62 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
# Source common functions - try local file first, fall back to remote
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=aws-lightsail/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/aws-lightsail/lib/common.sh)"
fi
log_info "Kilo Code on AWS Lightsail"
echo ""
# 1. Ensure AWS CLI is configured
ensure_aws_cli
# 2. Generate + register SSH key
ensure_ssh_key
# 3. Get instance name and create server
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
# 4. Wait for SSH and cloud-init
verify_server_connectivity "${LIGHTSAIL_SERVER_IP}"
wait_for_cloud_init "${LIGHTSAIL_SERVER_IP}" 60
# 5. Install Kilo Code
log_warn "Installing Kilo Code..."
run_server "${LIGHTSAIL_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
# 6. Get OpenRouter API key
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
# 7. Inject environment variables into ~/.zshrc
log_warn "Setting up environment variables..."
inject_env_vars_ssh "${LIGHTSAIL_INSTANCE_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "Lightsail instance setup completed successfully!"
log_info "Instance: ${SERVER_NAME} (IP: ${LIGHTSAIL_SERVER_IP})"
echo ""
# 8. Start Kilo Code interactively
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${LIGHTSAIL_SERVER_IP}" "source ~/.zshrc && kilocode"

51
digitalocean/kilocode.sh Normal file
View file

@ -0,0 +1,51 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=digitalocean/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/digitalocean/lib/common.sh)"
fi
log_info "Kilo Code on DigitalOcean"
echo ""
ensure_do_token
ensure_ssh_key
DROPLET_NAME=$(get_server_name)
create_server "${DROPLET_NAME}"
verify_server_connectivity "${DO_SERVER_IP}"
wait_for_cloud_init "${DO_SERVER_IP}" 60
log_warn "Installing Kilo Code..."
run_server "${DO_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
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_ssh "${DO_SERVER_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "DigitalOcean droplet setup completed successfully!"
log_info "Droplet: ${DROPLET_NAME} (ID: ${DO_DROPLET_ID}, IP: ${DO_SERVER_IP})"
echo ""
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${DO_SERVER_IP}" "source ~/.zshrc && kilocode"

65
gcp/kilocode.sh Normal file
View file

@ -0,0 +1,65 @@
#!/bin/bash
set -eo pipefail
# Source common functions - try local file first, fall back to remote
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=gcp/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/gcp/lib/common.sh)"
fi
# Variables exported by create_server() in lib/common.sh
# shellcheck disable=SC2154
: "${GCP_SERVER_IP:?}" "${GCP_INSTANCE_NAME_ACTUAL:?}" "${GCP_ZONE:?}"
log_info "Kilo Code on GCP Compute Engine"
echo ""
# 1. Ensure gcloud is configured
ensure_gcloud
# 2. Generate + register SSH key
ensure_ssh_key
# 3. Get server name and create server
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
# 4. Wait for SSH and cloud-init
verify_server_connectivity "${GCP_SERVER_IP}"
wait_for_cloud_init "${GCP_SERVER_IP}" 60
# 5. Install Kilo Code
log_warn "Installing Kilo Code..."
run_server "${GCP_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
# 6. Get OpenRouter API key
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
# 7. Inject environment variables into ~/.zshrc
log_warn "Setting up environment variables..."
inject_env_vars_ssh "${GCP_SERVER_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "GCP instance setup completed successfully!"
log_info "Instance: ${GCP_INSTANCE_NAME_ACTUAL} (Zone: ${GCP_ZONE}, IP: ${GCP_SERVER_IP})"
echo ""
# 8. Start Kilo Code interactively
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${GCP_SERVER_IP}" "source ~/.zshrc && kilocode"

51
hetzner/kilocode.sh Normal file
View file

@ -0,0 +1,51 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=hetzner/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hetzner/lib/common.sh)"
fi
log_info "Kilo Code on Hetzner Cloud"
echo ""
ensure_hcloud_token
ensure_ssh_key
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
verify_server_connectivity "${HETZNER_SERVER_IP}"
wait_for_cloud_init "${HETZNER_SERVER_IP}" 60
log_warn "Installing Kilo Code..."
run_server "${HETZNER_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
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_ssh "${HETZNER_SERVER_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "Hetzner server setup completed successfully!"
log_info "Server: ${SERVER_NAME} (ID: ${HETZNER_SERVER_ID}, IP: ${HETZNER_SERVER_IP})"
echo ""
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${HETZNER_SERVER_IP}" "source ~/.zshrc && kilocode"

62
lambda/kilocode.sh Normal file
View file

@ -0,0 +1,62 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
# Source common functions - try local file first, fall back to remote
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=lambda/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/lambda/lib/common.sh)"
fi
log_info "Kilo Code on Lambda Cloud"
echo ""
# 1. Ensure Lambda API key is configured
ensure_lambda_token
# 2. Generate + register SSH key
ensure_ssh_key
# 3. Get instance name and create server
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
# 4. Wait for SSH and cloud-init
verify_server_connectivity "${LAMBDA_SERVER_IP}"
wait_for_cloud_init "${LAMBDA_SERVER_IP}"
# 5. Install Kilo Code
log_warn "Installing Kilo Code..."
run_server "${LAMBDA_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
# 6. Get OpenRouter API key
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
# 7. Inject environment variables into ~/.zshrc
log_warn "Setting up environment variables..."
inject_env_vars_ssh "${LAMBDA_INSTANCE_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "Lambda Cloud instance setup completed successfully!"
log_info "Instance: ${SERVER_NAME} (IP: ${LAMBDA_SERVER_IP})"
echo ""
# 8. Start Kilo Code interactively
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${LAMBDA_SERVER_IP}" "source ~/.zshrc && kilocode"

35
linode/kilocode.sh Normal file
View file

@ -0,0 +1,35 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=linode/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then source "${SCRIPT_DIR}/lib/common.sh"
else eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/linode/lib/common.sh)"; fi
log_info "Kilo Code on Linode"
echo ""
ensure_linode_token
ensure_ssh_key
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
verify_server_connectivity "${LINODE_SERVER_IP}"
wait_for_cloud_init "${LINODE_SERVER_IP}" 60
log_warn "Installing Kilo Code..."
run_server "${LINODE_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
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_ssh "${LINODE_SERVER_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "Linode setup completed successfully!"
echo ""
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${LINODE_SERVER_IP}" "source ~/.zshrc && kilocode"

View file

@ -819,13 +819,13 @@
"kamatera/opencode": "implemented",
"kamatera/plandex": "implemented",
"sprite/kilocode": "implemented",
"hetzner/kilocode": "missing",
"digitalocean/kilocode": "missing",
"vultr/kilocode": "missing",
"linode/kilocode": "missing",
"lambda/kilocode": "missing",
"aws-lightsail/kilocode": "missing",
"gcp/kilocode": "missing",
"hetzner/kilocode": "implemented",
"digitalocean/kilocode": "implemented",
"vultr/kilocode": "implemented",
"linode/kilocode": "implemented",
"lambda/kilocode": "implemented",
"aws-lightsail/kilocode": "implemented",
"gcp/kilocode": "implemented",
"e2b/kilocode": "implemented",
"modal/kilocode": "implemented",
"fly/kilocode": "implemented",

51
vultr/kilocode.sh Normal file
View file

@ -0,0 +1,51 @@
#!/bin/bash
# shellcheck disable=SC2154
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
# shellcheck source=vultr/lib/common.sh
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
source "${SCRIPT_DIR}/lib/common.sh"
else
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/vultr/lib/common.sh)"
fi
log_info "Kilo Code on Vultr"
echo ""
ensure_vultr_token
ensure_ssh_key
SERVER_NAME=$(get_server_name)
create_server "${SERVER_NAME}"
verify_server_connectivity "${VULTR_SERVER_IP}"
wait_for_cloud_init "${VULTR_SERVER_IP}" 60
log_warn "Installing Kilo Code..."
run_server "${VULTR_SERVER_IP}" "npm install -g @kilocode/cli"
log_info "Kilo Code installed"
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_ssh "${VULTR_SERVER_IP}" upload_file run_server \
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
"KILO_PROVIDER_TYPE=openrouter" \
"KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}"
echo ""
log_info "Vultr instance setup completed successfully!"
log_info "Server: ${SERVER_NAME} (ID: ${VULTR_SERVER_ID}, IP: ${VULTR_SERVER_IP})"
echo ""
log_warn "Starting Kilo Code..."
sleep 1
clear
interactive_session "${VULTR_SERVER_IP}" "source ~/.zshrc && kilocode"