Reference
bsv-scaffold.json
The manifest every run writes. What's in it, why later runs read it, and how it records exactly where a project came from.
Every run writes bsv-scaffold.json at the project root. It's the CLI's memory of your project: later add runs read it to reuse your stack, folders and network, and to offer only the capabilities you don't have yet.
Generated project#
{
"version": 2,
"name": "my-app",
"network": "test",
"stack": {
"frontend": { "framework": "react", "variant": "react-ts" },
"backend": { "framework": "express" }
},
"targets": { "client": "client", "server": "server" },
"bsvDir": "src/bsv",
"capabilities": ["wallet-connect", "wallet-login", "signed-requests"],
"starter": { "id": "full-stack", "kind": "generated" }
}Complete example#
{
"version": 2,
"name": "my-meter-app",
"starter": {
"id": "meter",
"kind": "repository",
"repository": "https://github.com/p2ppsr/meter.git",
"ref": "master",
"commit": "<40-character SHA of the cloned commit>"
}
}(Trimmed. Example manifests also carry the stack and target fields.)
Fields#
| Field | Type | What it records |
|---|---|---|
version |
2 |
manifest format. Version 1 files from older CLIs are still read |
name |
string |
the project name |
network |
"main" | "test" | "ttn" |
the default network |
stack |
{ frontend?, backend? } |
frameworks, reused by add |
targets |
{ client?, server? } |
app folders, so add puts files in the same place |
bsvDir |
string |
where capability files live |
capabilities |
string[] |
what's installed. add merges new ids in |
starter.id |
string |
which starter produced the project |
starter.kind |
"generated" | "repository" |
generated scaffold or cloned example |
starter.repository |
string |
complete examples: the source repo |
starter.ref |
string |
complete examples: the branch cloned |
starter.commit |
string |
complete examples: the exact commit cloned |
Should I commit it?#
Yes. It's small, it describes the project, and it makes add runs (yours, your teammates' or your agent's) behave predictably. Don't edit it by hand. Let the CLI keep it in sync.
Reproducing a project#
The manifest is a record, not a recipe: the CLI doesn't rebuild a project from it. A folder containing only bsv-scaffold.json is detected as an existing project, so a plain run goes to add mode, and new --yes there stops with a new project needs at least a frontend or a backend.
To recreate a generated project, run the same command again, or better, commit a config.json and use --file. For complete examples, repository + commit pin the exact code: git clone <repository>, then git checkout <commit>.