stacksdapp init from the repository root to add the Scaffold Stacks frontend, TypeScript bindings, and debug UI to an existing Clarinet project.
Contents
- Requirements
- What init does
- Standard Clarinet layout
- Already scaffold layout
- Layout conflicts
- Init vs upgrade
- Next steps
Requirements
- Clarinet 3.21+
- Run from the repo root where Clarinet lives today
What init does
- Normalizes layout to
contracts/Clarinet.tomlandfrontend/when needed - Adds missing frontend template files
- Runs
npm installinfrontend/andcontracts/ - Runs
stacksdapp generate
If
frontend/ already exists but frontend/scripts/export-abi.mjs is missing, init exits with an error. Add that script, or move frontend/ temporarily, then run init again.Standard Clarinet layout
Before:path = "contracts/token.clar" in Clarinet.toml still resolve. The file ends up at contracts/contracts/token.clar, with Clarinet.toml under contracts/.
Already scaffold layout
npm install and stacksdapp generate run.
Layout conflicts
init fails if both of these exist:
./settings./contracts/settings