Quick Start
Install Gauze
npm install @ahn/gauzeScaffold a Project
Create a new project directory:
npx gauze create project ./my-appThis creates a runnable Gauze project in ./my-app.
Add .env
Create .env in the current directory, next to the generated example.env file:
mv example.env .envProject commands read .env from the directory where you run npx gauze, while the project path is passed separately as ./my-app.
Use development settings that include:
- Set
GAUZE_ENV="development". - Set
GAUZE_SERVER_HOST="localhost". - Set
GAUZE_SERVER_PORT="4000". - Set JWT secrets for the
database,system, andenvironmentrealms.
Initialize the Database
Run migrations and seed data:
npx gauze project ./my-app migrate run
npx gauze project ./my-app seed runBuild the Frontend Assets
Build the bundled frontend assets with:
npx gauze project ./my-app application buildThis generates the frontend build output for the Gauze UI.
Start the Server
npx gauze project ./my-app application serveThe HTTP server starts on port 4000 by default.
Useful Next Commands
After the server is running, the next commands people usually reach for are:
- Use
npx gauze project ./my-app migrate listto see which migrations exist. - Use
npx gauze project ./my-app migrate current --format jsonto inspect the current migration state. - Use
npx gauze project ./my-app seed runto reload seed data when you need a fresh development dataset. - Use
npx gauze project ./my-app shard plan 4 --format jsonto preview a four-shard layout before moving beyond a monolithic database.
All of these commands follow the same pattern:
npx gauze project <dir> <subcommand>That means the project directory is always explicit in the command. Run project commands from the directory that contains the .env file you want Gauze to load. It is also equivalent in spirit to calling the generated project CLI entrypoint directly with node ${project_dir}/command/gauze.js, because gauze project hands execution off to the project's own command layer while preserving the caller's current working directory.