Command
nylas init
The nylas init command walks you through setting up the Nylas CLI in four steps: creating or logging into your Nylas account, selecting or creating an application, generating an API key, and syncing your connected email accounts. If you already have an API key, pass --api-key to skip the interactive wizard. Works with Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP.
Usage
nylas init [--api-key KEY] [--region us|eu] [--google|--microsoft|--github]Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --api-key | Nylas API key (skips interactive wizard) |
| --region(-r) | API region: us or eu (default: us) |
| Use Google SSO for account creation/login | |
| --microsoft | Use Microsoft SSO for account creation/login |
| --github | Use GitHub SSO for account creation/login |
Examples
Interactive guided setup
nylas init
# Follow the 4-step wizard:
# Step 1: Create account or log in
# Step 2: Select or create application
# Step 3: Generate API key
# Step 4: Sync email accountsQuick setup with existing API key
nylas init --api-key nyl_abc123Quick setup for EU region
nylas init --api-key nyl_abc123 --region euStart with Google SSO
nylas init --googleTroubleshooting
Wizard fails with 'non-interactive mode requires --api-key'
The wizard needs a terminal (TTY). In CI/CD or scripts, pass --api-key directly.
SSO browser window doesn't open
Copy the URL printed in the terminal and open it manually in your browser.
API key verification fails
Check the key at dashboard-v3.nylas.com. Ensure no extra whitespace when pasting.
Recommended guides
Getting Started with Nylas CLI
Set up Nylas CLI in under a minute. The nylas init wizard creates your account, picks an application, generates an API key, and syncs your email accounts. Covers install, first-run welcome screen, dashboard management, AI chat, and config reset.
Give Your AI Coding Agent an Email Address
Connect Claude Code, Cursor, OpenAI Codex CLI, Windsurf, and OpenClaw to a real email account via MCP. Step-by-step setup for each tool using Nylas CLI.
OpenClaw CLI: Install, Set Up, and Add Plugins (npm Guide)
Install OpenClaw CLI via npm, add plugins, configure WhatsApp and iMessage integrations, and set up on Windows. Complete setup and plugin management reference.
Automate Email with Manus AI: Beginner Guide
Get started with Manus AI and Nylas CLI in five minutes. Send your first email, read your inbox, and search messages — all through natural language prompts.
OpenClaw Nylas Plugin — npm Install Guide
Install @nylas/openclaw-nylas-plugin to give OpenClaw 14 native email, calendar, and contacts tools. Multi-account, typed schemas, auto-discovery.
Run nylas init --help for full help output.