Scripts, cron jobs, and AI agents all need email access. nylas email list provides it without SMTP configuration.
The nylas email list command fetches recent emails from your connected mailbox and displays them in your terminal. Filter by unread, starred, sender, or attachment status.
Syntax
nylas email list [grant-id] [--unread] [--limit N]
Examples
List recent emails:
nylas email list --limit 10
Unread only:
nylas email list --unread
JSON for scripting:
nylas email list --json --limit 20
When to Use This
Reach for nylas email list when you need to process email in shell scripts, cron jobs, CI/CD pipelines, or AI agent tool calls. Combine with --json to pipe output into other tools.
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.
Related Commands
-
nylas email sendâ Send an email. Supports scheduling, GPG signing/encryption, and tracking -
nylas email readâ Read a specific email. Supports decryption and signature verification -
nylas email searchâ Search emails by query and filters -
nylas email templates listâ List email templates
Full docs: nylas email 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)