The basalt CLI runs Postgres, the gateway, auth and storage in containers on your machine, so you can build offline and test migrations before they reach production.
Install the CLI
- macOS
- Linux
- npm
brew install basalt/tap/basaltcurl -fsSL https://get.basalt.run/cli | shnpm install basalt --save-devStart the stack
basalt init
basalt startThe first start pulls about 1.2 GB of images. Later starts take a few seconds.
Service | Local URL |
|---|---|
API gateway |
|
Studio |
|
Postgres |
|
Mail catcher |
|
Write a migration
basalt migration new add_notes_tableEdit the new file under basalt/migrations/, then apply it with basalt db reset.
Why does `db reset` drop my data?
Reset rebuilds the database from migrations and the seed file, so the local database always matches what production will get. Put fixture rows in basalt/seed.sql.