The batteries-included TypeScript CLI framework.

Typed commands, middleware, OAuth, a built-in TUI, and Storybook-style stories for your terminal components. The whole stack, not a dozen libraries you glue together.

maltty dev and a command definition, side by side
Features

Built for the way you ship.

Everything you need, nothing you don't. Configured in TypeScript, validated at boot.

Type-Safe Commands
Describe args with a Zod schema and the parsed args, config, and context arrive fully typed in every handler. No casting, no drift.
Middleware Pipelines
Compose auth, logging, and timing as a nested onion. Each layer wraps the next in the order you declare it.
Built-in Auth
OAuth PKCE, device code, env vars, and file tokens. Wire up a login flow without hand-rolling a token refresh loop.
Terminal UI
Logger, spinner, prompts, colors, and formatters, all on ctx. Plain stdout when you want it, a real TUI when you don't.
Config Discovery
Drop a maltty.config.ts and it's found, validated with Zod, and typed at every read. No parsing glue to maintain.
Build & Compile
Bundle to ESM with tsdown, or compile a standalone binary with Bun. Ship one file that runs without a Node install.

Your first command in five minutes

Install the runtime, define a command with a Zod schema, and run it. The guide walks the whole path from argv to a compiled binary.