# Upgrade a Startup Template

URL: /code/upgrading · Id: `page:code/upgrading`

> Move a Startup to a newer Version of the Startup Template it extends through a reviewed Change, and update the startup-builder package.

To upgrade, open the [Change](/business/nouns/change) that moves your [Startup Template](/business/nouns/startup-template) pin, review its diff, and merge it. Nothing moves until the Change merges.

## Prerequisites
- A [Startup](/business/nouns/startup) project with a `startups.lock`, such as Leaseline after [tutorial 1](/code/learn/creating-the-project).

## Steps
1. To see what the Startup is pinned to, read its lockfile:

   ```bash
   cat startups.lock
   ```

2. To open the upgrade, call [`StartupTemplate.upgrade`](/business/nouns/startup-template/upgrade). It returns the Change with its three-way diff:

   ```bash
   npx startup-builder do StartupTemplate.upgrade --json '{"startupTemplate":"stpl_9OivLWR17L","startup":"startup_l3hr1EnUGY"}'
   ```

3. To check the Change against your own files and tests, review it:

   ```bash
   npx startup-builder do Change.review --json '{"change":"change_3Ex8uVSOyQ"}'
   ```

4. To take the upgrade, merge it. A field you changed that the template also changed sends it back to review:

   ```bash
   npx startup-builder do Change.merge --json '{"change":"change_3Ex8uVSOyQ"}'
   ```

5. To update the package and its types, install the latest `startup-builder`:

   ```bash
   npm install startup-builder@latest
   ```

## Result
`startups.lock` pins the new [Version](/business/nouns/version) by digest, and every override you wrote still applies on top of it. A pinned API caller keeps its Version until it moves.

## Next steps
- [startups.lock](/code/file-conventions/startups-lock): the pin format.
- [Versioning](/code/api/guides/versioning): how API callers move between Versions.
- [Customizing](/code/customizing): what an upgrade reaches, level by level.