TypebaseTypebase
CLI

typebase-io-cli init

Scaffold a new Typebase project structure.

Last updated on

Scaffold a new Typebase project structure.

npx typebase-io-cli init

Creates a typebase/ directory with:

  • tsconfig.json: TypeScript config
  • db/schema.ts: example database schema
  • db/relations.ts: example relations
  • actions/queries/todos.ts: example query actions
  • actions/mutations/todos.ts: example mutation actions
  • _generated/: auto-generated type files

Options

FlagDescription
-f, --forceOverwrite tsconfig.json and regenerate the scaffolded example files
--with-authInclude an example auth.ts with email/password authentication
--skip-exampleSkip 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.

On this page