From 637aa401e6ffdd85e8e930b9f047094ce4e415bf Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:24:53 -0800 Subject: [PATCH] feat: Add kilocode on Northflank (#271) Agent: gap-filler Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 --- manifest.json | 2 +- northflank/kilocode.sh | 55 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 northflank/kilocode.sh diff --git a/manifest.json b/manifest.json index 642edca6..4416cd71 100644 --- a/manifest.json +++ b/manifest.json @@ -1073,7 +1073,7 @@ "northflank/gptme": "implemented", "northflank/opencode": "missing", "northflank/plandex": "missing", - "northflank/kilocode": "missing", + "northflank/kilocode": "implemented", "railway/claude": "implemented", "railway/openclaw": "implemented", "railway/nanoclaw": "implemented", diff --git a/northflank/kilocode.sh b/northflank/kilocode.sh new file mode 100644 index 00000000..2cff468d --- /dev/null +++ b/northflank/kilocode.sh @@ -0,0 +1,55 @@ +#!/bin/bash +set -eo pipefail + +# Source common functions - local or remote fallback +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/northflank/lib/common.sh)" +fi + +log_info "Kilo Code on Northflank" +echo "" + +ensure_northflank_cli +ensure_northflank_token + +SERVICE_NAME=$(get_server_name) +PROJECT_NAME=$(get_project_name) + +create_server "${SERVICE_NAME}" +wait_for_cloud_init + +log_warn "Installing Kilo Code..." +run_server "curl -fsSL https://bun.sh/install | bash && export PATH=\"\$HOME/.bun/bin:\$PATH\" && bun install -g @kilocode/cli" + +# Verify installation +if ! run_server "command -v kilocode &> /dev/null"; then + log_error "kilocode installation verification failed" + log_error "The 'kilocode' command is not available" + exit 1 +fi +log_info "Kilo Code installation verified successfully" + +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_northflank \ + "KILO_PROVIDER_TYPE=openrouter" \ + "KILO_OPEN_ROUTER_API_KEY=${OPENROUTER_API_KEY}" \ + "OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" + +echo "" +log_info "Northflank service setup completed successfully!" +echo "" + +log_warn "Starting Kilo Code..." +sleep 1 +clear +interactive_session "source ~/.bashrc && kilocode"