Transplant is a CLI wizard / generator for setting up Sprout apps. After using the Sprout template and cloning to your machine, run this in your clone's root and It will automate the setup process.
It's also a working example of an app built using Sprout.
Install Transplant on Linux or in WSL:
curl -fsSL https://releases.sproutcli.dev/transplant/install.sh | shUse Sprout as a GitHub template, then clone your new repo and run the wizard:
git clone https://github.com/YOU/YOUR_APP.git
cd YOUR_APP
transplantIt walks you through features and project settings, previews the cut, and tests and builds the result. The getting started guide covers the next steps and the manual setup path. For more wizard options, see Transplant's README.
Development needs Linux or WSL, Git, Bash, curl, GCC for the race tests, and Go
=> the version in go.mod. Windows binaries still ship for the sake of this
being a good Sprout example.
Run transplant update to check for and apply updates.
Every question has a flag. --yes accepts the defaults, creates the setup
branch, confirms finalization, and commits after verification succeeds. Pass
--branch=false or --commit=false to opt out of those steps.
transplant --yes \
--module=github.com/YOU/YOUR_APP --app-name=your-app \
--service=headless --update=manual \
--release-url=https://releases.example.com/ \
--contact-url=https://github.com/YOU/YOUR_APP \
--author="Your Name" --year=2026 --docs=markdownThe module defaults to the GitHub origin URL, the binary name to a cleaned-up
repo name, and the copyright name to git config user.name. If a required
default isn't available, pass its flag. No answers are stored in Transplant's
database, and these update choices never change Transplant's own preferences.
| Flag | Choices / default |
|---|---|
--service |
none, headless, https (default) |
--update |
none, check, manual (default), auto |
--docs |
keep, markdown (default), none |
--default-log-level |
debug, info, warn (default), error, none |
--service-desc |
Default: <app-name> service; only with a service |
--service-default-port |
Default: 8484; only with HTTPS |
--year |
Default: current year |
--preview |
Print the plan without edits, a branch, tests, or a commit |
--skip-verify |
Skip the generated project's tests and dev build |
--update=none leaves updates to re-running the installer. check retains
discovery and notices, manual also supports applying on request, and auto
adds unattended application. Auto needs a service and is initially disabled in
the generated app; its operator can enable it with
<app> update --automatic=true.
Markdown-only docs keeps docs/content/docs/** and docs/MAINTENANCE.md and
removes everything else under docs/. Both markdown and none remove
.github/workflows/docs.yml; keep retains the full site and its workflow.
README gets a short stub; CONTRIBUTING stays for you to edit. Your copyright
notice is added while the original MIT notice stays intact.
Transplant stops at the failed step, leaves the changes for review, and prints
a recovery command. It never resets or cleans your checkout itself. If tests
or the build fail after the cut, fix the generated project and rerun
./scripts/test.sh and ./scripts/build.sh; the cutter has already removed
itself, so rerunning Transplant isn't a repair path.
See AGENTS.md, the architecture notes, and the maintenance protocol. For everything else see the docs.
./scripts/test.sh
# Test pending changes using a clean Sprout clone:
TRANSPLANT_SPROUT=path/to/sprout/clone go test ./internal/transplant \
-run '^TestSproutCompatibility$' -v -count=1 -timeout=25mThe compatibility test finalizes, tests, and builds HTTPS/auto, CLI/no-update,
and headless/manual trees. CI runs it against Sprout main and requires it before
release. Sprout must support scripts/cut --list-features-json contract version
1; older or unfamiliar templates are refused before any checkout edits.