Skip to content

Interface: CliSubcommandDefinition<T>

Makaio Framework


Makaio Framework / kernel/cli / CliSubcommandDefinition

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.

T extends z.ZodObject<z.ZodRawShape>

A z.ZodObject whose shape defines the command’s options/args.

readonly description: string

Defined in: ../../../packages/kernel/src/cli/types.ts:126

One-line description shown in help text.


readonly handler: (ctx) => Promise<void>

Defined in: ../../../packages/kernel/src/cli/types.ts:130

Handler invoked with the parsed, validated context.

CommandContext<output<T>>

Promise<void>


readonly name: string

Defined in: ../../../packages/kernel/src/cli/types.ts:124

Subcommand name (e.g. 'list', 'switch').


readonly schema: T

Defined in: ../../../packages/kernel/src/cli/types.ts:128

Zod object schema defining the command’s options and arguments.