docopt.sh
argc
Our great sponsors
docopt.sh | argc | |
---|---|---|
5 | 14 | |
182 | 637 | |
- | - | |
0.0 | 9.3 | |
10 months ago | 4 days ago | |
Python | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
docopt.sh
-
Docopt.sh – Command-Line Argument Parser for Bash 3.2, 4, and 5
I like that this generates readable output that could pass as hand-written code.
The docopt.sh output looks like it went through a JS minifier. Or is there a way to change that? If so I think it should default to that.
https://github.com/andsens/docopt.sh/blob/master/docs/naval_...
-
Programs are dead, and JavaScript has killed them
If you want to avoid having to write your own args parser everytime or think getopt is a pain, you should check out my little project:
https://github.com/andsens/docopt.sh
No dependencies, the code is directly inlined into your script, and you write the args parser by writing the help-text.
-
Beautiful Scripts
Honestly, I left it as a gist because even though it reduces boilerplate, getopts is still not a great flag parser (e.g. only supports single-letter flags, and no type safety or other validation aside from boolean / string). I use it in my shell environment since I have lots of shell functions and I don't care to pull in a "real" parser into my shell, but if I was writing any sort of more complex standalone script I probably wouldn't use it. Check out docopt if you haven't seen it, I've been meaning to give that a whirl at some point.
argc
- Argc: Easily create feature-rich CLIs in bash
- Easily create a feature-rich command-line application in Bash.
- Docopt.sh – Command-Line Argument Parser for Bash 3.2, 4, and 5
-
Runme: A shell-script based task runner written in rust
Runme is based on argc, which can flexibly define task parameters and generate informative completions
- Whats the easiest way to configure argument parsing in bash
- GitHub - fumieval/clap4shell: Standalone wrapper of clap for shell scripts
- Argc: A bash cli framework, also a task management & automation tool.
-
A cross-plaform task runner
See docs/task-runner for more details.
- Argc: The easiest way to handle bash command-line options
-
IT Pro Tuesday #194 - AutoHotkey Scripts, Command-Line Tool, PowerShell Tutorial & More
Argc is an easier way to handle sh/bash cli parameters. Allows you to create a command line program by simply describing the options, parameters, and subcommands in comments. Once you set it to work, Argc extracts parameter definitions from comments, parses command line arguments, outputs error text/help info for an abnormal parameter or the parsed parameter variable for a normal one, and finally, calls any subcommand function. A shout out to sigoden for this suggestion.
What are some alternatives?
docopt - This project is no longer maintained. Please see https://github.com/jazzband/docopt-ng
argi - Argument parsing for the future 🚀
bash-cache - Transparent caching layer for bash functions; particularly useful for functions invoked as part of your prompt.
docopts - Shell interpreter for docopt, the command-line interface description language.
shrc - My bashrc/shrc that supports bash, zsh, busybox ash and even Dash. ( has: OS and shell detection )
slap - Painless shell argument parsing and dependency check.
Trash-Generator - A Rust program that generates files containing random characters (AKA trash)
clap4shell - Standalone wrapper of clap for shell scripts
docopt.rs - Docopt for Rust (command line argument parser).