Licensing and Activation
A licence unlocks the paid commands on the commercial build. Activate it once on a machine, or pass the key for a single run. Without a valid licence those commands exit 4 and tell you which edition they need.
Open-source commands (migrate, info, validate, undo, …) never need a licence.
Activate
dblift license activate <your-license-key>
That stores the key in ~/.dblift/license.key so later commands pick it up. Confirm what you have:
dblift license info
You should see the edition (Pro or Enterprise) and the expiry.
Use the key without writing a file
Useful in CI, containers, and short-lived agents:
export DBLIFT_LICENSE_KEY="<your-license-key>"dblift license checkdblift validate-sql
Or for one invocation only:
dblift --license-key "<your-license-key>" validate-sql
Precedence is --license-key → DBLIFT_LICENSE_KEY → ~/.dblift/license.key.
Check before a paid command
license check exits 0 when the key is present, valid and not expired. Use it as a pipeline gate:
dblift license checkdblift plan --format text,html --output-dir dblift-reports
A missing, invalid or expired key fails the check. Paid commands fail the same way if you skip the check:
$ dblift diff'diff' is a dblift Pro command and is not included in the open-source edition.Compare applied migrations against live database schema (drift detection).Learn more and upgrade: https://dblift.com/upgrade$ echo $?4
Exit 4 means a licence is required — not that a migration failed. Treat it separately in CI.
Remove the stored key
dblift license deactivate
That deletes ~/.dblift/license.key. Environment variables and --license-key are unchanged.
Which commands need a licence
| Command | Edition |
|---|---|
diff | Pro |
export-schema | Pro |
validate-sql | Pro (custom --rules-file or --rules security). Packs and profiles: Enterprise |
data plan · data apply · data status | Pro |
data undo | Enterprise |
snapshot | Enterprise |
plan | Enterprise |
preflight | Enterprise |
license itself is how you manage the key on the commercial build. See Editions & tiers for what each edition adds, and dblift license for flags.