@effect/cli is a framework for building scalable, type-safe command-line applications in TypeScript. It provides declarative APIs for commands, arguments, options, and includes built-in features like help generation, shell completions, and wizard mode.
Installation
Quick Start
Create a simple “Hello World” CLI:Key Features
Built-In Options
Every CLI gets these options automatically:--help/-h- Show documentation--version- Display version--completions- Generate shell completions (bash, zsh, fish, sh)--wizard- Interactive command builder--log-level- Set logging verbosity
Arguments
Define positional arguments:Options
Add flags and valued options:Subcommands
Organize functionality into nested commands:Example: Git-Style CLI
Create a mini-git with multiple subcommands:Wizard Mode
Guide users through command construction interactively:Shell Completions
Generate completions for your shell:Related Resources
API Reference
Complete API documentation
@effect/platform-node
Required for Node.js runtime