Overview
Learn how to build CLIs with Crust — from basic commands to nested subcommand trees.
The guide walks through every major concept in Crust, starting from the basics and building up to advanced patterns.
| Topic | Description |
|---|---|
| Commands | Define CLI commands with full type inference |
| Arguments | Positional arguments with types, defaults, and validation |
| Flags | Named flags with types, aliases, defaults, and multiple values |
| Subcommands | Nested command trees with automatic routing |
| Plugins | Extend your CLI with the middleware-based plugin system |
| Lifecycle & Hooks | Command execution lifecycle and preRun, run, postRun hooks |
| Environment Variables | Runtime env loading, build-time constants, and safe config patterns |
| Error Handling | Typed error codes and structured details |
| Building & Distribution | Compile your CLI to standalone executables |
| Development | Fast local loops, linked installs, and real install smoke tests |