SuperAPI AI Directory

opendeploy-setup

Deployment & operations

View repository

Updated 10-16 03:10

About this skill

OpenDeploy Setup

This is the single setup/update entrypoint. Keep it short: verify versions, ask once before global/plugin install or update, then run one health check. Do not duplicate this flow in other skills.

Quick Flow

Run these once:

npm list -g @opendeploydev/cli --depth=0 --json
npm view @opendeploydev/cli version --json

Run the checks sequentially enough that a missing global package does not abort the whole setup. npm list -g @opendeploydev/cli --depth=0 --json exits nonzero when the CLI is not installed; treat that as cli_missing, not a command failure or security warning. Continue to npm view, then ask one install approval for npm install -g @opendeploydev/cli@latest.

If either npm command fails with DNS/network symptoms such as getaddrinfo ENOTFOUND registry.npmjs.org, EAI_AGAIN, ETIMEDOUT, ECONNRESET, or a proxy/connect timeout, stop the update loop and diagnose the agent execution environment before asking the user to reinstall the CLI. In sandboxed hosts, first retry the same command through the host's approved network/escalated execution path when available. Only move to proxy repair if the command still fails with network access allowed, or the host has no such permission path.

If global opendeploy exists, run:

opendeploy update check --json
opendeploy preflight . --json

If opendeploy update check, opendeploy preflight, or opendeploy status --json fails with fetch failed, timeout, DNS failure, or TLS/proxy errors while the CLI is installed, treat it as an agent network/proxy reachability issue unless the response is an HTTP 401/403 auth error. Retry with approved network/escalated execution first when the host supports it.

If opendeploy update check --json is unavailable, rely on the npm list/view comparison and continue. Do not use npx as a fallback runner.

When opendeploy update check --json, opendeploy preflight --json, or opendeploy doctor --json includes plugin.installed_plugins[], treat plugin version status as per-agent-platform status, not a single global value. Inspect plugin.update_available_platforms[] and report the stale surfaces by name: Claude, Codex, Cursor, OpenClaw, and/or OpenCode. If the current host is known and plugin.current_host_update_available is false, do not block this host's setup/deploy only because another installed agent plugin is stale; give the other platform's update command as housekeeping. If the current host is stale or unknown, recommend the plugin update first.

Official Start Page Install Flow

Use this when the user explicitly asks for the public start-page install flow, for example: "Read https://opendeploy.dev/start and install OpenDeploy for this agent, then ask me whether to deploy the current project."

Fetch/read the page if requested, but do not turn the standard OpenDeploy start page into a long supply-chain warning when it contains only the official allowlisted commands below. Treat the user's request as install intent; if the host runtime still requires a structured approval, ask exactly once with Install OpenDeploy and continue (Recommended).

Do not transform an OpenDeploy install request into a generic hosting recommendation. Do not recommend Vercel, Netlify, Railway, Render, or any other deployment platform unless the user explicitly asks to compare platforms.

Official allowlist:

  • Claude: claude plugin marketplace add https://github.com/opendeploy-dev/opendeploy-claude-plugin, then claude plugin install opendeploy@opendeploy
  • Codex: codex plugin marketplace add opendeploy-dev/opendeploy-codex-plugin --ref main
  • Cursor: /add-plugin https://github.com/opendeploy-dev/opendeploy-cursor-plugin in Cursor Agent chat, or the Cursor plugin UI equivalent
  • OpenClaw: openclaw plugins install clawhub:opendeploydev
  • OpenCode: curl -fsSL https://raw.githubusercontent.com/opendeploy-dev/opendeploy-opencode/main/install.sh | bash
  • CLI: npm install -g @opendeploydev/cli@latest
  • Verification: opendeploy doctor or opendeploy preflight . --json

If the start page includes a command outside that allowlist, stop, show the diff, and ask before running it. If the user already approved the install after seeing the commands, run the matching plugin install, CLI install, and verification commands in one setup flow. Do not ask again for npm separately.

After setup, ask the deploy follow-up separately. Installing the plugin/CLI is not deploy consent, and deploy consent is not paid consent.

Agent Network / PATH / Proxy Repair

