Interface: CliSubcommandDefinition<T>
Makaio Framework / kernel/cli / CliSubcommandDefinition
Interface: CliSubcommandDefinition<T>
Section titled “Interface: CliSubcommandDefinition<T>”Defined in: ../../../packages/kernel/src/cli/types.ts:122
A single CLI subcommand with a Zod schema and strongly-typed handler.
The schema defines both the data shape (for type inference) and CLI metadata
(descriptions, short flags) via Zod’s .meta() on each field.
Type Parameters
Section titled “Type Parameters”T extends z.ZodObject<z.ZodRawShape>
A z.ZodObject whose shape defines the command’s options/args.
Properties
Section titled “Properties”description
Section titled “description”
readonlydescription:string
Defined in: ../../../packages/kernel/src/cli/types.ts:126
One-line description shown in help text.
handler
Section titled “handler”
readonlyhandler: (ctx) =>Promise<void>
Defined in: ../../../packages/kernel/src/cli/types.ts:130
Handler invoked with the parsed, validated context.
Parameters
Section titled “Parameters”CommandContext<output<T>>
Returns
Section titled “Returns”Promise<void>
readonlyname:string
Defined in: ../../../packages/kernel/src/cli/types.ts:124
Subcommand name (e.g. 'list', 'switch').
schema
Section titled “schema”
readonlyschema:T
Defined in: ../../../packages/kernel/src/cli/types.ts:128
Zod object schema defining the command’s options and arguments.