Skip to main content

Command-line interfaces for macOS native apps (Mail, Reminders, Calendar, Notes, Contacts)

Project description

Apple CLIs

A collection of Python CLIs for controlling Apple applications through AppleScript (osascript). No dependency on third-party Python packages, just the standard library. Each CLI is self-contained and can be installed separately, but they share a common design and codebase for AppleScript interaction.

mail-app is a Python CLI that controls Apple Mail that can view and send messages.

reminders-app is a companion Python CLI for Apple Reminders with list/reminder management and query-based bulk actions.

calendar-app is a Python CLI for Apple Calendar to manage calendars and events.

notes-app is a Python CLI for Apple Notes to manage notes and folders.

contacts-app is a Python CLI for macOS Contacts to manage contacts and groups.

Requirements

  • macOS
  • Python 3.9+

Install (editable/development)

python3 -m pip install -e .

Then run:

mail-app --help

mail-app command overview

Messages

mail-app messages list [--account ACCOUNT] [--mailbox MAILBOX] [--limit N] [--order desc|asc] [--json]
mail-app messages view (--id "<id>" | --message-id "<message-id>") [--account ACCOUNT] [--mailbox MAILBOX] [--body-only] [--json]
mail-app messages show (--id "<id>" | --message-id "<message-id>") [--account ACCOUNT] [--mailbox MAILBOX]
mail-app messages send --to "a@example.com,b@example.com" --subject "Hello" --body "Hi there" [--cc ...] [--bcc ...] [--account ACCOUNT]
mail-app messages move (--id "<id>" | --message-id "<message-id>") --destination-mailbox DEST [--account ACCOUNT] [--source-mailbox MAILBOX]
mail-app messages archive (--id "<id>" | --message-id "<message-id>") [--account ACCOUNT] [--mailbox MAILBOX]
mail-app messages trash (--id "<id>" | --message-id "<message-id>") [--account ACCOUNT] [--mailbox MAILBOX]
mail-app messages spam (--id "<id>" | --message-id "<message-id>") [--account ACCOUNT] [--mailbox MAILBOX]

Mailboxes

mail-app mailboxes list [--account ACCOUNT] [--json]
mail-app mailboxes create --account ACCOUNT --name NAME [--parent-mailbox MAILBOX]
mail-app mailboxes rename --account ACCOUNT --mailbox MAILBOX --new-name NEW_NAME
mail-app mailboxes delete --account ACCOUNT --mailbox MAILBOX

reminders-app command overview

Reminders

reminders-app reminders list [--list LIST] [--limit N] [--order desc|asc] [--completed|--all] [--json]
reminders-app reminders view --id ID [--body-only] [--json]
reminders-app reminders show --id ID
reminders-app reminders create --title TITLE [--notes TEXT] [--list LIST] [--due-date DATE] [--priority N]
reminders-app reminders update --id ID [--title TITLE] [--notes TEXT] [--due-date DATE] [--priority N] [--list LIST]
reminders-app reminders complete [--id ID | selectors | --all]
reminders-app reminders uncomplete [--id ID | selectors | --all]
reminders-app reminders delete [--id ID | selectors | --all]
reminders-app reminders move --destination-list LIST [--id ID | selectors | --all]

Lists

reminders-app lists list [--json]
reminders-app lists create --name NAME
reminders-app lists rename --list NAME --new-name NEW_NAME
reminders-app lists delete --list NAME

Note on Performance

Due to inefficiencies in how the Apple Reminders application handles bulk queries and property retrieval through AppleScript, some commands (especially list when querying many items) may experience delays or timeouts. If you encounter timeouts, try narrowing the scope of your command by specifying a --list.

calendar-app command overview

Events

calendar-app events list [--calendar CALENDAR] [--start-after DATE] [--start-before DATE] [--limit N] [--order desc|asc] [--json]
calendar-app events view --id ID [--json]
calendar-app events show --id ID
calendar-app events create --summary SUMMARY --start-date DATE (--end-date DATE | --duration DURATION) [--location LOC] [--notes TEXT] [--all-day] [--url URL] [--calendar CAL] [--alarm MIN]
calendar-app events update --id ID [--summary SUMMARY] [--start-date DATE] [--end-date DATE | --duration DURATION] [--location LOC] [--notes TEXT] [--all-day|--no-all-day] [--url URL] [--calendar CAL]
calendar-app events delete --id ID
  • events list defaults to events starting from "now" if no date range is provided.
  • events list output includes a human-friendly duration column (e.g., 15m, 2h, 1d).
  • events create/update --duration accepts human-friendly strings like 30m, 3h, 2d.

Calendars

calendar-app calendars list [--json]
calendar-app calendars create --name NAME
calendar-app calendars rename --calendar NAME --new-name NEW_NAME
calendar-app calendars delete --calendar NAME

notes-app command overview

Notes

notes-app notes list [--folder FOLDER] [--limit N] [--order desc|asc] [--json]
notes-app notes view --id ID [--json]
notes-app notes show --id ID
notes-app notes create --name NAME --body TEXT [--folder FOLDER]
notes-app notes update --id ID [--name NAME] [--body TEXT] [--folder FOLDER]
notes-app notes delete --id ID

Folders

notes-app folders list [--json]
notes-app folders create --name NAME
notes-app folders delete --name NAME

contacts-app command overview

Contacts

contacts-app contacts list [--search TEXT] [--group GROUP] [--limit N] [--order desc|asc] [--json]
contacts-app contacts view --id ID [--json]
contacts-app contacts show --id ID
contacts-app contacts create --first-name NAME [--last-name NAME] [--organization ORG] [--job-title JOB] [--nickname NICK] [--note TEXT] [--email EMAIL] [--phone PHONE]
contacts-app contacts delete --id ID

Groups

contacts-app groups list [--json]
contacts-app groups create --name NAME
contacts-app groups delete --name NAME

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apple_cli-1.0.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apple_cli-1.0.0-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file apple_cli-1.0.0.tar.gz.

File metadata

  • Download URL: apple_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for apple_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a25e03c1eefda701a1febd9ea5ea25036d5a05ca4aa8618af8483458f1c8eacb
MD5 9cccf315628d9d7175942869edc5d429
BLAKE2b-256 27319d185e8611743ef16b48385599761ecfc4ac1797d7218c4638eb237de004

See more details on using hashes here.

File details

Details for the file apple_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: apple_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for apple_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97c7fb2cce2cbd5048007d3c4af2705221973daf273df9009ac710af7a075fd4
MD5 209d2a83a3688797e9304231cd2a2705
BLAKE2b-256 3f68de4b21d4e1e6f501b08df0d1d0456b5c18d7c78d96b2cddc6e5c81ed7915

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page