Skip to content
Docs

Migrating to launchset

Most repos already have releases: tag-triggered workflows, a Changesets pipeline, scripts that bump versions. launchset init finds them, asks what to do about each and writes the new setup. This page covers the whole move.

There are two ways. Pick one:

  • By yourself, interactively: run npx launchset init and answer the questions.
  • With an agent (Claude Code or similar): the agent runs init --detect --json, asks you only the questions that matter, then runs init --yes --decide .... The adoption skill tells it how.

init reads the repo and writes nothing until you say so:

  • Versions: the root package.json, the package.json next to each Dockerfile, native marketing versions, Flutter apps’ pubspec.yaml and existing tags (v1.2.3, 1.2.3, name@1.2.3).
  • Platforms: Dockerfiles, Android (build.gradle(.kts), gradle.properties), iOS (*.xcodeproj, Info.plist, .xcconfig), Capacitor, Expo (app.json) and Flutter (pubspec.yaml, also outside your npm workspaces). See Flutter.
  • How they are built today: image names, file, context and tag patterns from docker/build-push-action, docker/metadata-action and docker push lines.
  • Machinery that conflicts with launchset. See below.
  • Build numbers: the highest versionCode or CFBundleVersion in your files.
  • Changesets files and pre mode.
  • A pre-push hook setup (husky, simple-git-hooks or lefthook).

Look at the result first:

Terminal window
npx launchset init --detect
Versions found:
package.json:3 version = 1.4.0
android/app/build.gradle:5 versionName = 1.4.0
tags: 1 (latest: v1.4.0)
canonical: 1.4.0 (highest version found (...))
Targets:
api (docker): auto, Dockerfile found; the release workflow builds it
android (android, gradle): manual, no workflow builds it, so it's shipped on demand (release: "manual")
Build numbers: highest 12 (android/app/build.gradle:4); timestamp strategy now 217175069
Decisions (default in brackets; answer with --decide <id>=<value>):
version [1.4.0]: Which version is the repo on? Every target file is set to it.
target.android [manual] (check this): How is the Android app in the repo root (gradle) released?
docker.api.image [ghcr.io/your-org/demo-api] (check this): Image name for api (apps/api/Dockerfile)?
baseline [no]: v1.4.0 already exists, so 1.4.0 counts as released. Set a baseline?
...

(check this) marks a decision whose default is a guess or risky.

Every question init asks is a decision with a stable id. Answer it with --decide <id>=<value> (repeatable) or interactively. Without an answer, the default is used.

