Type-Safe
Full TypeScript support with Zod schema validation. Your CLI options are fully typed from definition to execution.
Type-Safe
Full TypeScript support with Zod schema validation. Your CLI options are fully typed from definition to execution.
Fluent API
Chain commands, arguments, and options with a clean builder pattern. Easy to read and maintain.
AI-Ready
First-class support for Vercel AI SDK. Expose your CLI as an AI tool with a single method call.
Auto Help
Automatic help generation from your schema definitions in multiple formats: text, ANSI, markdown, HTML, JSON.
Nested Commands
Support for deeply nested subcommands with full type inference throughout.
Standard Schema
Built on Standard Schema for maximum compatibility. Works with Zod 3.25+ or 4.x.
import { createPadrone } from 'padrone';import * as z from 'zod/v4';
const program = createPadrone('myapp') .command('greet', (c) => c .options( z.object({ names: z.array(z.string()).describe('Names to greet'), prefix: z.string().optional().describe('Prefix').meta({ alias: 'p' }), }), { positional: ['...names'] }, ) .action((options) => { options.names.forEach((name) => { console.log(`Hello, ${options.prefix ?? ''} ${name}!`); }); }), );
program.cli();myapp greet John Jane -p Mr.# Output:# Hello, Mr. John!# Hello, Mr. Jane!npm install padrone zod# orbun add padrone zod