Skip to content

Usage

This page covers the available commands and their usage patterns.

cli-template uses a subcommand-based structure:

Terminal window
cli-template <COMMAND> [OPTIONS]

Display version and system information:

Terminal window
cli-template version

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 "World"

Options:

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

Output:

Hello, World!
Flag Short Description
--help -h Print help information
--version -V Print version information
Variable Description Default
RUST_LOG Control tracing log level info

Example:

Terminal window
RUST_LOG=debug cli-template greet --name "World"
Code Description
0 Success
1 General error
  • Use cli-template --help to see all available commands.
  • Use cli-template <command> --help for command-specific help.
  • Set RUST_LOG=debug for verbose output during troubleshooting.