Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | import { Argument, Command, Flag } from 'effect/cli'; |
| 2 | import { runTriggersCreate } from './triggers.create.handler'; |
| 3 | |
| 4 | const triggerName = Argument.String('trigger-name').pipe( |
| 5 | Argument.withDescription('Trigger slug (e.g. "GMAIL_NEW_GMAIL_MESSAGE")'), |
| 6 | Argument.optional |
| 7 | ); |
| 8 | |
| 9 | const connectedAccountId = Flag.String('connected-account-id').pipe( |
| 10 | Flag.withDescription('Connected account ID (nanoid)'), |
| 11 | Flag.optional |
| 12 | ); |
| 13 | |
| 14 | const triggerConfig = Flag.String('trigger-config').pipe( |
| 15 | Flag.withDescription('Trigger config as JSON string'), |
| 16 | Flag.optional |
| 17 | ); |
| 18 | |
| 19 | export const triggersCmd$Create = Command.make( |
| 20 | 'create', |
| 21 | { triggerName, connectedAccountId, triggerConfig }, |
| 22 | runTriggersCreate |
| 23 | ).pipe(Command.withDescription('Create a new trigger instance.')); |