Definition: stack.json
stack.json is the manifest file that declares a KERNSTACK project: the stack target, gateway routes, and every resource — functions, workers, tables, buckets, search indexes, inference endpoints, secrets, alert rules, and workflows. It lives in git and is applied with kernstack deploy.
What a stack.json contains
Three blocks do the work. stack names the target (for example shop.default) and can pin the environment and the deploy gate. gateway.routes exposes the project: http routes to functions or workers, websocket routes to functions, prefix routes serving buckets. resources declares what runs and stores: functions, workers, buckets, tables, search_indexes, inference_endpoints, secrets, alert rules and channels, and workflows.
Rules of the file
Conventions keep the file small: omit src when code lives at functions/{name} or workers/{name}; omit seed when seed data sits at seed/tables/{name}.json. Deploy-time values that must not be committed live in a gitignored .stack.env and are referenced from the manifest. Removing a resource from the file deletes it on deploy — listed first under “Will delete” and refused until a person confirms.
Frequently asked questions
With two CLI commands: kernstack plan previews creates, updates, and deletes (also available as --json for tools and agents), and kernstack deploy applies the approved plan and prints the resulting route URLs.
It declares secrets; values either generate on deploy or arrive through the gitignored .stack.env file referenced with {{ref-env-file://KEY}}. Resolved values are stored as ref-secret references, not plaintext in git.
The plan lists it under “Will delete”, and deploy refuses until --confirm-destructive is passed. Creates and updates run before deletes, so renames are safe.
Related capabilities, architectures, and comparisons
Ship your stack on the Software Lifecycle Cloud.
Closed preview on dedicated European infrastructure. Bring a repository or start from a blueprint.