# Ship my changes

URL: /code/ship-my-changes · Id: `guide:ship-my-changes`

> Say "ship my changes" and get the Change reviewed, merged into a new Version and deployed on every Interface.

[Review](/business/nouns/review) a [Change](/business/nouns/change), merge it into a new [Version](/business/nouns/version) of the business, and point the live address at it.

Needs: [Change](/business/nouns/change)

**Before it runs**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Never: it all happens in the chat.
- First question at Live: “Ship to everyone, or to 10 percent first?”

## What you get
- 1 review: every test and Evaluator run on the preview (Change)
- 1 Approval first, when the Change is high stakes (Approval)
- 1 new build of the business at a fingerprint (Version)
- 1 live address pointed at that build, with the last one kept (Version)
- 4 regenerated API, SDK types, CLI operations and MCP tools (Interface)
- 1 new Stripe Price, when an Offer price changed (Stripe's Price)
- 3 Events: reviewed, merged, deployed (Event)

## Your agent does
**For agents**

- Guide: `guide:ship-my-changes`, status `live`. Page: [/code/ship-my-changes.md](/code/ship-my-changes.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: never.
- Needs first: [Change](/business/nouns/change).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Change.review`](/business/nouns/change/review) (`verb:Change.review`) | `change` Change (an id), required: example `"change_42"` | `change` Change |
| 2 | [`Change.merge`](/business/nouns/change/merge) (`verb:Change.merge`) | `change` Change (an id), required: example `"change_42"` | `version` Version, `change` Change |
| 3 | [`Version.deploy`](/business/nouns/version/deploy) (`verb:Version.deploy`) | `version` Version (an id), required: the `$id` step 2 returns | `version` Version |

Returns: the last call answers with `version` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "version": {
    "$id": "https://api.sb/leaseline.app/versions/change_1",
    "$type": "Version"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Version.deploy",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Ship it to 10% of customers first”, or “Undo the last change”.

Calls: `Change.review` → `Change.merge` → `Version.deploy`

Ask:

```text
Ship my changes.
Put my edits to the lease fields live.
Deploy the branch once its checks pass.
```

API:

```bash
# 1. Change.review
curl -X POST https://api.sb/leaseline.app/changes/change_42/review \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"

# 2. Change.merge
CHANGE=$(curl -X POST https://api.sb/leaseline.app/changes/change_42/merge \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" | jq -r '.change["$id"] | split("/") | last')

# 3. Version.deploy
curl -X POST https://api.sb/leaseline.app/versions/$CHANGE/deploy \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Change.review({ change: 'change_42' })
const { change } = await $.Change.merge({ change: 'change_42' })
await $.Version.deploy({ version: change.$id })
```

CLI:

```bash
npx startup-builder do Change.review --json '{"change":"change_42"}'
CHANGE=$(npx startup-builder do Change.merge --json '{"change":"change_42"}' | jq -r '.change["$id"] | split("/") | last')
npx startup-builder do Version.deploy --json '{"version":"'"$CHANGE"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "await $.Change.review({ change: 'change_42' })\nconst { change } = await $.Change.merge({ change: 'change_42' })\nreturn await $.Version.deploy({ version: change.$id })"
  }
}
```

## Change it
- Ship it to 10% of customers first.
- Undo the last change.
- Ask me before shipping anything that removes a field.

## Under the hood
- Systems: [Repositories](/code/systems/repositories), [Changelog](/code/systems/changelog)
- Nouns: [Change](/business/nouns/change), [Version](/business/nouns/version), [Interface](/business/nouns/interface)
- Events: [`Change.reviewed`](/business/events/Change.reviewed), [`Change.merged`](/business/events/Change.merged), [`Version.deployed`](/business/events/Version.deployed)
- Stripe objects: `Price`