Add named function parameters to bash scripts so arguments have meaningful names instead of numbered positions like $1 and $2.
Wrap risky bash commands in try-catch blocks so your deployment script handles errors gracefully instead of aborting.
Copy just the error-handling module into your own scripts to get formatted call-stack traces whenever a command fails.
Write unit tests for bash functions using the included testing library.
Requires bash 4, some modules need bash 4.3 or later for variable reference features, which macOS does not ship by default.
Bash Infinity is a framework and standard library for writing bash shell scripts in a more structured, readable style. Ordinary bash scripts rely on cryptic positional variables like $1 and $2, have no built-in error handling, and lack features that most other programming languages take for granted. Bash Infinity adds those features on top of bash without replacing it: you include the framework at the top of your script and pick only the parts you need. The most notable features are error handling and named function parameters. The error handling module catches failures and prints a formatted call stack showing exactly where a script went wrong, similar to how other languages display exceptions. It also provides try-catch blocks so code can respond to errors gracefully without stopping the script entirely. Named parameters let developers write function arguments with meaningful names rather than numbered positions, which makes scripts easier to read and maintain. Other included modules cover logging to the terminal with color output, a unit testing library, a type system for basic object-oriented patterns, and functional programming operations on data collections. An import statement handles loading library files, ensuring each file is loaded only once regardless of how many scripts reference it. The project is modular, so individual features such as named parameters or try-catch can be copied out and used on their own without pulling in the entire framework. The README notes that the framework lacks thorough test coverage and that the maintainer does not recommend starting large new projects based on it in its current state. A major rewrite is planned for version 3.0. For anyone who finds a specific part useful, the recommendation is to copy only those parts into their own code. The framework targets bash 4. Some modules require bash 4.3 or later for features like variable references.
← niieani on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.