#Library Functions
Bashly comes with a set of library functions that can be added to your script by running the bashly add
command. All libraries are documented inline, and the documentation below is a high level overview with examples.
Tip
Run bashly add --list
to see all available libraries.
#YAML parser
Adds the ability to read YAML files in your bash script.
#Config (INI) handler
Adds the ability to create, read and write configuration INI files. This library uses the ini library under the hood for loading and saving the INI files.
#INI handler
Adds the ability to load and save INI files. This is a low-level library that is used by the config library.
#Color output
Adds functions for printing colored strings.
#Auto-update
Files added by the bashly add *
commands can be automatically updated to their original state by running
The --upgrade
flag will scan all the files in the src/lib
directory for a special magic comment in this format:
When found, and assuming the path of the file matches the one in the library, this file will be updated.
You are encouraged to modify the generated library functions to your liking, but if you do so, remember to remove this magic comment to prevent accidentally overriding it in future runs of bashly generate --upgrade
.