diff --git a/hyperstack/README.md b/hyperstack/README.md index a7d8eca5..7829ff7e 100644 --- a/hyperstack/README.md +++ b/hyperstack/README.md @@ -57,6 +57,9 @@ bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hy # Codex on Hyperstack bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hyperstack/codex.sh) +# Open Interpreter on Hyperstack +bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hyperstack/interpreter.sh) + # Gemini CLI on Hyperstack bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hyperstack/gemini.sh) ``` diff --git a/hyperstack/interpreter.sh b/hyperstack/interpreter.sh new file mode 100644 index 00000000..fba8c79b --- /dev/null +++ b/hyperstack/interpreter.sh @@ -0,0 +1,50 @@ +#!/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/hyperstack/lib/common.sh)" +fi + +log_info "Open Interpreter on Hyperstack" +echo "" + +ensure_hyperstack_api_key +ensure_ssh_key + +VM_NAME=$(get_vm_name) +ENVIRONMENT=$(get_environment_name) + +create_vm "$VM_NAME" "$ENVIRONMENT" +verify_server_connectivity "$HYPERSTACK_VM_IP" + +log_warn "Installing Python and pip..." +run_server "$HYPERSTACK_VM_IP" "apt-get update && apt-get install -y python3 python3-pip" + +log_warn "Installing Open Interpreter..." +run_server "$HYPERSTACK_VM_IP" "pip3 install open-interpreter --break-system-packages 2>/dev/null || pip3 install open-interpreter" + +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..." +run_server "$HYPERSTACK_VM_IP" "cat >> ~/.bashrc << 'ENVEOF' +export OPENROUTER_API_KEY=${OPENROUTER_API_KEY} +export OPENAI_API_KEY=${OPENROUTER_API_KEY} +export OPENAI_BASE_URL=https://openrouter.ai/api/v1 +ENVEOF" + +echo "" +log_info "Hyperstack VM setup completed successfully!" +echo "" + +log_warn "Starting Open Interpreter..." +sleep 1 +clear +interactive_session "$HYPERSTACK_VM_IP" "bash -c 'source ~/.bashrc && interpreter'" diff --git a/manifest.json b/manifest.json index 378ef499..8e2d7adf 100644 --- a/manifest.json +++ b/manifest.json @@ -919,7 +919,7 @@ "hyperstack/aider": "implemented", "hyperstack/goose": "implemented", "hyperstack/codex": "implemented", - "hyperstack/interpreter": "missing", + "hyperstack/interpreter": "implemented", "hyperstack/gemini": "implemented", "hyperstack/amazonq": "missing", "hyperstack/cline": "missing",