Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 3.68 KB

quickstart.mdx

File metadata and controls

60 lines (43 loc) · 3.68 KB
title Quickstart
description From an empty org to a working environment

This page takes you from nothing to an environment for a pull request, then connects a coding agent so you can drive environments from any branch. It covers the one-time setup for an org and the per-repo setup.

Prerequisites

  • You are a member of a GitHub org that uses Rainbow Machine. Access follows org membership: there is no separate account or API key.
  • To add a repo or set secrets, you are an owner of that org. Day-to-day work needs no owner role.
  • The repo has a dev stack that runs on Linux and a way to seed its data. Most web apps qualify.

Set up a repo

Open [dashboard.rainbowmachine.ai](https://dashboard.rainbowmachine.ai) and sign in with GitHub. If your org is not set up yet, the dashboard guides you through installing the Rainbow Machine GitHub App on it. The App needs access to the repos you want to serve. On **Repos**, click **Add a repo** and pick it. If the repo already has a `rainbow.toml` on its default branch, Rainbow Machine starts building right away.
If it does not, the dashboard offers to generate one. That runs a discovery agent against the repo and opens a pull request with a draft recipe. Nothing changes until you merge that PR. Review it the way you would review any contributor's PR: the draft is a starting point, and you own the file from then on.
The repo's row on **Repos** shows the build. The first build compiles the base image, which takes minutes. Later builds reuse it and take seconds to a couple of minutes depending on what changed. When the row reads ready, the default branch has a warm parent and pull requests start getting environments. Open any PR in the repo. Within a few seconds a comment from the Rainbow Machine bot appears with the environment's link, and the `rainbow-machine/preview` status on the commit reports success when the environment is ready. Push again and the same environment updates in place at the same URL.
If the build fails, the status reports failure and the comment says which step failed and why.

Connect your coding agent

The dashboard's MCP page for your org shows the MCP URL and a ready-made snippet for Claude Code, Cursor, and VS Code. For Claude Code the snippet is:

claude mcp add --transport http rainbow <your org's MCP URL>

Then run /mcp inside Claude Code, pick rainbow, and choose Authenticate. A browser opens on rainbowmachine.ai; sign in with GitHub and approve. Tokens last 7 days and refresh automatically for 60 days, so you rarely see that screen again.

After you connect, ask in plain language. "Start an environment for my branch" calls create_env. "Try that fix in a fork" calls fork_env. The full tool list is in Tools.

The loop

No pull request is required at any step:

  1. Push your branch to origin.
  2. Ask your agent for an environment for it, or open Environments on the dashboard. The URL comes back in the tool result.
  3. Open the URL. The environment runs the dev stack, so changes made inside it hot-reload.
  4. Push again and ask again with the same name. The environment updates in place at the same URL.
  5. To discard changed data, call reset_db. It restores the seeded database at the same URL in under a second.

Next steps