Observed since 20 Oct, 19:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Retrieves 2FA codes from Apple Messages
Retrieve 2FA codes from Apple Messages on MacOS as JSON output with CLI or API
npm install -g 2famsg || yarn global add 2famsg
2famsg [-a | --alfred] [-d | --database DATABASE_PATH] [-q | --query QUERY_TERM]
Also available via npx but loads much more slowly.
-a or --alfred [Boolean]: Format output for Alfred-d or --database [String]: Specify database path (Default: ~/Library/Messages/chat.db)-q or --query [String]: Term by which to filter results (eg., facebook or amazon)const twoFactorMsg = require('2famsg')
const codes = async () =>
await twoFactorMsg({
query: 'facebook'
})
alfred [Boolean]: Format output for Alfreddatabase [String]: Specify database path (Default: ~/Library/Messages/chat.db)query [String]: Term by which to filter results (eg., facebook or amazon)npm run build:sqlite
npm run build:bin
👤 Daniel Sieradski hello@self.agency
The SQLite query was lifted from Scott Carpenter's alfred-imessage-2fa Alfred workflow, which I modified somewhat. Scott's project was a great start but I was looking for a more robust solution and decided to build one in a language in which I felt more comfortable jamming on the code.
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Give a ⭐️ if this project helped you!
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Shared repository data · GitLab
| Contributor | Contributions |
|---|---|
| Daniel Sieradski | 21 |
Default-branch author identities; GitLab commit counts exclude merge commits.
Public sponsor counts have not been collected. These signals belong to the repository owner.
gitlab · 3 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-22 | 1 | 2026-10-22T19:28:38.4246554Z |
| 2026-10-21 | 1 | 2026-10-21T19:27:40.2277210Z |
| 2026-10-20 | 1 | 2026-10-20T19:27:02.0182837Z |
Observed since 20 Oct, 19:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ea467a3a509bc494a0c9523045b307bc06d69e190be4b923d9490599b068141f