mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-22 11:24:18 +00:00
feat: Add Gemini CLI and Amazon Q CLI on OVHcloud (#121)
Implement ovh/gemini.sh and ovh/amazonq.sh using OVH primitives. Both scripts provision an OVHcloud instance, install the agent, inject OpenRouter credentials, and launch an interactive session. Agent: gap-filler-3 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:
parent
c302bc010d
commit
9b4cb00a40
4 changed files with 117 additions and 2 deletions
|
|
@ -799,8 +799,8 @@
|
|||
"ovh/nanoclaw": "implemented",
|
||||
"ovh/goose": "missing",
|
||||
"ovh/interpreter": "missing",
|
||||
"ovh/gemini": "missing",
|
||||
"ovh/amazonq": "missing",
|
||||
"ovh/gemini": "implemented",
|
||||
"ovh/amazonq": "implemented",
|
||||
"ovh/cline": "missing",
|
||||
"ovh/gptme": "missing",
|
||||
"ovh/opencode": "missing",
|
||||
|
|
|
|||
|
|
@ -61,6 +61,18 @@ bash <(curl -fsSL https://openrouter.ai/lab/spawn/ovh/nanoclaw.sh)
|
|||
bash <(curl -fsSL https://openrouter.ai/lab/spawn/ovh/codex.sh)
|
||||
```
|
||||
|
||||
#### Gemini CLI
|
||||
|
||||
```bash
|
||||
bash <(curl -fsSL https://openrouter.ai/lab/spawn/ovh/gemini.sh)
|
||||
```
|
||||
|
||||
#### Amazon Q CLI
|
||||
|
||||
```bash
|
||||
bash <(curl -fsSL https://openrouter.ai/lab/spawn/ovh/amazonq.sh)
|
||||
```
|
||||
|
||||
## Non-Interactive Mode
|
||||
|
||||
```bash
|
||||
|
|
|
|||
51
ovh/amazonq.sh
Normal file
51
ovh/amazonq.sh
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
# shellcheck source=ovh/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/ovh/lib/common.sh)"
|
||||
fi
|
||||
|
||||
log_info "Amazon Q CLI on OVHcloud"
|
||||
echo ""
|
||||
|
||||
ensure_ovh_authenticated
|
||||
ensure_ssh_key
|
||||
|
||||
SERVER_NAME=$(get_server_name)
|
||||
create_ovh_instance "${SERVER_NAME}"
|
||||
wait_for_ovh_instance "${OVH_INSTANCE_ID}"
|
||||
verify_server_connectivity "${OVH_SERVER_IP}"
|
||||
|
||||
# Install base dependencies
|
||||
install_base_deps "${OVH_SERVER_IP}"
|
||||
|
||||
log_warn "Installing Amazon Q CLI..."
|
||||
run_ovh "${OVH_SERVER_IP}" "curl -fsSL https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q-cli-install.sh | bash"
|
||||
log_info "Amazon Q CLI 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_ovh "${OVH_SERVER_IP}" \
|
||||
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_BASE_URL=https://openrouter.ai/api/v1"
|
||||
|
||||
echo ""
|
||||
log_info "OVHcloud instance setup completed successfully!"
|
||||
log_info "Instance: ${SERVER_NAME} (ID: ${OVH_INSTANCE_ID}, IP: ${OVH_SERVER_IP})"
|
||||
echo ""
|
||||
|
||||
log_warn "Starting Amazon Q CLI..."
|
||||
sleep 1
|
||||
clear
|
||||
interactive_session "${OVH_SERVER_IP}" "source ~/.zshrc && q chat"
|
||||
52
ovh/gemini.sh
Normal file
52
ovh/gemini.sh
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
# shellcheck source=ovh/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/ovh/lib/common.sh)"
|
||||
fi
|
||||
|
||||
log_info "Gemini CLI on OVHcloud"
|
||||
echo ""
|
||||
|
||||
ensure_ovh_authenticated
|
||||
ensure_ssh_key
|
||||
|
||||
SERVER_NAME=$(get_server_name)
|
||||
create_ovh_instance "${SERVER_NAME}"
|
||||
wait_for_ovh_instance "${OVH_INSTANCE_ID}"
|
||||
verify_server_connectivity "${OVH_SERVER_IP}"
|
||||
|
||||
# Install base dependencies
|
||||
install_base_deps "${OVH_SERVER_IP}"
|
||||
|
||||
log_warn "Installing Gemini CLI..."
|
||||
run_ovh "${OVH_SERVER_IP}" "npm install -g @google/gemini-cli"
|
||||
log_info "Gemini CLI 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_ovh "${OVH_SERVER_IP}" \
|
||||
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"GEMINI_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_BASE_URL=https://openrouter.ai/api/v1"
|
||||
|
||||
echo ""
|
||||
log_info "OVHcloud instance setup completed successfully!"
|
||||
log_info "Instance: ${SERVER_NAME} (ID: ${OVH_INSTANCE_ID}, IP: ${OVH_SERVER_IP})"
|
||||
echo ""
|
||||
|
||||
log_warn "Starting Gemini CLI..."
|
||||
sleep 1
|
||||
clear
|
||||
interactive_session "${OVH_SERVER_IP}" "source ~/.zshrc && gemini"
|
||||
Loading…
Add table
Add a link
Reference in a new issue