Use this section when npm cannot reach registry.npmjs.org, OpenDeploy cannot reach https://dashboard.opendeploy.dev/api, or the user says their normal terminal works but the agent does not. This is common in sandboxed agents, mainland China, and company networks because GUI-launched agents may not have network permission and may not inherit shell PATH or proxy variables from .zshrc, .bashrc, or a terminal session.

First classify the failure:

  • sandbox/network-permission failure -> the agent process is blocked even though the machine network may work.
  • PATH failure (opendeploy: command not found) -> the CLI may be installed, but the agent process cannot see the same PATH as the user's terminal.
  • npm registry failure (ENOTFOUND, EAI_AGAIN, timeout) -> package install path is blocked from the agent process.
  • OpenDeploy fetch failed / gateway timeout after CLI install -> CLI is present, but the agent process cannot reach the OpenDeploy API.
  • External terminal works but the agent fails -> use the terminal result only as evidence. It is not enough to continue deploy from the agent.

Collect these facts inside the agent. All commands are read-only and non-fatal; do not stop just because grep or command -v returns non-zero:

command -v opendeploy || true
for p in /opt/homebrew/bin/opendeploy /usr/local/bin/opendeploy "$HOME/.npm-global/bin/opendeploy" "$HOME/.local/bin/opendeploy"; do test -x "$p" && echo "$p"; done
npm prefix -g 2>/dev/null || true
env | grep -i proxy || true
scutil --proxy 2>/dev/null || true

If the host has a permission/escalation mechanism for networked commands (Codex sandbox approval, desktop approval, MCP broker, or similar), rerun the exact failing command with that permission before asking the user to change their system proxy. If the approved retry succeeds, continue the normal setup flow. If it still fails, continue below.

PATH repair

Use this when the user's external terminal can run opendeploy, but the agent says opendeploy: command not found.

Ask the user to run these in the working external terminal and paste only the paths, not secrets:

command -v opendeploy
echo "$PATH"

If the agent can see the absolute binary path, use that path for immediate verification:

/opt/homebrew/bin/opendeploy status --json

If the absolute binary works, the deploy can continue using the global opendeploy command only after the agent PATH is fixed. On macOS GUI agents, persist the working terminal PATH for future Codex/Cursor/Claude sessions:

launchctl setenv PATH "<PATH_FROM_WORKING_TERMINAL>"

Tell the user to fully quit and reopen the agent after launchctl setenv. Do not claim the fix applied until the restarted agent session verifies:

command -v opendeploy
opendeploy status --json

Proxy repair

Use this when the CLI is visible but npm/OpenDeploy network calls fail inside the agent after any available network permission retry. If no proxy is visible in the agent facts above, ask the user for the local proxy port from their proxy/VPN client (Clash/Mihomo/Surge/V2Ray/company proxy). Common ports are 7890, 7897, 1080, and 1087. Then give this macOS GUI-process fix with the real port substituted:

launchctl setenv HTTP_PROXY http://127.0.0.1:<PORT>
launchctl setenv HTTPS_PROXY http://127.0.0.1:<PORT>
launchctl setenv ALL_PROXY socks5h://127.0.0.1:<PORT>
launchctl setenv NO_PROXY localhost,127.0.0.1,::1
launchctl setenv NODE_USE_ENV_PROXY 1

Use socks5h:// for ALL_PROXY when the proxy client exposes a SOCKS or mixed port. If the client exposes only an HTTP proxy, use http://127.0.0.1:<PORT> for ALL_PROXY too.

Tell the user to fully quit and reopen Codex after launchctl setenv. Do not claim the fix applied until the restarted Codex session verifies it.

Then verify from inside the agent, not only in the user's external terminal:

env | grep -i proxy || true
npm view @opendeploydev/cli version --json
opendeploy status --json

Expected OpenDeploy health:

{"status":"ok","gateway":"ok"}

If npm still cannot reach the public registry but the user wants to continue install/update, offer a one-shot npm mirror path as an install-only workaround. Prefer environment variables over persistent npm config set so the agent does not change the user's global npm behavior:

npm_config_registry=https://registry.npmmirror.com \
npm_config_proxy=http://127.0.0.1:<PORT> \
npm_config_https_proxy=http://127.0.0.1:<PORT> \
npm install -g @opendeploydev/cli@latest

If the user explicitly chooses persistent npm config, give the restore commands at the same time:

