Command
nylas chat
Launch a web-based AI chat interface for email, calendar, and contacts.
Written by Qasim Muhammad Staff SRE
What does nylas chat do?
The nylas chat command starts a local web server (default port 7367) that provides an AI-powered chat interface in your browser. Ask questions in natural language and the agent reads email, creates calendar events, searches contacts, and sends messages on your behalf. Supports Claude, Codex, and Ollama as AI backends. Includes Slack integration for cross-channel messaging.
Usage
nylas chat [--agent claude|codex|ollama] [--port PORT] [--no-browser]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 |
| --port | Port to run the chat server on (default: 7367) |
| --no-browser | Start server without opening browser |
| --agent | AI agent to use: claude, codex, or ollama |
| --model | Model name for the ollama agent |
Examples
Launch chat with default agent
nylas chatUse Claude as the AI backend
nylas chat --agent claudeUse a local Ollama model
nylas chat --agent ollama --model llama2Run on a custom port without opening browser
nylas chat --port 8080 --no-browserExample output
Starting chat (agent: claude)...
✓ Server running at http://localhost:7367
you › How many unread emails do I have?
nylas › You have 4 unread messages, the most recent from bob@example.com about "Q3 planning".Troubleshooting
Chat fails to start
Ensure you have authenticated first with `nylas init` or `nylas auth config`.
Agent not found
Install the agent locally. Claude requires `claude` CLI, Ollama requires `ollama` running.
Port already in use
Use --port to specify a different port, e.g. `nylas chat --port 8080`.
Recommended guides
List Fastmail emails from the CLI
List Fastmail emails from the CLI through Nylas IMAP access, using app passwords, inbox filters, JSON output, and Fastmail-specific auth troubleshooting.
Book meeting rooms from the CLI
Book meeting rooms from the CLI by listing calendar resources, using each room email as a calendar ID, and adding it as an event participant with less setup.
Google Calendar API Sync Tokens
Use Google Calendar API sync tokens for incremental event sync, handle the 410 GONE full-resync, and read calendars from the CLI.
Microsoft Graph calendarView Explained
Query the Microsoft Graph calendarView endpoint for events in a date range with recurrences expanded. Compare it to list events and read calendars from the CLI.
Microsoft Graph getSchedule Free/Busy
Call the Microsoft Graph getSchedule action to read free/busy for Outlook and Exchange calendars, then check availability across providers from the CLI.
Why Cloud Servers Block SMTP Ports
AWS, GCP, and Azure block outbound SMTP port 25 while ports 587 and 465 stay open. Confirm the block and send email over an HTTPS API instead.
Run nylas chat --help for full help output.