Nylas CLI is a free, open-source command-line tool that gives you unified access to email, calendar, and contacts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP. One interface, six providers, zero API plumbing.
Get started
- Sign up for Nylas and create an API key
- Connect at least one email account under Grants
- Install the CLI
- Authenticate with your API key
Install:
# macOS / Linux
brew install nylas/nylas-cli/nylas
# Or via shell script
curl -fsSL https://cli.nylas.com/install.sh | bash
# Windows
irm https://cli.nylas.com/install.ps1 | iex
# Go (any platform)
go install github.com/nylas/cli/cmd/nylas@latest
Authenticate:
nylas auth config --api-key YOUR_API_KEY
Full docs and guides: cli.nylas.com
What can you do with it?
Read and send email
# List your recent emails
nylas email list
# Search for specific messages
nylas email search --query "from:alice budget Q4"
# Send an email
nylas email send --to bob@company.com --subject "Meeting notes" --body "Attached."
# AI-powered email drafting
nylas email smart-compose --prompt "Follow up on yesterday's call with Lisa"
Manage your calendar
# List upcoming events
nylas calendar list
# Create an event
nylas calendar create --title "Standup" --start "2026-03-22T09:00:00" --duration 30m
# Check free/busy availability
nylas calendar availability --email alice@company.com --date 2026-03-25
Look up contacts
# Search contacts
nylas contacts search "Sarah Chen"
# List all contacts
nylas contacts list
Pipe-friendly JSON output
Every command supports --output json for scripting:
# Get unread count
nylas email list --unread --output json | jq length
# Extract sender emails from recent messages
nylas email list --limit 20 --output json | jq -r '.[].from[0].email'
Built-in MCP server for AI agents
Nylas CLI includes a Model Context Protocol (MCP) server. This means Claude Desktop, Cursor, Windsurf, and VS Code can read your email, check your calendar, and send messages directly:
nylas mcp serve
Add it to your Claude Desktop config and your AI assistant gets full email and calendar access. No custom code needed.
More details: Give AI Agents Email Access via MCP
GPG encrypted email
Send and receive PGP/GPG encrypted email from the terminal. The CLI auto-fetches public keys from keyservers:
# Send encrypted + signed
nylas email send --to alice@company.com --subject "Confidential" --body "See attached" --gpg --sign
# Read and decrypt
nylas email read <message-id> --gpg
Full guide: GPG Encrypted Email from the CLI
E2E email testing with Playwright
Test password reset flows, invitation emails, and verification links end-to-end:
# Poll for a specific email in your test
nylas email search --query "subject:Reset your password" --wait 30 --output json
Pair with Playwright to verify content and click links. No Gmail API credentials in CI.
Full guide: E2E Email Testing with Playwright
Works across six providers
| Provider | Auth | Status |
|---|---|---|
| Gmail | OAuth2 | Supported |
| Outlook / Microsoft 365 | OAuth2 | Supported |
| Exchange Online | OAuth2 | Supported |
| Yahoo Mail | OAuth2 | Supported |
| iCloud Mail | OAuth2 | Supported |
| Any IMAP server | OAuth2 / App password | Supported |
You write one command. Nylas handles the provider differences.
Learn more
- Send email from the terminal — no SMTP, no sendmail
- List Gmail emails from the CLI — one command, no Google API setup
- Build an LLM agent with email tools — add email and calendar to your agent
- Full command reference — every flag and option documented
Top comments (0)