Skip to content
/ apw Public

A CLI for Apple Passwords (also known as iCloud Keychain)

License

Notifications You must be signed in to change notification settings

bendews/apw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Apple Passwords CLI

A CLI for access to Apple Passwords. A foundation for enabling integration and automation.
Explore the docs »

View Demo · Report Bug · Request Feature

Contributors Forks Stargazers Issues MIT License

About The Project

This project introduces a CLI interface designed to access iCloud passwords and OTP tokens. The core objective is to provide a secure and straightforward way to retrieve iCloud passwords, facilitating integration with other systems or for personal convenience.

It utilises a built in helper tool in macOS 14 and above to facilitate this functionality.

apw.mov

Getting Started

Ensure homebrew is installed or build apw from source.

Installation

To install APW and configure it to run automatically at system startup, follow these steps using Homebrew:

  1. Install APW:

    brew install bendews/homebrew-tap/apw
    
  2. Enable the APW service to start on boot:

    brew services start apw
    

Integrations

The following integrations have been completed:

  • Raycast (extension link) to provide quick access to passwords and OTP tokens. Will automatically retrieve the keychain entry for the currently active webpage.

The following are some future integration ideas:

  • SSH Agent to allow storing and using SSH keys/passwords via iCloud
  • Menubar application to provide a standalone interface

Usage

Ensure the daemon is running in the background, either via brew services start apw or apw start.

To authenticate the daemon interactively:

This is required every time the daemon starts i.e on boot

apw auth

Query for available passwords (Interactive):

apw pw

Query for available passwords (JSON output):

apw pw list google.com

View more commands & help:

apw --help

Options:

  -h, --help     - Show this help.                            
  -V, --version  - Show the version number for this program.  

Commands:

  auth   - Authenticate CLI with daemon.         
  pw     - Interactively list accounts/passwords.
  otp    - Interactively list accounts/OTPs.     
  start  - Start the daemon.

Building

This project uses Deno for development and compilation. Make sure you have Deno installed on your system before proceeding.

Running the Project

To run the project whilst developing:

deno run --allow-all src/cli.ts <OPTIONS>

Building a release version

To build a statically compiled binary:

deno compile --allow-all -o apw src/cli.ts

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL V3.0 License. See LICENSE for more information.

Contact

Ben Dews - #

Project Link: https://github.com/bendews/apw

Acknowledgments