Early access is open. Stagd is free during the beta. Sign up
← Blog

Introducing Stagd

A live preview of every pull request, with its own database and a link in the review, on compute you already have.

· Cover image

Stagd turns every pull request into its own running copy of your app: built from the branch, with a fresh, seeded database, at a link posted in the pull request. Reviewers click it, try the change, and leave their comments on code they’ve seen work. Merging or closing the pull request tears it down.

I’ve built preview environments for pull requests many times before: shell scripts, GitHub Actions workflows and glue for each new project. They worked, and then they had to be built again for the next one. I kept waiting for a product that made this easy and still left me the flexibility of my own compose file, compute and data. I got tired of waiting, so I built Stagd.

The problem

Most teams have one staging environment and more changes than it can hold. So staging turns into a queue. Someone deploys their branch, someone else overwrites it, and a reviewer opens a link that’s running somebody else’s code. The database has drifted so far from anything real that nobody dares reset it, and “is my change on staging yet?” is a question asked in a team channel every day.

The review suffers most. A pull request gets read, not tried. The designer, the product manager and the client who could have caught the problem in thirty seconds of clicking only see it after the merge, when fixing it costs a new pull request and another round of review.

Preview environments fix this, and big teams have had them for years: built in-house, by a platform team, over months. Hosted ones exist too, but usually for frontends only, or on the vendor’s servers at the vendor’s markup. We wanted previews for the whole app (frontend, API, workers and database together) without building a platform team first.

What Stagd does

A preview per pull request. Push a branch, open a pull request, and Stagd builds its images (with cache), starts a database, restores your seed into it and brings your services up. One comment in the pull request shows each step as it finishes and ends with the link. A typical app is live in about a minute.

Not only pull requests. A preview can be started from any branch or commit, through the CLI, the API or the MCP server, before there’s a pull request at all. That makes previews something an agent can drive: a coding agent working on a branch starts a preview of its change, waits for it, takes a screenshot, reads the logs and the mail it sent, fixes what’s broken and pushes again. The preview follows the new commit and keeps its database, so the agent doesn’t start over. By the time a person opens the pull request, the change has already been seen running.

One file in your repository: stagd.yaml. It points at the compose file you already run locally, says which services get a URL, and asks for what a preview needs around them:

version: 1
app:
  compose: compose.yaml
ingress:
  site: { service: web, port: 3000, primary: true }
  api: { service: api, port: 8080 }
services:
  postgres:
    seed: app-anonymized
  mail: {}
lifecycle: { sleep_after: 2h }

That preview gets a URL for the site and one for the API, a Postgres database restored from the app-anonymized seed, and an inbox at its own URL for the mail it sends. stagd init writes a first stagd.yaml from your compose file, and stagd validate checks it before you push.

There’s no settings page where you click your app together. Because the setup lives in the repository, a pull request that adds a worker, a second URL or a database extension gets a preview that already runs with it. It’s reviewed like any other change, and an old branch keeps the setup it was written for.

Real data, safely. The database can be Postgres, MySQL, MariaDB or MongoDB, one per preview, restored from a dump in your own blob storage. Migrations run against a copy, never production. Mail the app sends lands in an inbox reviewers can read, and nothing is delivered.

On compute you already pay for. Previews run in your Namespace workspace, your Kubernetes cluster or a Docker host. Stagd sends the instructions and reads status and logs back. Your code and data stay on your infrastructure, and you pay your provider directly, with no markup.

Cheap to keep around. A preview sleeps after a quiet spell and wakes on the next visit or push. It expires on its own, and closing the pull request removes it and its database.

Open to the people who review. Who may open a preview is set in Stagd, not in the pull request, so a change can’t open up its own access. Reviewers outside your GitHub organisation are invited, and sign in with Google or a code by email: no GitHub account needed.

An API, a CLI and an MCP server. The dashboard runs on the same API as the open-source CLI, so anything you can click, a script can do. Coding agents get the MCP server.

From nothing to a first preview

Install the CLI and sign in:

curl -fsSL https://stagd.dev/install.sh | bash
stagd login

Create an org, connect GitHub and pick a repository:

stagd orgs create acme --name "Acme Inc"
stagd github connect
stagd repos enable acme/web

Connect your compute:

stagd compute connect namespace

Describe your app, in the repository’s checkout:

stagd init
stagd validate

Commit the stagd.yaml it writes, with the database and seed you want, and open a pull request. stagd setup shows what’s left at any point, and the quickstart walks through each step.

Or let your coding agent do it

Most of that is reading your repository and writing a file, which is what coding agents are good at. After stagd login, add Stagd’s MCP server to Claude Code or Cursor:

stagd mcp install

Then, in your repository’s checkout, run Stagd’s setup prompt. In Claude Code:

/mcp__stagd__setup

In other agents, pick the setup prompt, or ask the agent to set up Stagd for this repository. From there the agent:

  1. Checks what your org already has, and points you at the steps only an admin can do in the browser: installing the GitHub App, picking repositories, connecting compute.
  2. Writes stagd.yaml from your compose file, your Dockerfiles and how the app is configured, and checks it the way previews will read it.
  3. Names the secrets the app needs that have no value yet, and tells you where to set them. It never asks you for a value, and never writes one to a file.
  4. Pushes a branch, opens a pull request and starts a preview.
  5. When the preview fails, reads why from the build and the logs, fixes it, and deploys again until it’s live.
  6. Ends with the preview’s URL and a screenshot of it running.

After setup, the same server lets the agent preview its own changes as it works (see “Not only pull requests” above). The coding agents guide lists every tool.

Why “Stagd”

Simplicity. A change gets staged, so: Stagd. One short word, easy to say and quick to type a hundred times a day (stagd login, stagd preview list, stagd logs).

It’s what we want the product to be, too. One file in your repository, one link in the pull request, nothing to click together and nothing to keep in sync by hand.

What’s next

Stagd is in early access, and free while it is. We’ll give at least 30 days’ notice by email before anything costs money, and we’d rather set prices with the teams using it than guess.

Next up: Slack and Linear, so the preview reaches people where they already talk about the change; and Helm charts and Kubernetes manifests beside compose files.

If shared staging is slowing your team down, get started or read the docs. And tell us what’s missing at hello@stagd.dev: we read everything.