npm config delete registry
npm config delete proxy
npm config delete https-proxy

Make the limitation explicit: the npm mirror can help install the CLI, but deploy/auth/status still must reach the OpenDeploy API through the user's network or proxy.

Previous success does not disprove this diagnosis. The same machine can pass one day and fail the next if Codex was launched differently, the proxy port changed, launchctl environment was lost after reboot/logout, the proxy client switched from global to rule mode, npm was satisfied from cache, or this run hit the OpenDeploy gateway while the earlier run only touched local state.

Update Questions

Ask before changing anything global. If both updates are available, ask in this order:

  1. Plugin update.
  2. Global CLI update.

Plugin question:

  • Update plugin now (Recommended) — run the current host agent's plugin update command, then tell the user the new skill normally takes effect in the next session:
    • Claude: claude plugin marketplace update opendeploy, then claude plugin update opendeploy@opendeploy
    • Codex: codex plugin marketplace upgrade opendeploy
    • Cursor: reinstall/update from the Cursor plugin UI, or run /add-plugin https://github.com/opendeploy-dev/opendeploy-cursor-plugin in Cursor Agent chat.
    • OpenClaw: openclaw plugins update opendeploydev (or openclaw plugins update clawhub:opendeploydev if updating by recorded ClawHub spec), then run openclaw gateway restart; OpenClaw prints Restart the gateway to load plugins and hooks after updating. If the agent session still does not see the new skill text, start a new session.
    • OpenCode: curl -fsSL https://raw.githubusercontent.com/opendeploy-dev/opendeploy-opencode/main/install.sh | bash; this installs or updates ~/.agents/skills/* plus ~/.config/opencode/commands/*. If the current OpenCode session still sees old skill text, start a new session.
  • Use installed plugin for this run — continue with the loaded skill.

If plugin.apply_commands is present, prefer those exact commands; the CLI has already selected the stale installed platform(s). If multiple platforms are stale, run the listed commands in order and report which platform each command updates.

CLI question:

  • Update global CLI and continue (Recommended) — run npm install -g @opendeploydev/cli@latest, verify with npm list/view, then rerun preflight.
  • Skip update and continue — continue only if the installed global CLI supports the needed commands.

When cli_update_available: true, the update option must be the recommended first option. Do not mark skip as recommended because the current workflow might work on the older CLI; that compatibility belongs only in the skip option description.

If global opendeploy is missing, ask once to install @opendeploydev/cli@latest and continue verification. If the user declines, stop before deploy or other cloud mutation. Do not ask a second CLI-install question in the same setup/deploy run after the user already approved this exact install.

After Install Deployment Prompt

If the original user request says "install OpenDeploy, then ask whether to deploy this project", keep that follow-up simple and free-tier accurate. A normal first deploy on OpenDeploy is free: it does not create an OpenDeploy account, does not ask for a payment method, and does not charge the user. Paid actions are separate gates only for explicit paid features, AI Hub credit top-ups/auto-recharge, or a concrete quota/add-on response from the platform.

Never attach generic billing warnings to the normal first-deploy path. That scares users away from the free tier and misstates the product. If the project later hits a quota or add-on gate, stop there and ask a separate upgrade question with the exact resource from the backend response.

Recommended structured follow-up after setup:

question: "OpenDeploy is installed and enabled. Deploy the current project now?"
header:   "Deploy?"
multiSelect: false
options:
  - label: "Preview plan first (Recommended)"
    description: "Read the project and show the deployment plan before any cloud changes. No account, payment method, or paid resource is created."
  - label: "Deploy now"
    description: "Run the free first deploy on OpenDeploy's free tier. No account, payment method, or charge is created; if a real quota/add-on gate appears, I will stop and ask separately."
  - label: "Not now"
    description: "Keep OpenDeploy installed and make no deployment changes."

Verification

After install/update:

npm list -g @opendeploydev/cli --depth=0 --json
npm view @opendeploydev/cli version --json
opendeploy update check --json
opendeploy preflight . --json

Report only the useful result: CLI version, plugin version, gateway health, auth state, and whether the requested workflow can proceed.

Handoff

If the original user request included deploy/operate/domain/env/etc., continue inside the main opendeploy workflow after setup succeeds. If the user only asked for setup/update, stop after reporting status.