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
Best CLI Calendar Tools Compared
Compare gcalcli, khal, calcurse, remind, vdirsyncer, and Nylas CLI for terminal calendar management. Features, providers, sync, and installation.
Build a Human-in-the-Loop Email Agent
Build an AI email agent with human approval gates. Classify messages, draft responses, queue for review, and send only after a human confirms each action.
Automate Email Reports from Terminal
Build automated daily and weekly email reports with cron, JSON output, jq pipelines, and shell scripts. Schedule inbox summaries and deliver by email.
Sync Calendars Across Providers
Compare ICS export, CalDAV, Google Calendar API syncToken, and Microsoft Graph delta queries for cross-provider calendar sync from the terminal.
Search Email from Terminal
Compare Gmail search operators, Graph API $filter, IMAP SEARCH, and Nylas CLI for searching email across providers from the terminal. Cross-provider syntax guide with examples.
Read Email from Your Terminal
Compare NeoMutt, aerc, and Nylas CLI for reading email in the terminal. Setup time, IMAP config, search, multi-provider support, and JSON scripting output.
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