CLI Reference
This page provides the complete reference for all available commands, subcommands, and flags.
Synopsis
Section titled “Synopsis”cli-template [OPTIONS] [COMMAND]Global Options
Section titled “Global Options”| Flag | Short | Description |
|---|---|---|
--help |
-h |
Print help information |
--version |
-V |
Print version information |
Commands
Section titled “Commands”version
Section titled “version”Display version and system information.
cli-template versionDescription: Prints the package name, version, author, target architecture, and operating system.
Example output:
Name: cli-templateVersion: 0.1.0Author: Yuniel Acosta PérezTarget triple: x86_64OS: macosGreet someone by name.
cli-template greet --name <NAME>Options:
| Flag | Short | Description | Required |
|---|---|---|---|
--name |
-n |
Name of the person to greet | Yes |
Examples:
cli-template greet --name "World"cli-template greet -n "Alice"Output:
Hello, World!Environment Variables
Section titled “Environment Variables”| Variable | Description | Default |
|---|---|---|
RUST_LOG |
Control the tracing log level. Accepts trace, debug, info, warn, error. |
info |
Exit Codes
Section titled “Exit Codes”| Code | Description |
|---|---|
0 |
Success |
1 |
General error |
Help Output
Section titled “Help Output”Run cli-template --help to see the auto-generated help:
A Rust CLI template project
Usage: cli-template [COMMAND]
Commands: version Display version and system information greet Greets someone by name help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help -V, --version Print version