whatisgithub

What is macos-faceid?

lorenzo-coslado/macos-faceid — explained in plain English

Analysis updated 2026-07-26

35PythonAudience · developerComplexity · 2/5Setup · moderate

In one sentence

A macOS menu bar app that unlocks the sudo terminal command using your face instead of typing your password. All face recognition runs locally and your password always works as a fallback.

Mindmap

mindmap
  root((repo))
    What it does
      Unlock sudo with face
      Menu bar app
      Local face recognition
    How it works
      PAM module hands to daemon
      Daemon scans face
      Falls back to password
    Setup
      Download signed app
      Enroll your face
      Grant Full Disk Access
    Privacy
      No face data leaves Mac
      Embeddings stay local
    Limitations
      Not a security product
      Can be fooled by photos

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Unlock the sudo terminal command on macOS using your face instead of typing your password.

USE CASE 2

Speed up terminal workflows by skipping repeated password entry on a trusted Mac.

USE CASE 3

Choose between Face ID, Touch ID, or password at every sudo prompt.

What is it built with?

PythonmacOSPAM

How does it compare?

lorenzo-coslado/macos-faceidalex-nlp/denoiserlanvarnarz/killspam-bot
Stars353535
LanguagePythonPythonPython
Setup difficultymoderatehardmoderate
Complexity2/55/53/5
Audiencedeveloperresearcherops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 5min

Requires granting a helper app Full Disk Access and one-time approval to modify sudo configuration on macOS.

So what is it?

Mugshot is a macOS menu bar app that lets you unlock the sudo command with your face. On macOS, sudo is what an administrator types in the terminal to run commands that change the system. Normally you type your password each time. With Mugshot, the camera recognizes you and unlocks sudo automatically. The app runs face recognition entirely on your Mac, and no face data ever leaves your computer. It began as a weekend project and grew into a complete app with a guided setup, a settings window, and a choice at every prompt between Face ID, Touch ID, and your password. Installing it involves downloading a signed app, dragging it into your Applications folder, and launching it. A face icon appears in the menu bar. You click it, choose to set up your face, and follow a short enrollment process that takes a few seconds. Then you open Settings and turn on Face ID for sudo. Because recent macOS versions lock down changes to the sudo configuration, Mugshot uses a small helper and walks you through two one-time approvals: letting the helper run, and granting it Full Disk Access so it can write one file. After that, every time you run a sudo command, a panel appears, the camera scans your face, and sudo unlocks. If the match fails, you simply get the normal password prompt. The app works by splitting the job in two. A root process started by sudo cannot reach the camera, because macOS blocks camera access in that context. So a small PAM module hands the request to a daemon running in your login session, which owns the camera. The daemon finds your face, turns it into an embedding, and compares it to the face you enrolled. The PAM rule is set to sufficient, which means a failed match falls through to your password. The author is clear that this is not a security product. A regular webcam can be fooled by a printed photo or a video, unlike Apple's real Face ID which uses an infrared depth sensor. Mugshot has no such protection. Your face embeddings stay on your machine, and you can never lock yourself out because the password always remains as a fallback.

Copy-paste prompts

Prompt 1
How do I set up Mugshot so I can use my face to unlock sudo commands in the macOS terminal?
Prompt 2
Walk me through troubleshooting why Mugshot is not recognizing my face during a sudo prompt.
Prompt 3
How does Mugshot keep my face data private and what happens if the face match fails?
Prompt 4
Explain the two one-time macOS approvals I need to grant for Mugshot to work with sudo.

Frequently asked questions

What is macos-faceid?

A macOS menu bar app that unlocks the sudo terminal command using your face instead of typing your password. All face recognition runs locally and your password always works as a fallback.

What language is macos-faceid written in?

Mainly Python. The stack also includes Python, macOS, PAM.

How hard is macos-faceid to set up?

Setup difficulty is rated moderate, with roughly 5min to a first successful run.

Who is macos-faceid for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.