Everything in bashly originates from a single configuration file, named
This configuration file can be set up to generate two types of scripts:
- Script with commands (for example, like
- Script without commands (for example, like
This is detected automatically by the contents of the configuration: If it contains a
commands definition, it will generate a script with commands.
In an empty directory, create a sample configuration file by running any of these commands:
$ bashly init # or, to generate a simpler configuration: $ bashly init --minimal
This will create a sample
src/bashly.yml file. You can edit this file to specify which arguments, flags and commands you need in your bash script.
Then, generate an initial bash script and function placeholder scripts by running:
$ bashly generate
- Create the bash executable script.
- Create files for you to edit in the
Finally, edit the files in the
src folder. Each of your script's commands get their own file. Once you edit, run
bashly generate again to merge the content from your functions back into the script.