2famsg

0.2.5 • Public • Published

2famsg

npm npm License: MIT Twitter: @selfagency_llc

Retrieve 2FA codes from Apple Messages on MacOS as JSON output with CLI or API

Installation

npm install -g 2famsg || yarn global add 2famsg

CLI Usage

2famsg [-a | --alfred] [-d | --database DATABASE_PATH] [-q | --query QUERY_TERM]

Also available via npx but loads much more slowly.

CLI Options

  • -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)

Node Module Usage

const twoFactorMsg = require('2famsg')
const codes = async () =>
  await twoFactorMsg({
    query: 'facebook'
  })

Module Options

  • alfred [Boolean]: Format output for Alfred
  • database [String]: Specify database path (Default: ~/Library/Messages/chat.db)
  • query [String]: Term by which to filter results (eg., facebook or amazon)

Build Binaries

npm run build:sqlite
npm run build:bin

Author

👤 Daniel Sieradski hello@self.agency

Acknowledgements

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.

Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

Readme

Keywords

none

Package Sidebar

Install

npm i 2famsg

Weekly Downloads

8

Version

0.2.5

License

MIT

Unpacked Size

34 MB

Total Files

127

Last publish

Collaborators

  • dsieradski