substrate add to bring a shared workflow template into a project that already has a .substrate/. It imports the workflow — boards with their groups, field schemas, and policies — but never tasks, comments, or any database contents. Running without --yes is always safe: the command validates and previews but writes nothing.
Usage
Arguments and Options
string
required
A local directory. The CLI is network-free and never clones — your agent (or you) clones the repo first. Resolves via a
substrate-template.json manifest at its root, or by convention if its boards live under .substrate/boards/ or boards/.flag
Apply the template. Without this flag,
add validates and previews and writes nothing.string
Rename a single-board template’s board on the way in. Use this when the template’s board id collides with one you already have.
Run without
--yes first, always. The preview validates the template and shows exactly what would be written before you commit to it.Applying Forks the Workflow
When you apply a template, Substrate forks its workflow into your.substrate/. You own the copy from that moment — there is no upstream link and no update path. Future changes to the original template do not propagate automatically.
Collisions and Rollback
A board-id collision is refused by default —add will not overwrite a board you already have. Use --as <id> as the escape hatch when working with a single-board template.
An apply is transactional: if a write fails partway through, the files that apply created are removed in reverse order. Pre-existing boards are never touched.
See Also
substrate init --templatefor seeding a fresh project.- Publish a Template for the manifest format.