Skip to main content
Scaffolds a PubSub event class and its test file into the target module, then registers the class in the events array of the module. It writes modules/<module>/src/events/<Name>Event.ts and modules/<module>/tests/events/<Name>Event.spec.ts, and installs the @ooneex/event dependency if it is missing. The channel defaults to the kebab-case form of the name when --channel is omitted.

Usage

ooneex event:create [options]

Examples

ooneex event:create
ooneex event:create --name=OrderShipped
ooneex event:create --name=UserCreated --module=auth --channel=user-created

Options

OptionDescriptionDefault
--nameResource name (the Event suffix is appended automatically).Prompted if omitted
--moduleTarget module.shared
--channelPubSub channel name.kebab-case name
--overrideOverwrite an existing file without confirmation.false

AI Skill

This command ships a matching event:create skill. Your AI agent uses it to generate a new publish/subscribe event class and its test file, then implement the data type, channel, and handler for an event that extends PubSub from @ooneex/event.
ooneex claude:init