1
0
Fork 0
Go library to build command line programs
Find a file
C. Torres 8cd99542fd Bump 'option' dependency
Bump module version for the 'option' library.

Signed-off-by: C. Torres <torr.c@mailgw.com>
2025-03-28 21:37:09 -03:00
cmd.go Change parsing strategy, types and validation 2025-03-02 14:22:04 -03:00
cmd_test.go Add tests for help and version handling 2025-03-04 14:18:02 -03:00
go.mod Bump 'option' dependency 2025-03-28 21:37:09 -03:00
go.sum Bump 'option' dependency 2025-03-28 21:37:09 -03:00
LICENSE Add License 2025-02-23 22:34:29 -03:00
README Write Readme 2025-02-23 22:33:56 -03:00

                    _ 
  ___ _ __ ___   __| |
 / __| '_ ` _ \ / _` |
| (__| | | | | | (_| |
 \___|_| |_| |_|\__,_|

========================================================================


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