Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
hof
Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
No need to repeat step 3. Code for each command (in case you want a bash script with subcommands), is placed in `src/_command.sh`. That's it.
I think this is a good minimal example:
https://github.com/DannyBen/bashly/tree/master/examples/mini...
Shameless plug, I wrote https://github.com/hofstadter-io/hof as a generalized tool for what this does, i.e. generate boilerplate from a DSL.
https://github.com/hofstadter-io/hofmod-cli is the same idea for generating Go CLI boilerplate.
hof uses CUE instead of Yaml, can output to any and multiple languages, and uses diff3 so you can work in both the output and the design at the same time.
Shameless plug, I wrote https://github.com/hofstadter-io/hof as a generalized tool for what this does, i.e. generate boilerplate from a DSL.
https://github.com/hofstadter-io/hofmod-cli is the same idea for generating Go CLI boilerplate.
hof uses CUE instead of Yaml, can output to any and multiple languages, and uses diff3 so you can work in both the output and the design at the same time.
Before there are 10 people with "there is a library for that in Python" (because they are not and can not be ergonomic enough):
Next Generation Shell is a "real" programming language. It also has syntax for calling external programs. It handles exit codes properly. It has facility for constructing command line arguments.
Project - https://github.com/ngs-lang/ngs
Motivation related to the above - https://ilya-sher.org/2017/10/10/why-i-have-no-favorite-prog...
IMHO, I don't think most people commenting here are getting it.
As an example, here's a bash alias generator, alf [0], which itself is a bash script, created using this. The bash script for alf is note really small [1]. Additionally, the output is extremely readable unlike most other bash scripts I myself have written!
Really amazing piece of software! Kudos.
[0]: https://github.com/DannyBen/alf
Although bash-specific, Bashly falls into the "Task Runner" category. As such, I would like to chime in with my entry:
Run : https://github.com/TekWizely/run
It has its own DSL for describing tasks, along with help strings and argument descriptors, and can manages generating help screens, parsing args and invoking tasks (sub-commands).
Each task can be written in its own language, one task could be Bash, one could be zsh, one could be python, etc.
If you're in the market for a flexible task runner, I hope you'll give it a chance.