applepw is a fast, lightweight, and secure CLI for accessing your Apple Passwords (iCloud Keychain) on macOS. It allows you to search for passwords and TOTP codes directly from your terminal.
- Shorthand Search: Just run
applepw cartato find credentials forcarta.com. - Automatic TOTP: Shows your 2FA codes alongside your passwords automatically.
- Self-Healing Daemon: Automatically manages a background helper process to communicate with macOS security services.
- Deterministic IDs: Generates stable UUIDs for every record for easy piping into other tools.
brew install alecharmon/tap/applepwRequires Rust 1.75+.
git clone https://github.com/alecharmon/applepw
cd applepw
cargo install --path .The fastest way to find a password or OTP:
applepw cartaThis will automatically search for carta, carta.com, carta.net, etc.
# List all accounts for a domain
applepw pw list google.com
# Get a specific password (requires system prompt)
applepw pw get github.com# List all OTP accounts for a domain
applepw otp list carta.com
# Get a specific OTP code
applepw otp get carta.com# Report daemon/auth status as JSON
applepw status
# Stop the background daemon
applepw stop
# Manually re-authenticate
applepw authapplepw communicates with the official macOS PasswordManagerBrowserExtensionHelper via a background daemon. It uses the SRP (Secure Remote Password) protocol to establish a secure, encrypted session with the system keychain, ensuring your credentials never leave your machine unencrypted.