Argc
Make beautiful bash cli with comments, also a command runner using bash.
Usage
Make beautiful cli with comments

To write a command-line program with Argc, we only need to do two things:
- Describe the options, parameters, and subcommands in comments
- Call the following command to entrust Argc to process command line parameters for us
Argc will do the following for us:
- Extract parameter definitions from comments
- Parse command line arguments
- If the parameter is abnormal, output error text or help information
- If everything is normal, output the parsed parameter variable
- If there is a subcommand, call the subcommand function
We can easily access the corresponding option or parameter through the variable $argc_<name>.
Try examples/demo.sh your self.
The @cmd, @arg, @option is comment tag(fields marked with @ in comments), argc generates parsing rules and help documentation based on comment tags .
See docs/comment-tag.md for more details.
A command runner using bash
When argc is executed without the --argc-* option, it will enter command runner mode. Argc will search for the argcfile file in the current project and its parent directory and execute it.
argcfile is to argc what makefile is to make.

Note: in windows, you need to install git to provide bash for argc
See docs/command-runner.md for more details
Generate completion script
argc --argc-completion demo.sh
Install
With cargo
cargo install argc
Binaries on macOS, Linux, Windows
Download from Github Releases, unzip and add argc to your $PATH.
CLI
Bash cli utility - https://github.com/sigoden/argc
USAGE:
argc [OPTIONS] [ARGS]
ARGS:
<SCRIPT> Specific script file
<ARGUMENTS>... Arguments passed to script file
OPTIONS:
--argc-completion Print bash completion script
--argc-eval Print code snippets for eval
--argc-help Print help information
--argc-version Print version information
License
Copyright (c) 2022 argc-developers.
argc is made available under the terms of either the MIT License or the Apache License 2.0, at your option.
See the LICENSE-APACHE and LICENSE-MIT files for license details.