QUESTPIE
Build Your BackendArchitecture

CLI

QUESTPIE CLI commands — generate, dev, migrate, seed, push, add.

The QUESTPIE CLI manages codegen, database operations, and development tooling.

Setup

The CLI reads questpie.config.ts from your project root:

questpie.config.ts
export { default } from "./src/questpie/server/questpie.config";

Commands

generate

Scan file conventions and generate types:

bunx questpie generate

Produces .generated/ with app instance, types, and module augmentation.

dev

Watch mode — re-runs codegen on file changes:

bunx questpie dev

push

Push schema changes directly to database (no migration files):

bunx questpie push

Good for development. For production, use migrations.

migrate:generate

Generate a migration from schema diff:

bunx questpie migrate:generate

Creates a migration file in the configured directory (default: ./src/migrations).

migrate:up

Run pending migrations:

bunx questpie migrate:up

migrate:down

Roll back the last migration:

bunx questpie migrate:down

migrate:fresh

Drop all tables and re-run all migrations:

bunx questpie migrate:fresh
This destroys all data. Use only in development.

migrate:reset

Reset migration state without dropping tables:

bunx questpie migrate:reset

seed:run

Run seed files:

bunx questpie seed:run

Seed files are in the configured directory (default: ./src/seeds).

add

Add a QUESTPIE module or starter:

bunx questpie add <module>

Config Options

questpie.config.ts
import { runtimeConfig } from "questpie";

export default runtimeConfig({
	// ...
	cli: {
		migrations: {
			directory: "./src/migrations",
		},
		seeds: {
			directory: "./src/seeds",
		},
	},
});

On this page