feat(storage): mosaic storage CLI surface #405

Merged
jason.woltje merged 1 commits from feat/mosaic-storage-cli into main 2026-04-05 05:48:15 +00:00
Owner

Implements task CU-05-02 from mission cli-unification-20260404.

Adds registerStorageCommand to @mosaicstack/storage with subcommands:

  • mosaic storage status: show configured tier, reachability, connection string (password redacted)
  • mosaic storage tier show: print active tier and config source
  • mosaic storage tier switch tier: switch between pglite and postgres with next-step instructions
  • mosaic storage export path: pragmatic stub with pg_dump or cp instructions per tier
  • mosaic storage import path: pragmatic stub with psql or cp instructions per tier
  • mosaic storage migrate: thin wrapper that shells out to pnpm db:migrate or prints the command

Changes:

  • packages/storage/src/cli.ts: new registerStorageCommand function
  • packages/storage/src/cli.spec.ts: smoke tests (9 tests, all passing)
  • packages/storage/src/index.ts: export registerStorageCommand
  • packages/storage/package.json: add commander dependency
  • packages/mosaic/package.json: add @mosaicstack/storage workspace dependency
  • packages/mosaic/src/cli.ts: wire registerStorageCommand into root CLI

All quality gates pass: typecheck, lint, build, test, format:check

Implements task CU-05-02 from mission cli-unification-20260404. Adds registerStorageCommand to @mosaicstack/storage with subcommands: - mosaic storage status: show configured tier, reachability, connection string (password redacted) - mosaic storage tier show: print active tier and config source - mosaic storage tier switch tier: switch between pglite and postgres with next-step instructions - mosaic storage export path: pragmatic stub with pg_dump or cp instructions per tier - mosaic storage import path: pragmatic stub with psql or cp instructions per tier - mosaic storage migrate: thin wrapper that shells out to pnpm db:migrate or prints the command Changes: - packages/storage/src/cli.ts: new registerStorageCommand function - packages/storage/src/cli.spec.ts: smoke tests (9 tests, all passing) - packages/storage/src/index.ts: export registerStorageCommand - packages/storage/package.json: add commander dependency - packages/mosaic/package.json: add @mosaicstack/storage workspace dependency - packages/mosaic/src/cli.ts: wire registerStorageCommand into root CLI All quality gates pass: typecheck, lint, build, test, format:check
jason.woltje added 1 commit 2026-04-05 05:23:12 +00:00
feat(storage): add registerStorageCommand for mosaic storage CLI surface
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
0e165df279
Implements CU-05-02: adds `mosaic storage` command group with subcommands
status, tier show, tier switch, export, import, and migrate. Pragmatic
stubs print actionable instructions for unimplemented export/import tiers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje force-pushed feat/mosaic-storage-cli from 0e165df279 to 206cc799f3 2026-04-05 05:36:28 +00:00 Compare
jason.woltje merged commit 751e0ee330 into main 2026-04-05 05:48:15 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#405