/sprite-bootstrap creates or converges a Sprite into the development environment declared by the project. It is idempotent where practical: it reuses an existing Sprite and checkout, creates only missing services, reapplies configured policies, and can leave a known-good checkpoint.
In order, bootstrap:
- Chooses a Sprite name from the command argument, current user selection, configured
sprite, orpi-<project-name>. - Creates that Sprite when it does not exist, otherwise reuses it.
- Creates
remoteCwd. - Clones
bootstrap.repositorywhen the directory has no.git. If omitted, it uses the local checkout'soriginURL when available. - Checks out
bootstrap.branchwhen configured. - Runs each trusted
bootstrap.commandsshell string inremoteCwd. - Applies configured network, privilege, and resource policies.
- Creates any missing configured services.
- Creates a checkpoint unless
bootstrap.checkpointisfalse.
/sprite-bootstrap [name]
The equivalent model tool is sprite_bootstrap, with an optional name argument.
Bootstrap returns an explicit Sprite handle internally. It does not change the user's selected routing target. Run /sprite-use <name> afterward when normal Pi tools should target the bootstrapped environment.
{
"sprite": "pi-my-project",
"remoteCwd": "/workspace/my-project",
"bootstrap": {
"repository": "git@github.com:example/my-project.git",
"branch": "main",
"commands": ["npm ci", "npm run build"],
"services": [
{
"name": "web",
"cmd": "npm",
"args": ["run", "dev"],
"dir": "/workspace/my-project",
"httpPort": 3000
}
],
"checkpoint": true
}
}Policies are configured in the top-level policy section; see Policies. Service fields are covered in Services.
Project configuration is ignored until Pi trusts the project. Bootstrap also checks trust immediately before honoring bootstrap.commands and refuses to run them otherwise.
Bootstrap clones a Git repository; it does not upload local files or uncommitted changes. If the destination already contains a .git directory, it does not fetch, pull, reset, or replace the checkout. A configured branch is checked out, but convergence intentionally avoids destructive synchronization.
Setup commands run every time bootstrap runs. Make them safe to repeat.
/sprite-bootstrap pi-my-project
/sprite-use pi-my-project /workspace/my-project
/sprite-services
/sprite-checkpoints