Email, calendar, and contacts from your terminal.
Pipe-friendly and headless-first. Give any script or AI agent a real inbox in one command. Free and open source.
What is the Nylas CLI?
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 250+ commands for scripting and automation.
The Nylas CLI in action
Pick a topic, read the commands. Every one runs the same in a script, a cron job, or an agent.
List, read, search, send, and draft mail across Gmail, Outlook, Exchange, and IMAP. Add --json to pipe results into jq, grep, or a cron job.
Your inbox is one command away.
Install in seconds. Connect five accounts free. No card required.
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.
Give your agent its own inbox
A real, managed email address on a Nylas domain — with policies and rules that decide what your agent can act on. No OAuth handshake, no borrowed mailbox.
Real, managed address
A live address like
support@you.nylas.email, provisioned on a Nylas domain.Policy guardrails
Rules block, archive, or flag anything outside your policy — before the agent acts on it.
No OAuth dance
No third-party mailbox and no borrowed credentials — the agent owns the inbox.
Start here
Three short paths to your first result. Each one is copy-paste commands, start to finish.
Send your first email
Install, connect a mailbox, and fire off a message in under two minutes — no SMTP server, no OAuth app.
Give an AI agent email
Expose the CLI as an MCP server so Cursor, Claude, or your own agent can read and send mail with one command.
Build an email agent
Wire the CLI into a script or workflow that triages, replies, and acts on an inbox on your behalf.