Skip to main content
Generate a TypeORM entity class alongside its test file in the target module and add the class to the module’s entities array. The command writes modules/<module>/src/entities/<Name>Entity.ts and modules/<module>/tests/entities/<Name>Entity.spec.ts. When --table-name is omitted, the table name defaults to the snake_case pluralized form of the name.

Usage

talos entity:create [options]

Examples

talos entity:create
talos entity:create --name=Product
talos entity:create --name=UserProfile --module=auth --table-name=user_profiles

Options

OptionDescriptionDefault
--nameResource name (the Entity suffix is appended automatically).Prompted if omitted
--moduleTarget module.shared
--table-nameDatabase table name.snake_case pluralized name
--overrideOverwrite an existing file without confirmation.false

AI Skill

This command ships a matching entity:create skill. Your AI agent uses it to generate the entity class and its test file, then fill in the columns, relations, and table mapping for the database entity.
talos claude:init