Goal
Reconcile an application predictably while keeping deployment and deletion explicit.Prerequisites
- An authenticated profile
- A valid
stackshift.com/v1application manifest - Required secret values in the process environment or an env file
Workflow
1
Initialize a new file or export an existing application.
2
Validate locally and against the configured server.
3
Preview reconciliation with
plan.4
Apply the current plan without deploying.
5
Add
--deploy only when the manifest services should be built and rolled out.Initialize
init creates a new file with an application name and a public web service on port 3000. It uses create-only file semantics and will not overwrite an existing path.
Validate
Validation always performs strict local parsing and schema checks. By default, it then submits the unchanged document to the server validation contract.--local skips only the server check. It uses the same schema as the editor line # yaml-language-server: $schema=https://stackshift.cloud/schema/stackshift.json, so it works offline.
Plan
A plan records its ID, application, manifest checksum, live application revision, changes, warnings, and expiry. Table output marks destructive changes. JSON or YAML output includes the complete typed plan. Each change carries a class: automatic, approval or blocked. Automatic changes apply directly. Approval changes need the owner to approve them. Blocked changes cannot be applied until the file changes. Resources that exist but are not in the file are listed as not instackshift.yaml and are left alone. See Config as code for the full table.
--prune asks the server to include deletions only for resources previously recorded as owned by this manifest. It does not authorize deletion during plan.
Apply without deployment
apply loads the manifest, creates a fresh plan, confirms destructive changes when required, resolves secret references, and submits the plan ID, checksum, live revision, manifest, flags, and resolved secrets. Changes that need approval wait for the owner in the dashboard instead of applying straight away.
Applying changes does not deploy services unless --deploy is present.
Apply and deploy
With--deploy, the server queues builds for every service in the manifest. The CLI follows each build log stream on standard error unless --detach is also supplied.
Pruning and confirmation
apply --prune is always confirmation-gated. Any plan containing a destructive change also requires confirmation. In a non-interactive process, use --yes explicitly.
Stale-state protection
The apply request carries the plan ID, checksum, and live revision returned by planning. The server rejects the apply if the live application or document no longer matches that plan. Re-runplan, review the new changes, and apply again.
Export an existing application
export resolves an application by UUID or unique name and writes its server-generated manifest. It refuses to overwrite a file unless --force is provided, and forced replacement requires confirmation.
Expected result
The application matches the manifest, with no deployment or pruning beyond the flags supplied.
Common failures
Related guides
Config as code (stackshift.yaml)
Describe an application in one file in your repository. Every push applies it, every pull request shows a plan, and risky changes wait for you.
Application manifest schema
Define one application, its services, environments, bindings, attached resources, cron jobs, and domains.
Deploy Git revisions and local directories
Deploy a branch, tag, commit, or deterministic local source archive and follow the rollout.
Output, pagination, errors, and automation
Select stable machine output, fetch paginated results, and handle documented exit codes.