Shef
github.com
github.com
Jelly was a scripting language using XML. It was an aberration, and Maven 2 removed it. This feels like Jelly, but in YAML instead of XML.
I don't intend to offend the author, but I don't see the use case for writing the recipes in YAML instead of using a shell function (or Python, which is multiplatform). The YAML metadata will work if you have a sort of low-code UI or want to show the steps in a UI (which is the main reason CI/CD platforms use it). I guess the author got used to the CI/CD YAML pipeline configuration files and wanted a similar experience.
However, it will quickly end up being a pseudo-programming language without the benefits of a better composition syntax.
FWiW the comments look fine to me and I've just [vouch]'d each and every one .. if some one else or two does the same they should come back.
With just a little bit of effort, shell scripting really isn’t that arcane.
It isn't, but at least bash and posix shell don't really have scoping, structured variables, or reliable error handling (too many ways an error code can be invisibly dropped)
To get them, you need to use a less used shell like hush or powershell. And one reason those haven't taken over, is that if you have to add a dependency you might as well use a full language anyway. But I agree that YAML isn't a good option for scripting either
Sorta hate yaml drive config management and deployments sytems aka ansible, saltstack, etc; so ended up writing my own that's salt-like, but all python.
But then I decided I really kind of despise "programming" in YAML (conditionals and loops in particular). So I adapted Ansible ideas to Python, in particular: idempotent commands and notifications (commands triggered later, when another set of commands make a change; like restarting apache after making a bunch of config changes).
https://github.com/mattbillenstein/salty
Been using this on a couple startups for a couple years, but it lacks polish in terms of user-friendliness.
Interesting how we came to some of the same types of things - like you have .notify() - I return a result object with a "changed" flag, etc.
I only see a YAML DSL. Where is my "shell"?
The usefulness of YAML is having declarative files that are simple.
But once you start adding templating it sucks as much as anything else.
The point of this is to lower the entry cost of producing interactive CLI apps. If I have to break out a more expressive language to use it I may as well just write my program in that language in the first place.
> The usefulness of YAML is having declarative files that are simple.
There are other config formats that provide this and don’t rely on sometimes ambiguous whitespace based structure (eg. TOML). While you can write JSON in a YAML file to avoid this, you’ve then nullified all of the supposed ‘benefits’ of YAML.
but that's simply in a different region of the solution space compared to Go + YAML
transform: "{{ filter .input 'Hello' }}"Would be nice to have one of those asciinema recordings to get a feel of how it works from the README :)
But when your shell scripts get too complex, the answer is not 'wrap them in a Turing-complete yaml+jinja DSL'.