👋 Introduction
Check whether you're a macOS admin from the terminal — human-readable or raw boolean
am-i-admin answers one question from your terminal: does my macOS account
have admin rights? It reads your username from the environment and asks the macOS
directory service whether you're in the admin group directly — no sudo, no
prompts, no guessing.
🎛️ Two output modes
- Human —
am-i-adminprints a plain-English verdict with a coloured tick or cross, for a quick eyeball check. - Raw —
am-i-admin --rawprints a baretrueorfalseand nothing else, so you can branch on it in scripts:
if [ "$(am-i-admin --raw)" = "true" ]; then
echo "running privileged setup…"
fi📦 Install
npm install -g @kud/am-i-admin-cli