vibe coded with ❤️
Concept · Open source (Apache 2.0) · Bash

macAdmin Library

A reusable Bash helper library for macOS administrators — the functions you keep reimplementing in every admin script, done once under one naming convention: core helpers for the system, install and update helpers for popular Mac apps, Jamf extension-attribute helpers and a security audit module.

Concept app. macAdmin Library explores what a shared, convention-driven Bash foundation for admin scripts could look like. It's a public prototype, not a supported product, and still being reorganised — review and test every function before using it in production scripts; it has been tested in a demo environment only. The repository has no licence file yet, so it's viewable but not formally licensed for reuse.

Built for admin scripting

📚

Core Helpers

Twelve core modules: logging, OS and version, users, packages (pkgutil), code signing and notarization, FileVault, keychain, launchd, network, software update, MDM status and profiles, and app install/uninstall.

📦

App Modules

About 150 modules for Mac apps — Chrome, Firefox, Zoom, Slack, 1Password, Office, Adobe and many more — each with helpers for the installer URL, the latest version and whether the app is installed. Derived from Installomator labels.

🧾

Jamf EA Helpers

Eleven helpers that print their value in the <result> wrapper Jamf extension attributes expect: battery cycle count, security chip, third-party kexts, system extensions, uptime, Xcode CLT state and more.

🔒

Security Audit

A CIS-style audit framework with pass/fail/warn reporting and checks for Gatekeeper, the application firewall and SSH, with matching remediation functions.

🧭

Strong Conventions

Namespaced public functions (maclib::<module>::<name>), data on stdout and logs on stderr, no eval, quoted variables, safe under set -euo pipefail.

🧪

Tests & Linting

A Makefile runs shellcheck, shfmt and a bats-core suite. There's no CI workflow in the repository yet, so those checks run locally.

Quick start

Source the library entrypoint from any Bash script:

Source the library

source ./lib/maclib.sh

maclib::log::info "Hello from maclib"

What to know first

About 64 of the ~150 app modules still carry placeholder installer URLs (example.com) until each vendor is researched — treat those as stubs.

A rename of app functions to include their category (e.g. maclib::ai::chatgpt::url) is in progress, so names may change.

Development

Prerequisites: shellcheck, shfmt, bats-core

make lint · make fmt · make test

Full Function Catalog

The modules, how the library is organised, and what is and isn't finished.

📖 Read the documentation

Want to explore it?

Concept · Free · Open source (Apache 2.0) · Bash

View on GitHub