Id Values Default Ask the human when
version A plain X.Y.Z. The highest version found: the root version, the package.json next to each Dockerfile, native marketing versions and the highest release-like tag. The files disagree. Never lower a version without an explicit answer: stores reject lower marketing versions, and image tags would go backwards.
tags.release A template with {version}. v{version}. Existing tags use another format ({version} without the v): keep it.
target.<name> auto, manual, none. auto when a workflow already builds it, manual for native projects that no workflow builds, none for the generic web target when other targets already ship the repo. A job that release tags start (through its workflow’s tag trigger, an if: that checks for a tag, or a workflow_run after such a workflow), and that uploads an artifact, publishes, deploys or is the end of a release-only workflow, becomes a custom target (auto, named after the workflow file: desktop-linux.yml is desktop-linux), with its steps copied into launchset-release.yml, commented out. When the release machinery init retires (Changesets, semantic-release, release-it or a plain npm publish) published a public root package, an npm target takes over. An Android or iOS project defaults to manual. Explain what that means.
docker.<name>.image An image name without a tag. Read from the existing workflow. Otherwise a guess, like ghcr.io/<owner>/<repo>. Nothing in the workflows names the image.
docker.<name>.tags default, or a comma-separated list of tag templates. The tags the existing workflow pushes, otherwise default. A tag taken from the pushed git tag keeps its v (v{version}), also through a variable like RELEASE_VERSION=${GITHUB_REF#refs/*/}. Existing images have a v prefix and should also get the moving tags: v{version}, v{major}.{minor}, v{major}, latest (an option).
docker.<name>.verify yes, no. yes: verify: ["registry"], so a re-run skips an image whose release tag is already pushed. The registry has no HTTP API launchset can reach from CI.
machinery.<path>#<n> remove, disable, keep. disable (keep when no minimal edit exists). Always, when the default is keep. Otherwise show the list.
image.<path> stamp, leave. leave. Always. A deploy manifest that pins the image may be deploy state.
host github, gitlab. The host of the origin remote, else the CI files found. Only listed when something points at GitLab. When the repo is on GitLab and detection guessed wrong: --decide host=gitlab. See launchset on GitLab.
file.<path> keep, overwrite. keep. One decision per file that init would write but that already exists: .launchset/README.md and the launchset-*.yml workflows. Rarely. keep leaves an edited file alone. overwrite replaces it with the newly generated one.
baseline yes, no. yes only when an existing tag in another format already marks the version as released. Always, when the answer matters. See baseline.
offset An integer >= 0. Enough to stay above the highest build number found. When it is above 0.
skill yes, no. yes. Rarely.
hook yes, no. no. Only exists when a hook setup is found that doesn’t run launchset check --push yet: husky as a dependency or with hooks in .husky/, simple-git-hooks or lefthook. A hook file git ignores doesn’t count. Optional.

The machinery id is machinery.<file path>#<n>, where n counts the items in that file from 1. A path that starts with a dot gives two dots: machinery..github/workflows/release.yml#1. Copy ids from the JSON, don’t type them.

The file.<path> id contains the repo path, for example file..github/workflows/launchset-release.yml. Copy it from the JSON.

The flags --baseline, --no-baseline, --skill, --no-skill, --hook and --no-hook are shortcuts for the three yes/no decisions.

init --detect --json writes nothing and prints one JSON document:

{
"schemaVersion": 1,
"detection": {
"root": "/path/to/repo",
"git": { "repo": true, "head": "88554b4...", "branch": "main", "github": "acme/app" },
// "existingConfig": "launchset.config.ts" present only when a config exists: init won't overwrite it
"packageJson": { "path": "package.json", "name": "app", "version": "1.4.0", "line": 3 },
"workspaces": [],
"versions": [ { "source": "root", "path": "package.json", "line": 3, "key": "version", "value": "1.4.0", "plain": "1.4.0" } ],
"tags": [ { "tag": "v1.4.0", "version": "1.4.0", "format": "v{version}", "prerelease": false } ],
"canonical": { "version": "1.4.0", "reason": "...", "evidence": [ { "path": "package.json", "line": 3, "note": "..." } ] },
"targets": [ { "name": "android", "type": "android", "proposed": "manual", "reason": "...", "builtBy": [], "source": { "kind": "gradle", "file": "android/app/build.gradle" } } ],
"workflows": [ { "path": ".github/workflows/ci.yml", "builds": [ { "platform": "docker", "line": 12, "note": "..." } ] } ],
"machinery": [ { "id": "machinery..github/workflows/release.yml#1", "kinds": ["tag-trigger"], "path": ".github/workflows/release.yml", "line": 5, "what": "...", "reasons": ["..."], "actions": ["remove", "disable", "keep"], "effects": { "disable": "..." }, "evidence": [] } ],
"imagePins": [ { "path": "deploy/k8s/api.yaml", "target": "api", "image": "ghcr.io/acme/api", "refs": [ { "line": 18, "tag": "v1.4.0" } ] } ],
"buildNumbers": { "highest": { "value": 12, "path": "android/app/build.gradle", "line": 4, "key": "versionCode" }, "strategyNow": 217175072, "offset": 0 },
"existingFiles": [],
"changesets": { "files": [".changeset/cool-cats-run.md"], "preMode": false },
"hooks": [ { "tool": "husky", "path": ".husky/pre-push", "installed": false } ],
"notes": [ { "level": "info", "message": "...", "path": "...", "line": 3 } ]
},
"decisions": [
{
"id": "target.android",
"question": "How is the Android app in the repo root (gradle) released?",
"options": [ { "value": "auto", "label": "..." }, { "value": "manual", "label": "..." }, { "value": "none", "label": "..." } ],
"default": "manual",
"evidence": [ { "path": "android/app/build.gradle", "note": "..." } ],
"ask": true,
"onlyIf": { "id": "target.api", "values": ["auto", "manual"] } // optional: only matters for these answers
}
]
}

The decision fields: id, question, options (each value and label), freeform (set when other values of that form are accepted, for example "a plain X.Y.Z version"), default, evidence (path, optional line and a note: where the default comes from), ask (true when the default is a guess or a risk) and optionally onlyIf.

The loop:

  1. Detect. npx launchset init --detect --json > init.json. Read it. Write nothing yet.
  2. Ask. Show the human the decisions. Ask the ones with "ask": true, and always the three below. Quote the evidence.
  3. Run. npx launchset init --yes --decide version=1.4.0 --decide target.android=manual --decide "machinery..github/workflows/release.yml#1=disable"
  4. Review. git status, git diff. Read what init changed. Move the team’s own build steps into the generated workflows. Open one PR.

Always ask the human about:

  • Lowering a version. The default never lowers one. Only --decide version=<lower> does, and init warns about every file that goes down.
  • A baseline for a version that has no release tag.
  • Native projects that no workflow builds. release: "manual" is the usual answer. See Manual targets.

A bad answer fails before anything is written: --decide target.android=maybe says expected one of auto, manual, none, and an unknown id lists the valid ones.

launchset.config.ts, .launchset/README.md, the three workflows (a file that already exists is kept unless you answer file.<path>=overwrite), CHANGELOG.md if missing, the changes that retire conflicting machinery, converted changesets, the agent skill and an AGENTS.md section, and optionally a pre-push hook line. If a launchset.config.* exists, init refuses to run (already-initialized). Delete it to start over, or use --convert-only to only convert Changesets files.

It ends with the steps left to do by hand: commit and open a PR, create the GitHub App and secrets, add your build steps, store credentials. The agent lists them in the PR body.

launchset has one version. init shows every version it found, per file and per tag, and defaults to the highest. Then it aligns the target files to it.

Don’t lower a version just to make files agree. Stores reject a lower marketing version than what was uploaded, and registries would show a lower image tag as the newest. Raise the lagging files instead.

A baseline marks the canonical version as released, so launchset never builds it. init writes it to the config as baseline: "1.4.0". It doesn’t create the tag itself.

  • Default yes only when a tag in another format already marks that version as released (1.4.0, app@1.4.0).
  • Otherwise no, with a warning. The version may never have been built. With a baseline launchset never builds it, and pinned images might not exist.

The release tag (v1.4.0) is created by the first run of the release workflow on the base branch after the migration PR is merged, at the commit it runs on. That run builds nothing for 1.4.0, and if changesets are pending it opens the release PR as usual. Nothing happens on other branches, for another version, or once the tag exists. After that you can remove baseline from the config. Until then launchset status shows the baseline as not created yet.

A tag workflow you chose to keep still runs on the tag the release workflow creates (init’s steps name it). On GitLab the tag is pushed with ci.skip, so it starts no pipeline, even with gitlab.tagPipelines. And the release workflow only creates the tag when baseline is in the config committed at the commit it runs on: launchset release run locally before the migration is committed only says what it would do.

This matters at merge time. When the PR that adds launchset changes the root version (because init raised it) and there is no release tag for that version, the merge is read as a release commit, and launchset builds every target for it. If that is what you want, because that version was never built: fine. If the version was already released, set a baseline (--baseline): the release workflow then creates the tag on that merge commit instead of building it.

launchset pushes its tags and creates GitHub Releases with an App token. Unlike GITHUB_TOKEN, that does start other workflows. So anything that reacts to tags, or does what launchset now does, has to go. init lists every finding with its reason:

Finding Why it conflicts
A workflow triggered by push.tags that matches the release tag (v*, v*.*.*, *.*.*) It fires again on launchset’s tag, so its build or publish steps run a second time.
A release trigger It fires when finalize creates the GitHub Release.
changesets/action, changeset version|status|publish|tag in workflows or scripts Changesets opens its own release PR and bumps versions. launchset’s release PR replaces it.
semantic-release, release-it, standard-version, release-please, melos version They bump versions and create tags or releases.
Steps and scripts that create tags or GitHub Releases (git tag, gh release create, createRelease) finalize creates v<version>. A tag made earlier is wrong.
Docker pushes of latest on branch pushes launchset moves latest only when a release ships.
Scripts that write MARKETING_VERSION, CURRENT_PROJECT_VERSION, versionCode or versionName, fastlane version actions, and steps or scripts that rewrite the version in pubspec.yaml (cider, pubver, sed -i, yq -i, a Dart script in tool/) They would overwrite the build numbers stamped in CI.
@changesets/write in scripts launchset reads .launchset/.
Release instructions in CLAUDE.md, AGENTS.md and README (npm version, git tag, changeset) They describe the old process.

For each, choose:

Action What it does
remove Deletes the workflow or script file.
disable Removes only the conflicting trigger or step, or only the conflicting commands of a run: block or script. A script that does more than release keeps running: its conflicting lines are commented out, and one inside an if, a loop or an && chain becomes the no-op :, so the script stays valid. In a package.json script it drops only the conflicting commands joined with && or ;, so tsc; semantic-release becomes tsc. Never deletes a file. Every other byte stays identical.
keep Does nothing.

The default with --yes is disable, and a list of the changes is printed. init never leaves a conflict in place silently. Where no minimal edit exists, the only choices are keep and remove, and the default is keep (marked ask). For example, a package.json script whose conflicting command is joined to the rest with ||, a pipe or &, or shares an sh -c '…', a ( … ) group, an if, a loop or a case with other work.

After disable, check what is left in the file. Example with a tag trigger and a Changesets step:

on:
push:
branches: [main]
tags: ["v*"]
jobs:
release:
steps:
- uses: actions/checkout@v7
- uses: changesets/action@v1
with:
publish: npx changeset publish

A workflow with no trigger left gets workflow_dispatch. A removed step that other steps refer to (steps.<id>..., needs.<job>...) is listed as a manual follow-up. So is a place that still runs a removed package.json script by name (npm run release in a workflow, GitLab job or another script), because that call now fails.

init edits a step in the shell it runs in: the step’s shell:, else defaults.run.shell, else the runner’s default (pwsh on Windows, bash elsewhere). On GitLab, a job whose runner is tagged windows or whose script is PowerShell runs in PowerShell. A command inside a chain or a block becomes the no-op : in bash and $null in PowerShell. Where there’s no safe no-op, init only takes out whole lines and otherwise leaves the step to you: in cmd, in a matrix of Windows and other runners, and next to a PowerShell line continuation (`). A step in another language (shell: python, node) is read like a script file, and init doesn’t edit it.

Then move the team’s own build steps into launchset-release.yml: the docker/build-push-action settings (context, file, platforms), signing, fastlane, deploy steps. Keep secrets and environments as they are.

  • The tag format. If your tags are 1.4.0 without a v, answer tags.release={version}. Don’t change what other tools read.
  • Image tags. If deploys pull app:v1.4.0, keep the v: docker.api.tags=v{version}, v{major}.{minor}, v{major}, latest.
  • Deploy manifests that pin an image (Kubernetes, Compose, Helm). Per file, image.<path>=stamp makes the release PR update the tag (a kind: "image" files entry, and init aligns the file to the release tag now: make sure that image exists). image.<path>=leave keeps it as deploy state that you promote by hand, for example a production overlay.

init reads the highest existing versionCode or CFBundleVersion (for a Flutter app, the +N in pubspec.yaml). When it is higher than what the timestamp strategy gives now, it sets buildNumber.offset so new numbers stay higher. When it is close to Google Play’s limit (date-based numbers like 2024112701), init warns how much room is left. See Build numbers.

init never converts or moves a CHANGELOG.md. It only creates one when it is missing. New sections go before the first version heading (a heading that starts with a version, such as ## 0.18.0 or #### [v3.5.6](...) - 2023-01-02). Everything above stays unchanged, and old sections are never rewritten, so a file with Changesets sections below launchset sections is fine.

init converts the files in .changeset/*.md into .launchset/. The package lines in the frontmatter ("pkg-name": minor) become one bump: the highest bump found. Summaries are kept. A file with a bump but no summary gets a TODO summary to fill in.

.changeset/config.json and README.md are left alone, and the folder is not deleted. init tells you it can go. Converting twice is safe.

Then retire the Changesets pipeline (the changesets/action workflow, changeset scripts in package.json). init offers to disable them.

Does the repo also publish npm packages that each have their own version, next to the app? Then don’t retire Changesets: keep it for those packages and let launchset release the rest. See Alongside Changesets.

Changesets pre mode (pre.json, pre enter) keeps prerelease versions in the repo. launchset has no pre mode. Use a prerelease branch: see Preview builds and prerelease branches.

  1. On the branch that is in pre mode, convert its changesets: npx launchset init --convert-only. pre.json is ignored, with a warning.
  2. Add the branch to the config:
preview: {
branches: [{ branch: "next", prerelease: "beta" }],
},

Every push to the branch gets a 1.5.0-beta.N version, a tag and a GitHub pre-release. Nothing is committed. When the branch merges into the base branch, the changesets produce a normal release.

  • npx launchset status: the version, the pending changesets, consistency.
  • npx launchset version --dry-run: the diff of the first release PR.
  • npx launchset plan: the plan as JSON.
  • Create the GitHub App and the secrets.
  • Create the launchset:preview label if the repo doesn’t have it (gh label create launchset:preview). Adding a label that doesn’t exist to a PR fails, gh pr create --label included.
  • Set up the store pipelines for native targets and test them with a preview build.
  • Open one PR with everything. In the description list the decisions, what was removed or changed, and the manual steps that remain.
  • Don’t push the baseline tag yourself: the release workflow creates it after the merge. See Baseline.

A target whose build steps aren’t in the workflows yet gets a placeholder step, Build steps missing (<target>), that fails on purpose, so a release can’t mark it shipped while nothing builds it. init leaves those targets out of preview.targets, so the first preview doesn’t fail on them, and says so in a comment. launchset-preview.yml still has their placeholder: add each target’s build steps there too (and remove its placeholder), then add it back to preview.targets (or set targets: "all"). A target added back before that fails its preview, it doesn’t pass with nothing built:

// Previews build only the targets with build steps. android and ios have only the "build
// steps missing" placeholder in launchset-release.yml and launchset-preview.yml, which
// fails on purpose: add them here once their build steps are in (or set targets: "all").
preview: { targets: ["docker"] },

electron-builder publishes to GitHub Releases on its own in CI, on branch pushes too (onTagOrDraft), and fails without GH_TOKEN (“GitHub Personal Access Token is not set”). Steps copied from a tag job keep doing that in launchset’s release workflow. When a copied step runs electron-builder, directly or through a package.json script, init says so in the copied steps and in the steps left to do. Pass --publish never (launchset creates the GitHub Release), or set GH_TOKEN on purpose if electron-builder should upload the files. init only reads the command line: if your electron-builder config already sets publish: null, there’s nothing to do.

skills/launchset-adopt/SKILL.md teaches an AI agent this whole procedure: run init --detect --json, ask the right questions, find the conflicting machinery, move build steps, run init --yes --decide ... and open one PR. It is meant to be installed before the repo has launchset, so init doesn’t install it. Put it in your user-level skills folder.

The skill ships inside the npm package, next to the launchset skill. Copy it from the package:

Terminal window
cd "$(mktemp -d)"
npm pack launchset
tar -xzf launchset-*.tgz package/skills/launchset-adopt
mkdir -p ~/.claude/skills
cp -r package/skills/launchset-adopt ~/.claude/skills/

If the package is installed in a project, copy it from there instead:

Terminal window
mkdir -p ~/.claude/skills
cp -r node_modules/launchset/skills/launchset-adopt ~/.claude/skills/

With the launchset repo checked out, cp -r skills/launchset-adopt ~/.claude/skills/ does the same. Or download it straight from GitHub:

Terminal window
mkdir -p ~/.claude/skills/launchset-adopt
curl -fsSL https://raw.githubusercontent.com/demonsters/launchset/main/skills/launchset-adopt/SKILL.md \
-o ~/.claude/skills/launchset-adopt/SKILL.md

Restart Claude Code and ask it: “Move this repo to launchset.” The skill loads when you ask to set up or migrate a repo to launchset.

The other skill, launchset (installed into repos by init as .claude/skills/launchset/SKILL.md), is for agents that work in a repo after the move: it tells them to add a changeset to every PR. See Writing changesets.

Repos where every package is versioned and published independently (per-package npm releases), with nothing that shares one version, don’t fit: launchset has one version per repo. A repo with an app and independently versioned npm packages does fit: launchset releases the app, Changesets keeps the packages. See Alongside Changesets. Build services outside GitHub Actions (Xcode Cloud, Codemagic) aren’t covered either. Expo EAS is: see Expo.