Installation 
Although there's no Bash script dependency manager like npm for JavaScript, Maven for Java, pip for Python, or composer for PHP; you can add bashunit as a dependency in your repository according to your preferences.
Here, we provide different options that you can use to install bashunit in your application.
Requirements 
bashunit requires Bash 3.2 or newer.
install.sh 
There is a tool that will generate an executable with the whole library in a single file:
curl -s https://bashunit.typeddevs.com/install.sh | bash# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
#   - Open PowerShell as Administrator
#   - Run: wsl --install
#   - Restart your computer
#
# Step 2: Open your WSL terminal and run:
curl -s https://bashunit.typeddevs.com/install.sh | bashThis will create a file inside a lib folder, such as lib/bashunit.
Verify 
# Verify the sha256sum for latest stable: 0.26.0
DIR="lib"; KNOWN_HASH="7ff253ec2cb665d560fd92d314687f0d6a256f9f9f13c57b3c4747d056e659af"; FILE="$DIR/bashunit"; [ "$(shasum -a 256 "$FILE" | awk '{ print $1 }')" = "$KNOWN_HASH" ] && echo -e "✓ \033[1mbashunit\033[0m verified." || { echo -e "✗ \033[1mbashunit\033[0m corrupt"; rm "$FILE"; }TIP
You can find the checksum for each version inside GitHub's releases. E.g.:
https://github.com/TypedDevs/bashunit/releases/download/0.26.0/checksumDefine custom tag and folder 
The installation script can receive arguments (in any order):
curl -s https://bashunit.typeddevs.com/install.sh | bash -s [dir] [version]# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
#   - Open PowerShell as Administrator
#   - Run: wsl --install
#   - Restart your computer
#
# Step 2: Open your WSL terminal and run:
curl -s https://bashunit.typeddevs.com/install.sh | bash -s [dir] [version][dir]: the destiny directory to save the executable bashunit;libby default[version]: the release to download, for instance0.26.0;latestby default.
TIP
You can use beta as [version] to get the next non-stable preview release. We try to keep it stable, but there is no promise that we won't change functions or their signatures without prior notice.
TIP
Committing (or not) this file to your project it's up to you. In the end, it is a dev dependency.
bashdep 
You can manage your dependencies using bashdep, a simple dependency manager for bash.
# Ensure bashdep is installed
[ ! -f lib/bashdep ] && {
  mkdir -p lib
  curl -sLo lib/bashdep \
    https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep
  chmod +x lib/bashdep
}
# Add latest bashunit release to your dependencies
DEPENDENCIES=(
  "https://github.com/TypedDevs/bashunit/releases/download/0.26.0/bashunit"
)
# Load, configure and run bashdep
source lib/bashdep
bashdep::setup dir="lib" silent=false
bashdep::install "${DEPENDENCIES[@]}"# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
#   - Open PowerShell as Administrator
#   - Run: wsl --install
#   - Restart your computer
#
# Step 2: Open your WSL terminal and run:
# Ensure bashdep is installed
[ ! -f lib/bashdep ] && {
  mkdir -p lib
  curl -sLo lib/bashdep \
    https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep
  chmod +x lib/bashdep
}
# Add latest bashunit release to your dependencies
DEPENDENCIES=(
  "https://github.com/TypedDevs/bashunit/releases/download/0.26.0/bashunit"
)
# Load, configure and run bashdep
source lib/bashdep
bashdep::setup dir="lib" silent=false
bashdep::install "${DEPENDENCIES[@]}"Downloading 'bashunit' to 'lib'...
> bashunit installed successfully in 'lib'Brew 
You can install bashunit globally on macOS or Linux using brew.
brew install bashunitMacPorts 
On macOS, you can also install bashunit via MacPorts:
sudo port install bashunitGitHub Actions 
# example: .github/workflows/bashunit-tests.yml
name: Tests
on:
  pull_request:
  push:
    branches:
      - main
jobs:
  tests:
    name: "Run tests"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: "Install bashunit"
        run: |
          curl -s https://bashunit.typeddevs.com/install.sh > install.sh
          chmod +x install.sh
          ./install.sh
      - name: "Test"
        run: "./lib/bashunit tests"TIP
Get inspiration from the pipelines running on the bashunit-project itself: https://github.com/TypedDevs/bashunit/blob/main/.github/workflows/tests.yml