Email for agents and humans.
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
Export Email Data to Dynamics 365
Sync inbox data to Dynamics 365 Contacts, Accounts, and Activities. Map fields, import via CSV or Web API, and schedule syncs from the CLI.
Export Email Data to Zoho CRM
Export email and contact data from Nylas CLI into Zoho CRM. Map to Leads, Contacts, and Accounts. CSV import, REST API v2 upsert, Python and TypeScript.
Auto-Create Email Drafts from the CLI
Generate pre-filled email drafts from templates and contact context. Batch-create follow-ups, pull in conversation history, review before sending. No GUI needed.
Build Email Autocomplete from the CLI
Build a fast, fuzzy email autocomplete from your contact and inbox data. Rank by frequency, search with fzf or Fuse.js. Bash, Python, and TypeScript examples.
Map Organization Contacts from Email
Build a complete external contact map from email and calendar data. Score relationship strength, find warm introductions, and export for CRM. No API keys needed.
Import Email into a Graph Database
Email is naturally a graph. Import sender-recipient relationships into NetworkX or Neo4j. Query paths, clusters, and influence. Full Python and Cypher examples.
Personalize Outbound Email from the CLI
Send personalized emails at scale from the CLI. Merge contact data into templates, schedule by timezone, throttle sends. Bash, Python, and TypeScript examples.
Enrich Contact and Company Info from Email
Extract job titles, phone numbers, and social links from email signatures. Infer seniority from patterns. Build rich contact profiles without any external API.
Build a Contact Hierarchy from Email
Map people to companies and infer reporting lines from CC patterns and calendar data. Extract org structure from your inbox with Nylas CLI. No CRM needed.
Organize Emails by Company and Domain
Group your inbox by sender domain to see which companies you email most. Filter freemail, normalize domains, export to CSV. Bash, Python, and TypeScript.
CRM Email Workflows
Turn your inbox into CRM intelligence. Group emails by company, build contact hierarchies, enrich profiles, and automate outbound — all from the CLI.
Export Email Data to Pipedrive
Export email and contact data from Nylas CLI into Pipedrive. Map to Persons, Organizations, Deals, and Activities. CSV and REST API with Python and TypeScript.
Export Email Data to HubSpot
Export email and contact data from Nylas CLI into HubSpot. Map to Contacts, Companies, and Engagements. CSV import, API v3 sync, Python and TypeScript.
Export Email Data to Salesforce
Export email and contact data from Nylas CLI into Salesforce. Map to Leads, Contacts, Accounts, and Tasks. CSV and REST API examples in Python and TypeScript.
Test Email in CI/CD with PowerShell
Test email delivery and content in CI/CD pipelines using PowerShell and Nylas CLI. GitHub Actions and Azure DevOps examples with Pester assertions on email content.
Monitor Your Inbox with PowerShell
Build inbox monitoring and alerting scripts with PowerShell and Nylas CLI. Poll for new emails, watch for specific senders, trigger Teams webhooks and desktop notifications.
Office 365 Email from PowerShell
Manage Office 365 email from PowerShell without Microsoft Graph API complexity. Authenticate, list, search, read, and send email with Nylas CLI. One command instead of ten.
Automated Email Reports with PowerShell
Build automated email reporting workflows with Nylas CLI and PowerShell. Query emails, aggregate data with Group-Object, generate HTML reports, and schedule with Task Scheduler.
Automate Email and Calendar in PowerShell
Cross-provider email and calendar automation in PowerShell using Nylas CLI. Read emails, create events, check availability, and schedule meetings from scripts.
Download Email Attachments in PowerShell
Download and process email attachments from any provider using Nylas CLI in PowerShell. Filter by file type, bulk download, and build attachment pipelines.
Read and Search Email in PowerShell
Read, search, and filter email from PowerShell using Nylas CLI. List unread, search by sender or date, extract bodies, pipe through Where-Object, and export to CSV.
Gmail OAuth in PowerShell
Authenticate with Gmail from PowerShell using Nylas CLI built-in OAuth. No manual token management, no client secrets, no refresh logic. One command to authenticate.
Replace Send-MailMessage with Nylas CLI
Step-by-step migration from the deprecated Send-MailMessage cmdlet to Nylas CLI. Side-by-side before/after examples for every common email pattern in PowerShell.
Send Email from PowerShell
Send email from PowerShell using Nylas CLI. Replaces Send-MailMessage with OAuth2, attachments, HTML body, scheduling, and multi-recipient support. No SMTP config required.
Connect Voice Agents to Email and Calendar
Bridge LiveKit, Vapi, or any voice agent framework to email and calendar using Nylas CLI as a subprocess. Complete Python examples.
Secure Email Handling from the CLI
GPG encryption and signing, SPF/DKIM/DMARC verification, safe attachment handling, phishing defense, and LLM sanitization for CLI email workflows.
Debugging Invisible Characters in Email
Find and fix hidden Unicode, zero-width joiners, BOM, and encoding issues in email headers, subject lines, and bodies using Nylas CLI and hex tools.
Agent-First Email Design
Why every Nylas CLI design decision supports AI agents: --json output, --yes non-interactive mode, MCP server, subprocess tool pattern, stdin piping.
Best CLI Email Tools Compared
Side-by-side comparison of Nylas CLI, mailx, mutt, msmtp, and swaks. Compare on provider support, OAuth, JSON output, AI agent integration, calendar, and scripting.
Email Deliverability from the CLI
Debug email deliverability from your terminal. Inspect SPF, DKIM, and DMARC records with dig. Check authentication headers with Nylas CLI. Troubleshoot delivery issues.
Why Gmail API Breaks AI Agents
The Gmail API was built for apps, not agents. OAuth complexity, token refresh, rate limits, and consent screens create friction. Nylas CLI abstracts it into simple commands.
Email as Memory for AI Agents
Use email as persistent memory for AI agents — semantic, episodic, and procedural. Search, retrieve, and reason over conversation history with Nylas CLI.
Email as Identity for AI Agents
How AI agents use email as their identity layer — for signups, OTP verification, account recovery, and service authentication. Extract verification codes with Nylas CLI.
Why AI Agents Need Email
AI agents need email for authentication, two-way communication, audit trails, and multi-threaded conversations. Learn how Nylas CLI gives agents inbox access in one command.
Install the OpenClaw Nylas Plugin
Give your OpenClaw assistant native email, calendar, and contacts tools. Auto-discovery, multi-account, typed tool schemas. No exec commands needed.
List Exchange Emails from the Command Line
List, search, and filter Microsoft Exchange and Exchange Online emails from your terminal. No EWS or PowerShell required. OAuth2 built in.
List IMAP Emails from the Command Line
List, search, and filter emails from any IMAP server from your terminal. Works with Fastmail, ProtonMail Bridge, Zoho, and any IMAP-compatible provider.
List iCloud Mail Emails from the Command Line
List, search, and filter iCloud Mail emails from your terminal. No app-specific passwords or IMAP config. One command setup.
List Yahoo Mail Emails from the Command Line
List, search, and filter Yahoo Mail emails from your terminal. One command, no app passwords or IMAP config. OAuth2 built in.
List Outlook Emails from the Command Line
List, search, and filter Outlook and Microsoft 365 emails from your terminal. No Microsoft Graph API setup. OAuth2 built in.
List Gmail Emails from the Command Line
List, search, and filter Gmail emails from your terminal. One command, no Google API setup. Works with OAuth2 out of the box.
Audit AI Agent Activity — CLI Logging Guide
One command to log every action AI agents take. Track Claude Code, Copilot, and MCP agent commands with automatic source detection, session filtering, and compliance exports.
Create a Manus Skill for Email and Calendar
Build a Manus AI Skill that gives your agent email and calendar access using the Nylas CLI.
If-Match, ETags, and Gmail API
You want incremental sync and end up building a polling solution. The cleaner approach: Nylas webhooks or Pub/Sub. Test it easily with the CLI.
Nylas CLI with OpenClaw Personal Assistant
Give your OpenClaw assistant email, calendar, and contacts superpowers. Includes exec-approvals.json setup and a ready-made Nylas skill.
Manage Calendar from the Terminal
DST-aware event creation, timezone locking, AI scheduling, and break time protection.
GPG Encrypted Email from the CLI
Sign, encrypt, and verify email with GPG. Auto-fetches keys from public keyservers.
E2E Email Testing with Playwright
Send and verify transactional emails in tests. Poll with the CLI, parse content, click links.
Build an LLM Agent with Email and Calendar Tools
Add email and calendar tools to your custom agent. Use Nylas CLI as subprocess tools. No API code.
Give AI Agents Email Access via MCP
Connect Claude, Cursor, or VS Code to your inbox and calendar in one command.
Send Email from the Terminal
Send, read, search, and automate email from your terminal. Works with Gmail, Outlook, and IMAP.
Install
One install. Then pipe it to anything.
brew install nylas/nylas-cli/nylas