Command
nylas auth login
Authenticate with a provider (Gmail, Outlook, etc.) to connect your mailbox.
Usage
nylas auth loginFlags
| 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 |
Examples
Connect Gmail or Outlook
nylas auth login
# Opens browser for OAuth; follow prompts to connectTroubleshooting
OAuth fails or times out
Ensure you're using a supported browser. Try clearing cookies for the auth domain.
Recommended guides
Send Email from the Terminal
Send, read, search, and automate email from your terminal. Works with Gmail, Outlook, and IMAP.
Give AI Agents Email Access via MCP
Connect Claude, Cursor, or VS Code to your inbox and calendar in one command.
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.
E2E Email Testing with Playwright
Send and verify transactional emails in tests. Poll with the CLI, parse content, click links.
Manage Calendar from the Terminal
DST-aware event creation, timezone locking, AI scheduling, and break time protection.
Run nylas auth login --help for full help output.