Go library to build command line programs
- Go 100%
Bump module version for the 'option' library. Signed-off-by: C. Torres <torr.c@mailgw.com> |
||
|---|---|---|
| cmd.go | ||
| cmd_test.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README | ||
_ ___ _ __ ___ __| | / __| '_ ` _ \ / _` | | (__| | | | | | (_| | \___|_| |_| |_|\__,_| ======================================================================== INTRODUCTION ============ This project devises a simple library to build command line programs. It aims at doing only the minimal when it comes to command parsing and argument handling, ensuring the caller is not burdened with functionality that may not be used. Its only dependency outside of the standard library is the option parsing library 'codeberg.org/torr/option', which can parse options invoked after arguments on the same input sequence. Some aspects of the library: - Parse commands and their options; - Provide both global and per command options; - Restrict programs to a single level of subcommands; - Check for required arguments; - Handle the invocation of help and version options automatically, if they are declared; - Use a static help message to avoid runtime processing; In contrast with other command line libraries, like 'spf13/cobra', 'urfave/cli', 'alecthomas/kingpin' and 'alecthomas/kong', 'cmd' does not intend on providing shell completion, man page generation or similar features. LICENSE ======= This project is governed by the terms of the CDDL license version 1.0 only, see the 'LICENSE' file for more information. --- Copyright 2025 C. Torres