# startups.lock

URL: /code/file-conventions/startups-lock · Id: `page:code/file-conventions/startups-lock`

> startups.lock pins each Startup Template and Product Template the Startup extends to one Version, by fingerprint.

`startups.lock` pins each [Startup Template](/business/nouns/startup-template) and [Product Template](/business/nouns/product-template) the [Startup](/business/nouns/startup) extends to one [Version](/business/nouns/version), by fingerprint. The CLI writes it; nobody edits it by hand.

```text
leaseline/
├── startup.ts
└── startups.lock      Startup Template pins, by fingerprint
```

## Reference
JSON, written on every `Template.extend` and `Template.upgrade`. Commit it.

| Key | Type | Holds |
| --- | --- | --- |
| `lockfileVersion` | number | The format version, `1` |
| `pins` | map | One entry per Startup Template or Product Template, keyed by its id |
| `pins.*.version` | number | The pinned Version |
| `pins.*.digest` | string | `sha256:` over the Version's parsed canonical form |

## Examples
### Minimal
```json title="startups.lock"
{ "lockfileVersion": 1, "pins": { "solo-saas": { "version": 7, "digest": "sha256:9c1e04ab" } } }
```

### Leaseline
Leaseline extends the [Solo SaaS](/start/templates/solo-saas) Startup Template, and the [SaaS](/products/templates/saas) Product Template it sells.

```json title="startups.lock"
{
  "lockfileVersion": 1,
  "pins": {
    "solo-saas": { "version": 7, "digest": "sha256:9c1e04ab" },
    "saas": { "version": 12, "digest": "sha256:41d7f0c3" }
  }
}
```

## What it builds
The [StartupBuilder](/code/builders/startup) reads the pins and resolves the Startup against exactly those Versions.

- a `Version` pin per Startup Template
- an upgrade arrives as a [Change](/business/nouns/change) whose plan sorts each field into changed, added, removed, shadowed or orphaned
- the `Template.upgraded` [Event](/business/nouns/event) when the Change merges

## Good to know
- The digest covers meaning, not bytes. Reformatting a file or editing a comment mints no Version.
- `.sb/resolved/` shows the whole Startup, own and inherited values, against these pins.
- A Startup chooses its Startup Template under [templates](/start/templates).