Windows & Linux

CLI release

Coming January 2027. The dbHydrate command-line tool isn't available yet. These preview docs describe the planned first release; commands and options may change.
Browse CLI documentation

Quick start

This walkthrough takes a reviewed schema change from a staging database to production: export once from the desktop app, then compare, rehearse and apply from a terminal.

On this page

Before you start

  • The dbHydrate desktop app with a license or an active trial (trials can run compare and dry-run).
  • A tested source connection (for example staging) and target connection (for example production) of the same database engine.
  • Optionally, a saved Schema Sync profile with the schemas and objects you want to compare.
  • A Windows x64 or Linux x64 machine that can reach both databases and api.dbhydrate.com.

1. Export a run file

  1. In the desktop app, open your saved profile and choose Export for CLI.
  2. Label it, for example “Release: staging to production”.
  3. Leave Include password off for the production target.
  4. Keep the lifetime at 365 days, and choose Generate to create a passphrase. Copy it into your password manager or CI secret store.
  5. Save the file as release.dbhrun.

The file holds both connections and the profile’s choices, encrypted. See export files for every option.

2. Install the CLI

Download the single file for your platform, verify it and put it on your PATH. See install.

Code example
dbhydrate --version

3. Check the file

file inspect reads only the file’s signed, readable header. It needs no passphrase and doesn’t contact your databases.

Command & illustrative output
$ dbhydrate file inspect release.dbhrun
  Kind:        run file (source and target)
  Engine:      PostgreSQL
  Label:       Release: staging to production
  Target:      production environment
  Owner:       license seat
  Expires:     2027-11-16
  Signature:   valid

Sample output, for illustration. The final layout is published at launch.

4. Compare

Code example
export DBHYDRATE_CONN_PASSPHRASE="…"            # from your password manager
export DBHYDRATE_TARGET_PASSWORD="…"            # the file has no target password
dbhydrate compare --run release.dbhrun --report compare.md
Code example
  ~ table  public.orders           column "discount_code" missing on target
  + index  public.idx_orders_date  missing on target
  2 differences, 0 destructive.

The exit code is 1 because differences were found. compare never shows SQL; it lists which objects differ and how.

5. Rehearse with a dry run

Code example
dbhydrate dry-run --run release.dbhrun --report dry-run.md

Every change runs against the target and is then rolled back, so problems such as a missing permission or a value that breaks a new constraint show up before anything changes.

6. Apply

Code example
export DBHYDRATE_LICENSE_KEY="…"               # the key of the seat that exported the file
dbhydrate apply --run release.dbhrun --confirm-target orders_prod --report apply.md

--confirm-target must match the target database’s name. A mistyped name stops before anything changes.

Next steps