Overview of Optique features and capabilities
mainOptique provides a suite of tools for building robust CLIs:
- Parser Combinators: Use
object(),or(),merge(),optional(),multiple(),map(),conditional(), andpassThrough()to build complex parsers. - Type Safety: Automatic TypeScript type inference for all compositions.
- Rich Value Parsers: Built-in support for strings, numbers, URLs, locales, UUIDs, networking types (
port(),ipv4(),hostname(),email()), and Temporal types. - Validation Integrations: Support for Standard Schema, Zod, and Valibot.
- Configuration & Environment: Load settings from config files (
@optique/config) or environment variables (@optique/env). - Interactive Fallbacks: Prompt users for missing values using
@optique/inquireror@optique/clack. - Documentation & Shell Support: Automatically derive help text, man pages (
@optique/man), and shell completions (Bash, zsh, fish, PowerShell, Nushell) from your parser definitions. - Command Discovery: Use
@optique/discoverto split large command trees into separate files.