Run OpenCode in disposable, remote Modal sandboxes. Install · Docs · Sessions · Jobs · Dashboard · Releases spov starts an OpenCode agent in a fresh Modal sandbox with only the repositories you choose, connects your terminal to it, and brings the agent's work back to your checkout when you are done. Or hand it a goal, and it works on its own until it has opened a pull request or written a report. cd your-repo spov fly OpenCode 2 only. spov runs OpenCode 2 in its sandboxes and expects OpenCode 2 on your machine for the terminal UI. OpenCode 1 and plugins written only for it are not supported; see OpenCode plugins. Early days. spov is young: everything described here works and is exercised against real Modal, GitHub, GitLab and Forgejo, but its interfaces may still change between releases. Why spov Not on your laptop. The agent works in a sandbox of its own, with the repositories it needs and nothing else: not your home directory, your SSH keys or your other projects. Each sandbox is thrown away afterwards. Your credentials stay out of its reach. Git tokens, model API keys and registry tokens are held by a proxy beside the sandbox, which adds each only to the requests it is meant for. The agent sees placeholders. Your work comes back to you. Inside a checkout, spov fly starts from your current branch, unpushed commits included, and copies the agent's commits and changes back when you quit. Nothing is overwritten. Hand off whole tasks. A job works unattended until it opens a pull request or writes a report, and spov checks the result itself (the pull request exists, your check command passes) before calling it a success. No sandbox outlives its use. Modal bills a sandbox for as long as it exists, so spov ends it when you quit, idles it out when nobody is attached, and gives every sandbox a hard time limit. Terminal or browser. The OpenCode TUI you know, or OpenCode's web UI; with a server, also a dashboard to start, watch and steer sessions and jobs. Get started You need: Linux or macOS (on Windows, WSL) with git; a Modal account, where the sandboxes run and are billed; a GitHub account, with gh signed in on this machine or a GitHub App (Forgejo, Gitea and GitLab work too: credentials.md); a model: an OpenCode Go or Zen subscription, or an API key such as ANTHROPIC_API_KEY. 1. Install spov, with the OpenCode 2 version it expects: curl -fsSL https://github.com/jimutt/spov/releases/latest/download/install.sh | sh -s -- --with-opencode spov goes to ~/.local/bin, and running the script again updates it. With Homebrew, brew install jimutt/tap/spov installs spov alone; install OpenCode 2 with its own installer (curl -fsSL https://opencode.ai/v2/install | bash). If brew says the cask is invalid, run brew update first. spov goes to ~/.local/bin (the script tells you if that is not on your PATH), and OpenCode beside spov's data in ~/.local/share/spov/bin/. The script checks the download against the release's checksums, and their signature when cosign is installed. Without cosign it installs once the checksum matches and says in one line that the signature was not verified; SPOV_REQUIRE_SIGNATURE=1 makes that a failure instead. … | SPOV_VERSION=0.2.0 sh -s -- --with-opencode pins a release. A version (SPOV_VERSION, or the OpenCode version a server names) must be N.N.N or N.N.N-prerelease, or the script stops before it downloads anything. 2. Set up this machine: spov init It checks what a first launch needs and offers to set up whatever is missing, asking before each change: Modal: runs Modal's own sign-in (modal setup) in your terminal; GitHub: uses the gh CLI's login (and runs gh auth login if it is not signed in), and writes the platforms entry in ~/.config/spov/config.yaml for you; a model: signs you in with an OpenCode Go or Zen subscription, which needs no API key, or takes a pasted API key; the sandbox image: builds it once, which takes a few minutes. Run it again at any time: a step that is done is left alone. spov init --check only reports, and exits 1 when something is missing. 3. Launch a session from a checkout of a repository on GitHub: cd your-repo spov fly spov creates a sandbox, clones the repository at your current branch, waits for OpenCode, and hands your terminal to its TUI; the launch shows its progress and an estimated cost per hour. Work with the agent as you would locally. When you quit, its commits and uncommitted changes are copied into your checkout, and then the sandbox is terminated. The checkout must be clean and on a branch to start (untracked files count): commit or stash first, or pass --no-sync to launch without syncing. From any other directory, spov fly --repo owner/name launches a repository's default branch instead. Setting up by hand spov init runs these for you. Use them to script a setup, or for Forgejo, Gitea, GitLab or a GitHub App, which init does not set up. Connect Modal: uvx modal setup # or: pipx run modal setup, or pip install modal && python3 -m modal setup This signs you in and writes ~/.modal.toml; MODAL_TOKEN_ID and MODAL_TOKEN_SECRET work too. Then build the sandbox image once, which takes a few minutes and is needed again only when spov moves to a new OpenCode version: spov serve image build Connect GitHub. Create ~/.config/spov/config.yaml: platforms: - name: github kind: github account: your-username and reuse gh's login (gh auth login first if it is not signed in): spov credentials add github --from-gh A GitHub App is better still: it gives each session a token for just its own repositories (credentials.md). Add a model. Store an API key: spov credentials add ANTHROPIC_API_KEY # or OPENROUTER_API_KEY, OPENAI_API_KEY, ... or sign in to OpenCode Go or Zen with spov login opencode. When something goes wrong Not sure what is missing: spov init --check lists what a launch needs and what this machine has. "image not published": the sandbox image is not built yet; run spov serve image build. The agent cannot reach a model: store a key (spov init, or spov credentials add). A key stored while the local server runs is seen once it restarts, which it does after a minute with nothing to do. An OpenCode version mismatch: run the install command again. Anything else at launch: the local server's log is ~/.local/state/spov/server.log, and spov config show prints the configuration spov is using. What you can do Work with an agent Interactive sessions covers every flag, choosing repositories, resuming and scripting. Hand off a task spov jobs create --repo acme/app --check './app/scripts/check.sh' \ "Fix the flaky retry test in internal/queue and open a pull request" A job runs until it delivers, and is judged on three gates: the check passes, the pull request or report exists, and the agent did something with no question left unanswered. You can follow it, steer it or take over at any point. Jobs need a server with a database, which the Compose file in deploy/ runs on your own machine; see Autonomous jobs. Use the dashboard A server with a database also serves a web dashboard, signed in to with GitHub, to start, watch and steer sessions and jobs, answer the agent's questions, and see what their sandboxes cost. See The server and the dashboard. How it works you ── spov (CLI or dashboard) ── spov serve ── Modal sandbox ├── OpenCode, your repositories in /workspace └── credential proxy, holding the tokens spov serve holds the credentials, creates the sandboxes and supervises the jobs; the CLI and the dashboard are its clients. On your own machine there is nothing to set up: the CLI starts a server for itself when it needs one. A team runs one server with Postgres for everyone, which also gives jobs and the dashboard (deploy/README.md). Each sandbox has a general-purpose toolchain (Python, Node, Bun, Go, build tools) and takes add-ons such as Rust, Java or Postgres. What is installed, how credentials are kept out of it, network access and cost are in The sandbox. A sandbox template keeps a named set of those settings (network, registry credentials, variables, add-ons) to pick when you launch, from the dashboard or with --template. Configure it spov reads ~/.config/spov/config.yaml, then a project's .spov.yaml, then SPOV_* environment variables. A project file says what its repository needs: # .spov.yaml sandbox: addons: [rust, postgres@16] # beyond the default toolchain env: RUST_LOG: debug Commit it before your next spov fly, since a synced launch needs a clean checkout. spov config show prints the merged result and where each value came from. Secrets never live in these files; spov credentials add stores them. configuration.md documents every key. Documentation The documentation index lists every page by what you want to do. Interactive sessions: starting, syncing, resuming, and --json output for scripts Autonomous jobs: goals, checks, steering and how a job is judged Credentials: GitHub, Forgejo, Gitea and GitLab, model providers, private registries The sandbox: toolchain, add-ons, environment variables, security, network, sandbox templates, cost The server and the dashboard: local or hosted, signing in, the web dashboard Configuration reference: every key Reference: forges, GitHub access, local history, metrics, the HTTP API Running a server: deploy/README.md, and what to decide before you share one: Running a shared server safely Reporting a vulnerability: SECURITY.md Contributing Building from source, the checks and the integration tests are in docs/development.md. AGENTS.md maps the codebase. MIT. See LICENSE.
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: Spov – Run OpenCode in disposable Modal sandboxes (MIT licensed)
I wanted to run OpenCode in Modal sandboxes. Then I wanted better support for autonomous jobs and stricter credential isolation (tokens live in a proxy sidecar the agent can't reach). And then I wanted a web UI.It resulted in spov. In its simplest form it's a CLI launcher written in Go that brings up the standard OpenCode TUI, but with the OpenCode server running in a Modal sandbox, and your changes synced back to your checkout when you quit. It can also be hosted as a standalone server, which adds autonomous jobs that end in a pull request or a report, a web dashboard for configuration, and a web client for starting and steering sessions. There's a short intro video in the README.I'm using it for some personal projects, but I'm open-sourcing it in the unlikely event of someone happening to have the exact same preferences and needs. Comments URL: https://news.ycombinator.com/item?id=50680832 Points: 1 # Comments: 0
번역 서비스가 일시 중지되어 원문을 표시합니다.