am-i-admin-cli

👋 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

  • Humanam-i-admin prints a plain-English verdict with a coloured tick or cross, for a quick eyeball check.
  • Rawam-i-admin --raw prints a bare true or false and 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

On this page