CLI
typebase-io-cli codegen
Regenerate type definitions for your project.
Last updated on
Regenerate the type definitions in _generated/.
npx typebase-io-cli codegenRun this after you:
- Add, remove, or rename a file inside
actions/ - Add or remove
auth.ts - Add or remove
env.ts - Add or remove
publisher.ts - Add or remove
db/schema.tsordb/relations.ts - Upgrade
typebase-ioortypebase-io-cli
You do not need to run it when editing the contents of existing files.
The upgrade case matters because _generated/ is written by the version that generated it. A folder left over from an older version can describe a context your server no longer provides. Rerunning codegen re-syncs it.
This command updates:
_generated/server.ts: the router type and action builder_generated/db.d.ts: the database types
npx typebase-io-cli deploy and npx typebase-io-cli generate-server both run the same logic
before they build, so you rarely need this command on its own. Reach for it when you're iterating without rebuilding — for example, to refresh your
editor's types right after adding an action file.