Every bsm command and option (version 0.3.0).
| Command | Options | Does |
|---|
bsm init | [--provider sqlserver|postgresql] | Create bsm.yaml, bsm.plan, folders and .gitattributes. |
bsm add <name> | [-r|--requires a b] [-n|--note text] [--notx] [--irreversible] | Scaffold changes/<name>/ and append it to the plan. |
bsm add <name> --from-diff | [--shadow-env env] [--keep-shadow] [--exclude schema.name…] [--dry-run] [--no-record] [-r …] [-n …] | Generate deploy.sql and revert.sql from schema edits made in the environment's database, compared with a shadow database built from the plan; records the change as applied there. |
bsm tag <name> | | Tag the last change in the plan (use as @name). |
bsm plan check | | Validate plan, folders, lint and variable definitions. No database. |
bsm plan show | | Changes with script hashes and chain ids; the plan head. No database. |
bsm status | [--exit-code] | Plan versus database: pending, applied, edited, orphans, certified. --exit-code returns 3 when not up to date. |
bsm deploy | [--to change|@tag] [--dry-run] [--script file] [--ordering dependency|strict] [-y] | Provision environment resources, deploy pending changes, apply changed repeatables, record a schema fingerprint. --script writes a reviewable SQL file instead. |
bsm revert | --to x | --last n | --all | --repeatable name… [--dry-run] [-y] [--allow-variable-drift] | Revert with the scripts stored at deploy time; --repeatable restores a repeatable's previous definition. |
bsm rebase | --to x [-y] [--allow-variable-drift] | Revert to x, then deploy to the head. |
bsm rework <change> | [--as name] [-n|--note text] | Add a change that supersedes a deployed one: a copy of its deploy script to edit, with a revert that restores it. |
bsm repair | [changes…] | --all [--reason text] [--dry-run] [-y] | Accept edits to deployed changes without running SQL; re-chains and re-certifies the journal. |
bsm bundle create | [-o file] [--no-config] | Write a hash-verified bundle of the project. No database. |
bsm bundle verify <file> | | Check every file in a bundle against its manifest. No database. |
bsm diff-schema | [--against env] [--exit-code] [--script file] | Schema differences: live versus the schema recorded after the last deploy, or versus another environment. --exit-code returns 3 when they differ; --script writes SQL that turns this database into the other. |
bsm verify | | Hashes versus working copy, rendered-SQL drift, verify scripts (rolled back), schema drift. Exit 1 on problems. |
bsm log | [-n|--limit 50] | Deploy, revert, fail, repeatable and resource events, newest first. |
bsm baseline | --to x | --from flyway|dbup|grate|roundhouse|sqitch [--journal schema.table] [--skip-checksums] [-y] | Record changes as applied without running them: up to x, or as far as the old tool's journal in the database says (with repeatables it already applied). |
bsm import flyway <folder> | [--config file] [--location dir…] [--provider sqlserver|postgresql] [--dry-run] | Convert a Flyway project into a new bsm project (written to -C). No database. |
bsm import dbup <folder> | [--file-names] [--run-always glob…] [--no-variables] [--var name=value…] [--dry-run] | Convert DbUp scripts into a new bsm project (written to -C). No database. |
bsm import grate <folder> | [--folder key=name…] [--environment name…] [--ignore-directory-names] [--no-tokens] [--var name=value…] [--dry-run] | Convert a grate or RoundhousE scripts folder into a new bsm project. No database. |
bsm import sqitch <folder> | [--engine name] [--provider …] [--dry-run] | Convert a Sqitch project into a new bsm project. No database. |
bsm vars | | Every variable for the environment: value, source, description. |
bsm render <name> | [-k|--kind deploy|revert|verify] | Print a change or repeatable exactly as it would run. |
bsm env list | | Environments and templates. |
bsm env show | | The selected environment, merged, secrets masked. |
bsm env status | | Environment resources (Always Encrypted keys) versus the database. |
bsm env provision | [--dry-run] [--allow-destructive] [-y] | Create or rotate environment resources without deploying changes. |
bsm auth clear | | Forget saved Entra sign-ins. |
bsm doctor | | Configuration, Entra token, connection, server facts, journal, resources. |
Revert, rebase, repair, baseline and destructive provisioning ask for confirmation. In a protected environment, so does deploy, and you must type the environment name. Non-interactive runs (redirected input, --json) fail instead of hanging unless you pass --yes.