Skip to content

CLI Reference

This page provides the complete reference for all available commands, subcommands, and flags.

Terminal window
cli-template [OPTIONS] [COMMAND]
Flag Short Description
--help -h Print help information
--version -V Print version information

Display version and system information.

Terminal window
cli-template version

Description: Prints the package name, version, author, target architecture, and operating system.

Example output:

Name: cli-template
Version: 0.1.0
Author: Yuniel Acosta Pérez
Target triple: x86_64
OS: macos

Greet someone by name.

Terminal window
cli-template greet --name <NAME>

Options:

Flag Short Description Required
--name -n Name of the person to greet Yes

Examples:

Terminal window
cli-template greet --name "World"
cli-template greet -n "Alice"

Output:

Hello, World!
Variable Description Default
RUST_LOG Control the tracing log level. Accepts trace, debug, info, warn, error. info
Code Description
0 Success
1 General error

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