Skip to main content
Generates a service class in the target module. It writes modules/<module>/src/services/<Name>Service.ts and a mirrored modules/<module>/tests/services/<Name>Service.spec.ts, and installs the @talosjs/service dependency when missing.

Usage

talos service:create [options]

Examples

Run with no flags to be prompted for the service name:
talos service:create
Create a service non-interactively in a specific module:
talos service:create --name=Invoice --module=billing
talos service:create --name=UserProfile

Options

OptionDescriptionDefault
--nameService name (normalized to PascalCase, the Service suffix is appended).Prompted if omitted
--moduleTarget module.shared
--overrideOverwrite an existing service file without confirmation.false

AI Skill

This command ships a matching service:create skill. The skill generates the service class and test file, then completes the implementation — defining a proper data type, implementing execute() with the business logic, and injecting dependencies through the constructor. Your AI agent uses it when creating a new business-logic service that implements IService from @talosjs/service.
talos claude:init