Skip to main content
Scaffolds a database class and its test file in a module. It prompts for the database type (Postgres, Redis, or SQLite), writes the class under the module’s src/databases directory, generates a matching test spec, and installs the @talosjs/database package if it is missing.

Usage

talos database:create [options]

Examples

talos database:create
talos database:create --name=Analytics
talos database:create --name=Analytics --module=reporting --override

Options

OptionDescriptionDefault
--nameDatabase class name. The Database suffix is appended automatically.Prompted if omitted
--moduleTarget module the class is generated into.shared
--overrideOverwrite an existing class without prompting.false
The database type (Postgres, Redis, or SQLite) has no flag and is always selected through an interactive prompt.

AI Skill

This command ships a matching database:create skill. It generates the database class and its test file, then guides your AI agent through completing a database adapter that extends TypeormDatabase from @talosjs/database.
talos claude:init