Evaluate without adopting the SDK
You want to try Project Builder in a repository you already have — without adding
@pbuilder/sdk to its package.json and without restoring that file after every run.
builder init --no-sdk-dependency gives you that: the CLI skips the SDK declaration and its
install, and builder execute runs against an SDK that is simply present in
node_modules.
--no-sdk-dependency only keeps package.json out of it. init still:
- creates or merges
project-builder.json, - creates
schematics/.gitkeep, - writes
.claude/skills/pbuilder/(SKILL.md,use.md,choose.md,create.md), - adds or updates a marker block in
AGENTS.mdorCLAUDE.md— a tracked agent file can change whilepackage.jsonstays untouched.
Schematics you run write their own files. If init fails part-way, the outputs written
before the failure stay on disk.
Before you start
Section titled “Before you start”-
The
builderCLI and Bun are installed — see Installation. -
You know what is already modified, so you can tell trial changes apart later:
Terminal window git status --short
Run the trial
Section titled “Run the trial”-
Preview what
initwill do. Nothing is written or installed:Terminal window builder init . --no-sdk-dependency --dry-run --non-interactiveWith
--no-sdk-dependencyalone, the plan contains nopackage.jsonstep at all. The skill and marker lines are a plan, not an exact prediction of what happens to files that already exist. -
Initialise the workspace:
Terminal window builder init . --no-sdk-dependency --non-interactiveinitadds no SDK entry, nogenerate:typesscript and runs no install. It also removes nothing: an SDK version or script already inpackage.jsonstays, and an SDK already installed stays usable. The warning it prints lists the ways to provide an SDK; the next step is one of them.Want the
generate:typesscript anyway? Add--skip-types-script=false. The full flag matrix is in thebuilder initreference. -
Put an SDK in
node_moduleswithout declaring it.executeneeds a complete SDK atnode_modules/@pbuilder/sdk. With npm or Bun you can install one without touchingpackage.jsonor the lockfile:Terminal window npm install --no-save @pbuilder/sdk# orbun add --no-save @pbuilder/sdkpnpm and Yarn have no equivalent option — their add commands always record the dependency. A later install or prune by your package manager can remove an unsaved package; if that happens, run the command again.
Skip this step if the repository already has an SDK installed.
Alternative: use a global SDK. Instead of installing into
node_modules, pointsdk.rootinproject-builder.jsonat a global install — for example the directorybun add -g @pbuilder/sdkcreates:project-builder.json {"sdk": {"root": "/Users/me/.bun/install/global/node_modules/@pbuilder/sdk"}}The first committing
builder executethen creates a single symbolic link,node_modules/@pbuilder/sdk, pointing at that root. To regenerate types by hand in this setup, see Type generation withsdk.root.To leave
project-builder.jsonuntouched as well, name the same directory per run with--sdk-root(before<collection>:<schematic>) or once with theBUILDER_SDK_ROOTenvironment variable instead. Both overridesdk.root— see SDK source. -
Create and run a schematic:
Terminal window builder new schematic hellobuilder execute default:hellonew schematicwritesschematics/hello/and registers it inproject-builder.json. The generated factory is an empty stub, so this first run reports no changes. From here on, follow Your first schematic to give it real logic.
builder execute has no preview for native schematics: --dry-run is rejected, not
simulated. Put CLI flags before <collection>:<schematic> — after it, --dry-run is
just a schematic input and does not stop any write. Review git diff after every run.
Choose the SDK version
Section titled “Choose the SDK version”With no declaration anywhere, execute requires SDK 0.2.4 or newer — the oldest version
the CLI is tested against. To require a specific floor without adding a dependency, set it
in project-builder.json:
{ "sdk": { "version": "0.2.4" }}A declaration in package.json still takes priority over sdk.version, and an invalid
value fails instead of falling back. The full selection order is in the
SDK requirement reference; each failure reason
and its repair is in SDK diagnostics.
Keep trial files out of Git
Section titled “Keep trial files out of Git”The CLI never edits Git’s exclude files — do it yourself if you want git status to stay
quiet during the trial. Resolve the right file first; in a worktree, .git is not a
directory:
git rev-parse --git-path info/excludeThen add the entries that apply, and only for paths that are currently untracked:
/project-builder.json/.claude/skills/pbuilder//schematics/Local excludes affect untracked files only. They do not hide changes to tracked files — an
agent-file marker, a manifest, a lockfile or generated code still show up in git diff, and
you still need to review them. Do not use git update-index --skip-worktree or
--assume-unchanged to hide those instead. Never exclude a schematics/ directory that
already existed in the repository.
Clean up
Section titled “Clean up”Work from what the trial actually changed — not from a blanket reset:
- Run
git status --shortandgit diff, and compare with the status you noted before the trial. - Remove only files the trial created:
project-builder.json,schematics/and.claude/skills/pbuilder/— when they did not exist before. - Undo only trial changes in tracked files, such as the marker block added to
AGENTS.mdorCLAUDE.md. Keep any edits of your own. - Remove the trial SDK from
node_modulesif you installed one. If you used an external root, remove the link it left behind (test -L node_modules/@pbuilder/sdk && rm node_modules/@pbuilder/sdk) — after removing thesdk.rootkey, or unsettingBUILDER_SDK_ROOT;--sdk-rootleaves nothing else to undo. Also remove the lines you added to the exclude file.
Do not reach for git clean or git reset --hard: they also destroy work that has nothing
to do with the trial.
Adopt Project Builder
Section titled “Adopt Project Builder”When the trial convinces you:
-
Remove the exclude lines you added, and decide which of
project-builder.json,schematics/and.claude/skills/pbuilder/to commit. -
Declare the SDK with one package-manager command, pinning a version if you need reproducible installs:
Package manager Command npm npm install --save-dev @pbuilder/sdkpnpm pnpm add -D @pbuilder/sdkYarn yarn add --dev @pbuilder/sdkBun bun add -D @pbuilder/sdkThis changes
package.jsonand may change the lockfile. -
Optionally let
initadd the missinggenerate:typesscript.--forcealso mergesproject-builder.jsonand regenerates the skill files and marker, so preview first and review the full diff afterwards:Terminal window builder init . --force --dry-run --non-interactivebuilder init . --force --non-interactive
Related
Section titled “Related”builder init— outputs, flags and thepackage.jsonedit contract.builder execute— running schematics and the SDK requirement.- CLI output and errors — every error code and its remedy.