Bash Cli Library
This library is ready to use, but the documentation has issues due to an old development dependecy.
Why Use this over others?
- Easy to get started
- Fairly minimal
- Nice help menus for your library
- Convenience Functions - see doc/Functions.md
- You like how git-bent works and want a library like it
This is the actual code executed to setup new bash libraries with
step is one of our built-in functions.
Template 'core_setup' does not exist.
Set up a new library
cdto the root of the new library.
git clone @git(https_url) vendor/bash-cli
./vendor/bash-cli/bash-cli setup new project
- Follow the prompts. Then
source ~/.bashrcor re-launch your terminal.
- Look at the sample code in your new library
- Write a couple functions & run them to get a sense of how things work.
Development tools (optional, recommended)
We use code-scrawl, a Php package, to generate help menus and documentation. You caaaaan write help menus manually.
To use the tools, we require Php & Composer (Php's popular package manager). Php is only required for development. Your bash library's users will not need Php.
cd vendor/bash-cli; composer install;- installs Code Scrawl and its dependencies.
cd ../..(back to your project root) then
- The help menus have been re-generated, as well as documentation
- You may want to edit
.config/scrawl.jsoninside your project to your liking.
- See php/code-scrawl for more info on documentation generation.
Alternatives / Competition
- Bash-it: "Bash-it provides a solid framework for using, developing and maintaining shell scripts and custom commands for your daily work"
- Bash OO Framework: "Bash Infinity transforms the often obfuscated "bash syntax" to a cleaner, more modern syntax"
- Bashinator: "Bashinator is a framework for bash shell scripts."
- (old List of Bash Scripting Libraries) or WebArchive Link
- I have no idea if this works on Windows with WSL or git bash. It probably works on Mac. I use Linux. You can submit PRs for compatibility with different systems
If you want to contribute, you do not need php. I will gladly run the documentation generation myself & eventually will do this with CICD.
This uses PHP packages to generate documentation & help menus. This requires composer (to install dependencies), php language, and I'm pretty sure composer requires git, but you probably have that already
To setup the dev environment, make a fork, then:
git clone firstname.lastname@example.org:your_vendor_name/bash/git-bent.git git-bent # Put in the correct url for your fork. cd git-bent/.config composer install cd ..
Then to generate documentation & help menus:
& just answer