Email, calendar, and contacts from your terminal.
Pipe-friendly, headless-first. Give any agent email, calendar, and contacts in one command.
Nylas CLI is a free, open-source command-line tool that provides unified access to email, calendar, and contacts across Gmail, Microsoft 365, Exchange, Yahoo, iCloud, and IMAP providers. It includes a built-in MCP server for AI agents, GPG encryption, webhook management, and 72+ commands for scripting and automation.
Features
Agent-native
Built-in MCP server lets Claude, Cursor, and VS Code read and send email in one command. Typed tools across email, calendar, and contacts — no API keys or middleware required.
Runs anywhere
Works over SSH, inside containers, and in CI pipelines. No GUI, no browser, no display server. Pipe JSON output to jq, scripts, or other CLI tools.
Unified email
One interface for Gmail, Outlook, Exchange, Yahoo, iCloud, and any IMAP server. Send, search, list, and read email across 6 providers with a single command.
Calendar
List, create, update, and delete events. AI scheduling with natural language, DST-aware timezone handling, and free/busy availability checks.
Contacts
Search and sync contacts across every connected provider. List contact groups, look up by name or email, and export as JSON for automation.
Sandboxed
OAuth tokens stored in your OS keyring. GPG signing and encryption keep messages private. Your credentials and keys never leave your machine.
Guides
Learn by doing
Monitor Email Integration Health from Terminal
Schedule nylas doctor health checks in cron, track API error rates from audit logs, test webhook endpoints, and send an alert email when a check fails.
Email API Pricing Models: Predict Your Costs
Per-connected-account vs per-message email API pricing compared, with worked cost examples at 5, 100, and 1,000 accounts, free tiers, and hidden costs.
Handle Email API Outages: Backoff and Queues
Detect an email API outage in under 30 seconds, retry with exponential backoff, queue sends to a local spool, and flush it cleanly when service returns.
Build Reliable Email Automation: 5 Patterns
Email automation fails silently: expired tokens, rate limits, duplicate sends. Five patterns fix it: exit codes, retries, idempotency, drafts, audit logs.
Email API SLAs: Uptime vs Success Rate
What a 99.99% email API SLA guarantees: uptime vs success-rate measurement, downtime math per tier, error budgets, and CLI checks to verify reliability.
Email Threads from Terminal: List, Read, Reply
List, read, and reply to email threads from the terminal with Nylas CLI. Group conversations by subject, navigate replies, and mark them as read in one command.
Install
One install. Then pipe it to anything.
brew install nylas/nylas-cli/nylasThen run guided setup
- 1.Run
nylas init— log in, create or choose an app, generate an API key, and sync grants. - 2.Prefer manual setup? Sign up at dashboard-v3.nylas.com.
- 3.Start using commands — the same setup works across email, calendar, contacts, and MCP.
nylas init