# Set up Repoburg

Repoburg runs Claude Code and Codex side by side in one pane, on the person's
computer and on Repoburg Cloud machines. These are the steps for a coding
agent that sets it up for the person it works for. Do them in order and tell
the person what each step does.

## Rules

- Never ask the person for a password, a card number, a token or a sign-in
  code in the chat. Every sign-in and every payment happens in their browser.
- Ask the person before anything that costs money (a cloud machine, credits,
  a tunnel) or deletes something.
- When a Repoburg tool returns a link, give it to the person and wait for
  them. Payments, deleting and other risky changes are confirmed there, by
  them, with their Google sign-in.

## 1. Install Repoburg

When `curl -fsS http://127.0.0.1:9998/health` answers already, Repoburg is
installed: go on with step 2.

Repoburg runs on macOS 13 or newer on Apple Silicon, and on Linux (x86_64 or
aarch64, glibc, systemd). Find out which with `uname -sm`, then run:

```sh
curl -fsSL https://repoburg.com/install.sh | bash
```

Running it again updates Repoburg. On macOS it installs the Repoburg menu bar
app and opens it; the app downloads Repoburg the first time it starts. On
Linux it runs Repoburg as the systemd user service `repoburg-daemon`.

Wait until Repoburg answers (it can take a few minutes the first time):

```sh
for i in $(seq 1 90); do curl -fsS http://127.0.0.1:9998/health && break; sleep 2; done
```

## 2. Sign in

The Repoburg CLI is `~/.repoburg/runtime/current/bin/repoburg`. Start the
sign-in:

```sh
~/.repoburg/runtime/current/bin/repoburg login --no-wait
```

It prints a link and a code, and opens the browser where it can. Give the
person the link: they sign in with Google there and approve the code the page
shows. Then wait for it:

```sh
~/.repoburg/runtime/current/bin/repoburg login
```

It ends with `Signed in to Repoburg as …`. It waits up to 5 minutes; run it
again to keep waiting (the link stays the same). When the computer is signed
in already, it says so at once.

## 3. Connect the Repoburg MCP

Repoburg on this computer serves the Repoburg MCP to the agents on it, at
`http://127.0.0.1:9998/api/repoburg/mcp` (Streamable HTTP). It uses the
sign-in of step 2, so there is nothing more to sign in to. Add it to the agent
you run in; `?agent=` names the agent on the pages where the person confirms
a payment or a delete.

**Claude Code**

```sh
claude mcp add --transport http --scope user repoburg 'http://127.0.0.1:9998/api/repoburg/mcp?agent=Claude%20Code'
```

The tools load in a new session (or after `/mcp` → `repoburg` → Reconnect).

**Codex**

```sh
codex mcp add repoburg --url 'http://127.0.0.1:9998/api/repoburg/mcp?agent=Codex'
```

**Cursor**

Add this to `~/.cursor/mcp.json` (keep the servers it has):

```json
{ "mcpServers": { "repoburg": { "url": "http://127.0.0.1:9998/api/repoburg/mcp?agent=Cursor" } } }
```

**Other MCP clients** on this computer use the same URL. While the computer is
signed out, the server has one more tool, `sign_in`: it gives a link to sign
in with, like `repoburg login`.

Sessions in the Repoburg pane have these tools already, as the `repoburg`
MCP server; nothing needs adding there.

**Without Repoburg on the computer.** An agent on a computer without
Repoburg, or one that cannot reach this computer (such as a cloud client),
uses `https://repoburg.com/mcp` instead. It signs in with OAuth: the person
signs in with Google in the browser and presses Connect.

```sh
claude mcp add --transport http --scope user repoburg https://repoburg.com/mcp
codex mcp add repoburg --url https://repoburg.com/mcp
```

In Claude Code the person then types `/mcp`, picks `repoburg` and chooses
Authenticate. `codex mcp add` starts the sign-in by itself: it prints a link
and waits until the person has connected in the browser, so give them the
link. A Codex that only adds the server signs in with
`codex mcp login repoburg`. The account page lists these agents and can
disconnect each one.

## 4. Optional: a cloud machine

Ask the person whether they want a Repoburg Cloud machine: it runs Repoburg,
Claude Code and Codex in the cloud and sleeps when nobody uses it. Show them
the sizes and prices from `get_cloud_options` and let them choose. A machine
needs credits: `buy_credits` gives a link where they pay with a card. Then
create it with `create_machine`.

## 5. Finish

Open https://agent.repoburg.com in the person's browser: the pane, where their
sessions run. On a Linux machine they reach over SSH, they forward the port
first (`ssh -L 19998:127.0.0.1:9998 <machine>`) and open
http://localhost:19998/ instead.

## The tools

Everything the account view in the Repoburg pane does has a tool. Tools that
work on an account take an optional `account`: `me` (the default) or a team
the person is in.

- **Read:** `get_overview`, `get_account`, `get_usage` (CSV too),
  `get_activity`, `list_payments`, `get_cloud_options`, `list_machines`,
  `get_machine`, `get_machine_console`, `get_inbox`,
  `list_machine_templates`, `list_computers_and_tunnels`, `list_team_people`,
  `get_team`, `list_team_events`, `list_team_apps`, `list_my_invitations`,
  `list_connected_agents`.
- **Machines:** `create_machine` (from a template too), `wake_machine`,
  `sleep_machine`, `resize_machine`, `set_machine_idle_timeout`,
  `keep_machine_awake`, `save_machine_template`, `delete_machine_template`.
- **Computers and tunnels:** `assign_tunnel` (for another computer than this
  one, or a new address, the person confirms in the browser),
  `unassign_tunnel`, `give_tunnel`, `keep_tunnel`, `rename_computer`.
- **Teams:** `create_team`, `update_team`, `invite_to_team`,
  `cancel_invitation`, `answer_invitation`, `set_member_limit`,
  `ask_for_more_limit`, `answer_limit_request`, `review_app_version`
  (rejecting runs at once; approving is confirmed in the browser).
- **Account:** `update_account_settings`, `set_auto_top_up` (turning it on
  is confirmed in the browser), `disconnect_agent`.
- **In the browser:** `buy_credits` and `open_account_page` give a link to the
  account page (the card is changed there). `buy_tunnel`, `delete_machine`,
  `remove_tunnel`, `remove_from_team` (also to leave a team),
  `change_team_role`, `delete_team`, `forget_computer`, `sign_out_everywhere`
  and `request_refund` give a link where the person confirms; call
  `check_confirmation` with its id to see whether they did.

Resources: `repoburg://account` and `repoburg://machines/<id>`.
