Skip to content

Chemaclass/bashdep

bashdep

Tests Static Analysis Lint License: MIT

Minimal, zero-dependency bash dependency manager. Declare URLs; bashdep downloads them into lib/ and keeps installs idempotent via a per-directory .bashdep.lock. No registry, no runtime — just curl.

mkdir -p lib
curl -fsSLo lib/bashdep https://raw.githubusercontent.com/Chemaclass/bashdep/main/bashdep
chmod +x lib/bashdep

Quick start

.bashdep:

https://github.com/TypedDevs/bashunit/releases/download/0.17.0/bashunit
https://github.com/Chemaclass/create-pr/releases/download/0.6/create-pr
https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh@dev

install-dependencies.sh:

#!/bin/bash
set -euo pipefail

source lib/bashdep
bashdep::install_from .bashdep

First run downloads everything and writes .bashdep.lock. Re-runs skip already-installed deps; bumping a URL version re-downloads only that entry. Commit .bashdep.lock to lock versions across collaborators.

Prefer an inline array? Pass it to bashdep::install directly.

Why bashdep?

  • Idempotent installs via per-directory .bashdep.lock.
  • Dev/prod separation via the @dev URL suffix (lib/ vs lib/dev/).
  • File-driven or array-driveninstall_from or install.
  • Lifecycle commandslist, uninstall, clean, doctor, self_update.
  • Modesforce, dry-run, silent, verbose.

Documentation

  • API referenceinstall, install_from, setup, list, uninstall, clean, doctor, self_update, version.
  • Behavior — lockfile rules, dev dependencies, error handling.
  • Releasing — how maintainers cut a new tagged release with release.sh.
  • Contributing — project layout, test conventions, coding guidelines.

Development

make deps              # Install bashunit (test runner)
make test              # Run the suite
make sa                # ShellCheck
make lint              # editorconfig-checker
make pre_commit/install

See CONTRIBUTING for the full guide.

About

A simple dependency manager for bash

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors