Tutorial
Basics
Panini is very similiar to make. The configuration file is in the INI
format. Every section is a command that can be called with panini cmd
One difference to make is that there are different section types. Here is
an examle using the section type called venv.
Note how {} got replaced with the trailing arguments.
That looks magical at first but with the builtin command getcmd we can
inspect what is actually happening there.
All the section types do is to generate the actual command that is going to be executed, based on the users input. You can see all currently supported section types here.
Section Type Declaration
Consult here how section types are defined
The via key
Every section type supports the via key, which can be used to chain commands.
[ssh]
cmd=ssh root@server {}
[nix]
nix=uv
via=ssh
[uv]
cmd=uv {}
via=nix
[myscript]
cmd=run myscript.py {}
via=uv
Calling panini myscript would run:
The env key
The env key is easy to explain.
leads to:
Conclusion
- Every INI section is a command
- Section types are really just templates to build the command