Skip to content

CLI Commands & Flags

  • microbase serve (default) — Start HTTP API server and embedded Admin UI.
  • microbase init-config [--path <path>] [--force] — Generate microbase.conf (mode 0600) with fresh JWT_SECRET and ENCRYPTION_KEY.
  • microbase update [--check] [--dry-run] [--to vX.Y.Z] — Check, dry-run verify SHA-256, or self-update/rollback binary.
  • microbase superuser [--config <path>] [--db <url>] upsert <email> <password> — Create or reset a superuser account.
  • microbase migrate [--config <path>] [--migrationsDir ./mb_migrations] <up|down|status|create <name>|snapshot> — Run file-based migrations.
  • microbase version (or -v, --version) — Print current version and exit.
Flag Env Var Default Description
-c, --config <path> — auto Path to microbase.conf
--db <url> DATABASE_URL — Override PostgreSQL URL
--dir <path> DATA_DIR ./storage Local storage directory
--http <addr> — 0.0.0.0:3000 Listen address (host:port)
--host / --port HOST / PORT 0.0.0.0 / 3000 Listen host and port
--origins <list> CORS_ORIGINS * Comma-separated CORS origins
--no-ui DISABLE_ADMIN_UI=true false Headless API-only mode
--dev DEV=true false Verbose debug logging
--hooksDir <path> HOOKS_DIR ./mb_hooks JS hooks directory
--migrationsDir <p> MIGRATIONS_DIR ./mb_migrations Migrations directory