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
Build a TaskWeaver Email Agent
Give a TaskWeaver plugin email by wrapping the Nylas CLI as a tool โ one subprocess call per action, JSON in and out, across 6 providers, no per-provider SDK.
Build a ControlFlow Email Agent
Give a ControlFlow task email by wrapping the Nylas CLI as a tool โ one subprocess call per action, JSON in and out, across 6 providers, no per-provider SDK.
Build a Mem0 Email Agent
Give a Mem0-backed agent email by wrapping the Nylas CLI as a tool โ one subprocess call per action, JSON in and out, with persistent memory across sessions.
Build a BabyAGI Email Agent
Give a BabyAGI agent email by registering the Nylas CLI as a task-execution tool โ one subprocess call per action, JSON in and out, across 6 providers.
Build a BeeAI Email Agent
Give a BeeAI ReAct agent email by wrapping the Nylas CLI in a custom tool โ one subprocess call per action, JSON in and out, across 6 providers, no SDK.
Build a Semantic Router Email Agent
Route email intents to the Nylas CLI with Semantic Router โ one subprocess call per action, JSON in and out, across 6 providers, with no provider SDK.
Install
One install. Then pipe it to anything.
brew install nylas/nylas-cli/nylasThen run guided setup
nylas initSigns you up, creates an app and API key, and connects your email in one flow.
Prefer manual setup? Already have an API key? Log in with nylas auth config.