Usage
This page covers the available commands and their usage patterns.
Command Structure
Section titled “Command Structure”cli-template uses a subcommand-based structure:
cli-template <COMMAND> [OPTIONS]Available Commands
Section titled “Available Commands”version
Section titled “version”Display version and system information:
cli-template versionOutput:
Name: cli-templateVersion: 0.1.0Author: Yuniel Acosta PérezTarget triple: x86_64OS: macosGreet someone by name:
cli-template greet --name "World"Options:
| Flag | Short | Description | Required |
|---|---|---|---|
--name |
-n |
Name of the person to greet | Yes |
Output:
Hello, World!Global Options
Section titled “Global Options”| Flag | Short | Description |
|---|---|---|
--help |
-h |
Print help information |
--version |
-V |
Print version information |
Environment Variables
Section titled “Environment Variables”| Variable | Description | Default |
|---|---|---|
RUST_LOG |
Control tracing log level | info |
Example:
RUST_LOG=debug cli-template greet --name "World"Exit Codes
Section titled “Exit Codes”| Code | Description |
|---|---|
0 |
Success |
1 |
General error |
- Use
cli-template --helpto see all available commands. - Use
cli-template <command> --helpfor command-specific help. - Set
RUST_LOG=debugfor verbose output during troubleshooting.