Loading repository data…
Loading repository data…
JoshLinneburg / repository
Shared collection of CLI utilities — bash scripts, git subcommands, python tools, whatever's useful. Works on Linux, macOS, and Windows.
Shared collection of CLI utilities — bash scripts, git subcommands, python tools, whatever's useful. Works on Linux, macOS, and Windows.
| OS | Requirement |
|---|---|
| Linux | bash (preinstalled) |
| macOS | bash (preinstalled — 3.2+, or install newer via brew install bash) |
| Windows | Git for Windows (bundles bash + git) |
git clone <this-repo> ~/projects/toolbox
cd ~/projects/toolbox
./install.sh
Detects your shell (bash, zsh, fish) and offers to add bin/ to your PATH.
git clone <this-repo> ~\projects\toolbox
cd ~\projects\toolbox
.\install.ps1
Generates .cmd wrappers (reads shebangs to pick the right interpreter — bash, python3, node, etc.), then adds bin/ to your user PATH.
New tools added to bin/ are available immediately on Linux/macOS. On Windows, re-run .\install.ps1 after adding new tools to generate their .cmd wrappers.
git cleanup-branchesDeletes local branches whose remote tracking branch has been deleted — the typical state after a squash merge on GitHub.
git cleanup-branches # delete stale branches
git cleanup-branches --dry-run # preview what would be deleted
Protected branches (main, master, develop) are never deleted.
bin/./lint.sh to check bash scriptsgit pull#!/usr/bin/env bash, #!/usr/bin/env python3, etc.git-<command> — git finds them on PATH automatically--help supportmacOS ships bash 3.2 (Apple won't ship GPLv3). All bash scripts must work on 3.2. Avoid:
declare -A) — bash 4.0+mapfile / readarray — bash 4.0+${var,,} / ${var^^} case conversion — bash 4.0+|& pipe shorthand — bash 4.0+${arr[-1]}) — bash 4.2+coproc — bash 4.0+Run ./lint.sh before committing — it uses ShellCheck to catch issues.
For anything too complex for bash, use Python — it's truly cross-platform and needs no compatibility workarounds.
.gitattributes enforces LF for scripts. Do not change this — CRLF breaks bash.install.ps1 generates .cmd files in bin/ (gitignored). It reads shebangs to route to the correct interpreter.#!/usr/bin/env python3 and skip the .py extension../lint.sh runs ShellCheck on all bash scripts. Install with apt install shellcheck, brew install shellcheck, or scoop install shellcheck.