Skip to content

just-bashit

just-bashit

Evolving set of shfmt-conformant, bats-tested, shellcheck-linted bash tools, templates, and more.

CI Coverage shellcheck shfmt bats pre-commit GitHub release

Coverage Report ยท Test Report

Quick Start

Download the latest release, extract it, and source whatever you need:

tar xf just-bashit.tar.gz
. just-bashit/src/datetime.sh
iso-8601-basic
# 20260522T143200Z

Because libraries depend on each other, it's simplest to unpack the whole package and source individual files from it.

CLI Tools

Tool Purpose
jb Top-level CLI โ€” dispatches run, install, cache, version
just-runit Ephemeral runner โ€” fetch a script, call a function, discard
install-deps Install packages declared in a jb.toml / jb-deps.toml
inspect Snapshot installed package versions into a .versions file

Libraries

Library Functions
datetime iso-8601-basic
environment set-bashrc unset-bashrc check-command-exists
file add-line remove-line add-contents
format trim-from color-echo
logging log log-wait
match is-number
network test-internet-access
path get-scriptpath set-scriptpath
pkg get-pkg-mgr get-pkg-version
toml toml_get toml_discover_groups toml_discover_tools

Platform Support

Tested on every release across six platforms:

Platform Package manager
Debian (latest) apt
Arch Linux (latest) pacman
Fedora (latest) dnf
Alpine Linux (latest) apk
macOS (latest) brew
Windows โ€” MSYS2 UCRT64 pacman (MSYS2)

Templates

See Templates for copy-paste starting points: a full-featured function template with getopts, a minimalist variant, and an executable script template with strict mode and exit traps.