Deploy OpenCode on Local Machine

Run OpenCode on Local Machine with AgentSea — the easiest way to deploy Grid-backed AI agents on infrastructure you control. Copy the command below: it installs the CLI, then walks you through deployment interactively.

AgentOpenCode
EnvironmentLocal Machine

Run this command

Paste this in your terminal (macOS, Linux, or WSL). It installs AgentSea, then starts agentsea opencode local and guides you through the rest — API keys, provisioning, and connecting to your agent.

shell
curl -fsSL https://agentsea.thegrid.ai/install.sh | bash -s -- opencode local
Already installed? Run deploy only
shell
agentsea opencode local
Install CLI without deploying
shell
curl -fsSL https://agentsea.thegrid.ai/install.sh | bash

Install options and flags in the CLI Reference.

Common commands
shell
agentsea                              # Interactive picker
agentsea ls                            # List your deployments
agentsea matrix                        # Agent x cloud matrix

After install — what to do next

Once AgentSea finishes provisioning OpenCode on Local Machine, here's how to get the most from your agent.

  • Run opencode in a project folder — AgentSea connects you to the terminal UI automatically.
  • Run /init inside OpenCode so it learns your project structure (creates AGENTS.md).
  • Switch between Build (full tools) and Plan (read-only analysis) agents with Tab. OpenCode docs
  • Reconnect later with agentsea connect or agentsea list.

Prefer not to install the CLI?

Run this one-liner instead — no global install required. It downloads and runs the bootstrap script for OpenCode on Local Machine.

shell
bash <(curl -fsSL https://agentsea.thegrid.ai/local/opencode.sh)

← Pick another agent | Change environment