Skip to main content

CLI

Compass has a CLI to help devs run a few scripts locally.

bun run cli --help

Primary file:

  • packages/scripts/src/cli.ts

Commands To Know

CommandImplementationNotes
bun run cli migrate <umzug-subcommand>packages/scripts/src/commands/migrate.tsRuns wrapped Umzug subcommands: pending, executed, up, down, and create. Inspect bun run cli migrate --help before bounded execution.
bun run cli migrate pendingpackages/scripts/src/commands/migrate.tsLists pending migrations.
bun run cli migrate executedpackages/scripts/src/commands/migrate.tsLists executed migrations.

Migration Internals

The migration command:

  • starts Mongo
  • builds an Umzug CLI dynamically
  • loads migrations from packages/scripts/src/migrations
  • stores execution state in Mongo collections

There is also a separate web-local migration system under packages/web/src/common/storage/migrations; do not confuse the two.