Working with email from the terminal means you don't need to open Gmail or Outlook. nylas email drafts list does the job.
The nylas email drafts list command shows all saved drafts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP accounts. Use --json to pipe draft data into scripts or count drafts programmatically.
Quick Start
brew install nylas/nylas-cli/nylas
nylas init
nylas email drafts list
Examples
List recent drafts:
nylas email drafts list --limit 10
Count total drafts:
nylas email drafts list --json | jq length
How It Works
The Nylas CLI abstracts away the differences between Gmail's API, Microsoft Graph, Exchange Web Services, and raw IMAP. You write one command; it works across all providers. This matters for automation — your cron job or CI pipeline doesn't need provider-specific logic.
Syntax
nylas email drafts list [--limit N] [--json]
Related Commands
-
nylas email send— Send an email. Supports scheduling, GPG signing/encryption, and tracking -
nylas email list— List recent emails with optional filters -
nylas email read— Read a specific email. Supports decryption and signature verification -
nylas email search— Search emails by query and filters
Full docs: nylas email drafts list reference — all flags, advanced examples, and troubleshooting.
All commands: Nylas CLI Command Reference
Get started: brew install nylas/nylas-cli/nylas — other install methods
Top comments (0)