Type-Safe
Full TypeScript support with Zod schema validation. Your CLI arguments are fully typed from definition to execution.
Type-Safe
Full TypeScript support with Zod schema validation. Your CLI arguments are fully typed from definition to execution.
Fluent API
Chain commands and arguments with a clean builder pattern. Easy to read and maintain.
Interactive REPL
Built-in REPL with command history, tab completion, scoped sessions, and customizable output.
Extension-First Architecture
Built-in features (help, version, REPL, signal handling, etc.) are extensions — composed via .extend() and powered by middleware-style interceptors with an onion model across 6 lifecycle phases.
AI-Ready
Expose your CLI to AI assistants via Model Context Protocol (MCP) or Vercel AI SDK with a single method call. MCP and REST server are experimental.
Composable
Mount independent programs as subcommands, override commands with merge semantics, and nest to any depth.
Auto Help
Automatic help generation from your schema definitions in multiple formats: text, ANSI, markdown, HTML, JSON.
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 .arguments( z.object({ names: z.array(z.string()).describe('Names to greet'), prefix: z.string().optional().describe('Prefix').meta({ flags: 'p' }), }), { positional: ['...names'] }, ) .action((args) => { args.names.forEach((name) => { console.log(`Hello, ${args.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