Crust logoCrust

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.

TopicDescription
CommandsDefine CLI commands with full type inference
ArgumentsPositional arguments with types, defaults, and validation
FlagsNamed flags with types, aliases, defaults, and multiple values
SubcommandsNested command trees with automatic routing
PluginsExtend your CLI with the middleware-based plugin system
Lifecycle & HooksCommand execution lifecycle and preRun, run, postRun hooks
Environment VariablesRuntime env loading, build-time constants, and safe config patterns
Error HandlingTyped error codes and structured details
Building & DistributionCompile your CLI to standalone executables
DevelopmentFast local loops, linked installs, and real install smoke tests