CLI
typebase-io-cli init
Scaffold a new Typebase project structure.
Last updated on
Scaffold a new Typebase project structure.
npx typebase-io-cli initCreates a typebase/ directory with:
tsconfig.json: TypeScript configdb/schema.ts: example database schemadb/relations.ts: example relationsactions/queries/todos.ts: example query actionsactions/mutations/todos.ts: example mutation actions_generated/: auto-generated type files
Options
| Flag | Description |
|---|---|
-f, --force | Overwrite tsconfig.json and regenerate the scaffolded example files |
--with-auth | Include an example auth.ts with email/password authentication |
--skip-example | Skip generating the example schema and actions |
init --force does more than recreate tsconfig.json. It reruns the scaffold step and overwrites the generated example files too, including
db/schema.ts, db/relations.ts, actions/queries/todos.ts, actions/mutations/todos.ts, and the example auth.ts when --with-auth is used.