Quick command reference. For detailed docs, see docs/commands/<feature>.md
Quick Links: README | Development | Architecture
| Flag | Description | Example |
|---|---|---|
--json |
Output as JSON | nylas email list --json |
--no-color |
Disable color output | nylas email list --no-color |
--verbose / -v |
Enable verbose output | nylas -v email list |
--config |
Custom config file path | nylas --config ~/.nylas/alt.yaml email list |
--help / -h |
Show help | nylas email --help |
Common per-command flags:
--limit N- Limit results (most list commands)--yes/-y- Skip confirmations (delete/send commands)
Enable tab completion for faster command entry. The CLI automatically generates completion scripts for all major shells.
# Generate and install completion script
nylas completion bash > /etc/bash_completion.d/nylas
# Or for user-only install:
mkdir -p ~/.local/share/bash-completion/completions
nylas completion bash > ~/.local/share/bash-completion/completions/nylas# Generate and install completion script
nylas completion zsh > /usr/local/share/zsh/site-functions/_nylas
# Or add to your .zshrc:
echo "autoload -U compinit; compinit" >> ~/.zshrc
mkdir -p ~/.zsh/completion
nylas completion zsh > ~/.zsh/completion/_nylas
echo "fpath=(~/.zsh/completion $fpath)" >> ~/.zshrc# Generate and install completion script
nylas completion fish > ~/.config/fish/completions/nylas.fish# Add to your PowerShell profile
nylas completion powershell | Out-String | Invoke-Expression
# Or save to profile permanently:
nylas completion powershell >> $PROFILEAfter installation, restart your shell or source your profile to activate completion.
nylas init # Guided first-time setup
nylas init --api-key <key> # Quick setup with existing API key
nylas init --api-key <key> --region eu # Setup with EU region
nylas init --google # Setup with Google SSO shortcutThe init command walks you through:
- Creating or logging into your Nylas account (SSO)
- Selecting or creating an application
- Generating and activating an API key
- Syncing existing email accounts
Run nylas init again after partial setup — it skips completed steps.
nylas auth config # Configure API credentials
nylas auth login # Authenticate with provider
nylas auth list # List connected accounts
nylas auth show [grant-id] # Show account details
nylas auth status # Check authentication status
nylas auth whoami # Show current user info
nylas auth switch <email> # Switch active account
nylas auth logout # Logout current account
nylas auth remove <grant-id> # Remove account completely
nylas auth token # Display current API token
nylas auth scopes [grant-id] # Show granted OAuth scopes
nylas auth providers # List available providers
nylas auth migrate # Migrate from v2 to v3Manage your Nylas Dashboard account, applications, and API keys directly from the CLI.
nylas dashboard register # Create a new account (SSO)
nylas dashboard register --google # Register with Google SSO
nylas dashboard register --microsoft # Register with Microsoft SSO
nylas dashboard register --github # Register with GitHub SSO
nylas dashboard login # Log in (interactive)
nylas dashboard login --google # Log in with Google SSO
nylas dashboard login --email --user user@example.com # Email/password
nylas dashboard logout # Log out
nylas dashboard status # Show current auth status
nylas dashboard refresh # Refresh session tokensnylas dashboard sso login --provider google # SSO login
nylas dashboard sso register --provider github # SSO registrationnylas dashboard apps list # List all applications
nylas dashboard apps list --region us # Filter by region
nylas dashboard apps create --name "My App" --region us # Create app
nylas dashboard apps use <app-id> --region us # Set active appnylas dashboard apps apikeys list # List keys (active app)
nylas dashboard apps apikeys list --app <id> --region us # Explicit app
nylas dashboard apps apikeys create # Create key (active app)
nylas dashboard apps apikeys create --name "CI" # Custom name
nylas dashboard apps apikeys create --expires 30 # Expire in 30 daysAfter creating a key, you choose: activate in CLI (recommended), copy to clipboard, or save to file.
Explore the CLI with sample data before connecting your accounts:
nylas demo email list # Browse sample emails
nylas demo calendar list # View sample events
nylas demo contacts list # See sample contacts
nylas demo notetaker list # Explore AI notetaker
nylas demo tui # Interactive demo UIAll demo commands mirror real CLI structure: nylas demo <feature> <command>
nylas email list [grant-id] # List emails
nylas email read <message-id> # Read email
nylas email read <message-id> --raw # Show raw body without HTML
nylas email read <message-id> --mime # Show raw RFC822/MIME format
nylas email read <message-id> --decrypt # Decrypt PGP/MIME encrypted email
nylas email read <message-id> --verify # Verify GPG signature
nylas email read <message-id> --decrypt --verify # Decrypt and verify signature
nylas email send --to EMAIL --subject SUBJECT --body BODY # Send email
nylas email send ... --sign # Send GPG-signed email
nylas email send ... --encrypt # Send GPG-encrypted email
nylas email send ... --sign --encrypt # Sign AND encrypt (recommended)
nylas email send --list-gpg-keys # List available GPG signing keys
nylas email search --query "QUERY" # Search emails
nylas email delete <message-id> # Delete email
nylas email mark read <message-id> # Mark as read
nylas email mark unread <message-id> # Mark as unread
nylas email mark starred <message-id> # Star a message
nylas email attachments list <message-id> # List attachments
nylas email attachments download <message-id> <attachment-id> # Download attachment
nylas email metadata show <message-id> # Show message metadataFilters: --unread, --starred, --from, --to, --subject, --has-attachment, --metadata
GPG/PGP security:
nylas email send --to EMAIL --subject S --body B --sign # Sign with your GPG key
nylas email send --to EMAIL --subject S --body B --encrypt # Encrypt with recipient's key
nylas email send --to EMAIL --subject S --body B --sign --encrypt # Both (recommended)
nylas email read <message-id> --decrypt # Decrypt encrypted email
nylas email read <message-id> --decrypt --verify # Decrypt + verify signatureAI features:
nylas email ai analyze # AI-powered inbox summary
nylas email ai analyze --limit 25 # Analyze more emails
nylas email ai analyze --unread # Only unread emails
nylas email ai analyze --provider claude # Use specific AI provider
nylas email smart-compose --prompt "..." # AI-powered email generationDetails: docs/commands/email.md, docs/commands/email-signing.md, docs/commands/encryption.md, docs/commands/ai.md
nylas email templates list # List all templates
nylas email templates create --name NAME --subject SUBJECT --body BODY
nylas email templates show <template-id> # Show template details
nylas email templates update <template-id> [flags] # Update template
nylas email templates delete <template-id> # Delete template
nylas email templates use <template-id> --to EMAIL # Send using templateVariable syntax: Use {{variable}} in subject/body for placeholders.
Details: docs/commands/templates.md
# Folders
nylas email folders list # List folders
nylas email folders show <folder-id> # Show folder details
nylas email folders create <name> # Create folder
nylas email folders rename <folder-id> <new-name> # Rename folder
nylas email folders delete <folder-id> # Delete folder
# Threads
nylas email threads list # List threads
nylas email threads show <thread-id> # Show thread with all messages
nylas email threads search --query "QUERY" # Search threads
nylas email threads mark <thread-id> --read # Mark thread as read
nylas email threads delete <thread-id> # Delete threadnylas email drafts list # List drafts
nylas email drafts show <draft-id> # Show draft details
nylas email drafts create --to EMAIL --subject S # Create draft
nylas email drafts send <draft-id> # Send draft
nylas email drafts delete <draft-id> # Delete draftFlags: --to, --cc, --bcc, --subject, --body, --reply-to, --attach
nylas email scheduled list # List scheduled emails
nylas email scheduled show <schedule-id> # Show scheduled email
nylas email scheduled cancel <schedule-id> # Cancel scheduled emailnylas calendar list # List calendars
nylas calendar events list [--days N] [--timezone ZONE] # List events
nylas calendar events show <event-id> # Show event details
nylas calendar events create --title T --start TIME --end TIME # Create event
nylas calendar events update <event-id> --title "New Title" # Update event
nylas calendar events delete <event-id> # Delete event
nylas calendar events rsvp <event-id> --status yes # RSVP to event
nylas calendar availability check # Check availability
nylas calendar recurring list # List recurring events
nylas calendar virtual list # List virtual meetings
nylas calendar focus-time list # List focus time blocksTimezone features:
nylas calendar events list --timezone America/Los_Angeles --show-tzAI scheduling:
nylas calendar schedule ai "meeting with John next Tuesday afternoon"
nylas calendar analyze # AI-powered analytics
nylas calendar find-time --participants email1,email2 --duration 1h
nylas calendar ai conflicts --days 7 # Detect conflicts
nylas calendar ai reschedule <event-id> --reason "Conflict" # AI rescheduleKey features: DST detection, working hours validation, break protection, AI scheduling
Details: docs/commands/calendar.md, docs/commands/timezone.md, docs/commands/ai.md
nylas contacts list # List contacts
nylas contacts show <contact-id> # Show contact details
nylas contacts create --name "NAME" --email "EMAIL" # Create contact
nylas contacts update <contact-id> --name "NEW NAME" # Update contact
nylas contacts delete <contact-id> # Delete contact
nylas contacts search --query "QUERY" # Search contacts
nylas contacts sync # Sync contactsContact groups:
nylas contacts groups list # List contact groups
nylas contacts groups show <group-id> # Show group details
nylas contacts groups create <name> # Create group
nylas contacts groups update <group-id> --name "NEW" # Update group
nylas contacts groups delete <group-id> # Delete groupContact photos:
nylas contacts photo download <contact-id> # Download contact photo
nylas contacts photo info # Photo infoDetails: docs/commands/contacts.md
nylas webhook list # List webhooks
nylas webhook show <webhook-id> # Show webhook details
nylas webhook create --url URL --triggers "event.created,event.updated"
nylas webhook update <webhook-id> --url NEW_URL # Update webhook
nylas webhook delete <webhook-id> # Delete webhook
nylas webhook triggers # List available triggersTesting & development:
nylas webhook test send <webhook-url> # Send test payload
nylas webhook test payload [trigger-type] # Generate test payload
nylas webhook server # Start local webhook server
nylas webhook server --port 8080 --tunnel cloudflared # With public tunnelDetails: docs/commands/webhooks.md
Receive emails at managed addresses without OAuth or third-party mailbox connections.
nylas inbound list # List inbound inboxes
nylas inbound create <email-prefix> # Create inbox (e.g., support@yourapp.nylas.email)
nylas inbound show <inbox-id> # Show inbox details
nylas inbound delete <inbox-id> # Delete inbox
nylas inbound messages <inbox-id> # List messages in inbox
nylas inbound monitor <inbox-id> # Real-time message monitoringReal-time monitoring with tunnel:
nylas inbound monitor <inbox-id> --tunnel cloudflaredDetails: docs/commands/inbound.md
All timezone commands work 100% offline - no API key required.
nylas timezone list # List all timezones
nylas timezone list --filter America # Filter by region
nylas timezone info <zone> # Get timezone info
nylas timezone convert --from PST --to EST # Convert current time
nylas timezone convert --from UTC --to EST --time "2025-01-01T12:00:00Z"
nylas timezone dst --zone America/New_York # Check DST transitions
nylas timezone dst --zone PST --year 2026 # Check DST for year
nylas timezone find-meeting --zones "NYC,London,Tokyo" # Find meeting timesSupported abbreviations: PST, EST, CST, MST, GMT, IST, JST, AEST
Details: docs/commands/timezone.md
nylas tui # Launch interactive UINavigation: ↑/↓ navigate, Enter select, q quit, ? help
Details: docs/commands/tui.md
Launch a lightweight web interface for CLI configuration and command execution:
nylas ui # Start on default port (7363)
nylas ui --port 8080 # Custom port
nylas ui --no-browser # Don't auto-open browserFeatures:
- Configure API credentials visually
- View and switch between authenticated accounts
- Execute email, calendar, and auth commands
- ID caching with autocomplete suggestions
- Command output with copy functionality
Security:
- Runs on localhost only (not accessible externally)
- Command whitelist prevents arbitrary execution
- Shell injection protection
URL: http://localhost:7363 (default)
Note: For a full email client experience, use
nylas airinstead (see below).
Launch Nylas Air - a full-featured, keyboard-driven email client in your browser:
vs
nylas ui: Air is a complete email/calendar client. UI is for CLI configuration only.
nylas air # Start on default port (7365)
nylas air --port 8080 # Custom port
nylas air --no-browser # Don't auto-open browser
nylas air --clear-cache # Clear all cached data before starting
nylas air --encrypted # Enable encryption for cached dataFeatures:
- Three-pane interface: Folders, message list, preview
- Calendar & Contacts: Full calendar and contact management
- Keyboard shortcuts: J/K navigate, C compose, E archive
- Command palette: Cmd+K for quick actions
- Dark mode: Customizable themes
- AI-powered: Email summaries, smart replies
- Local caching: Full-text search with offline support
- Action queuing: Queue actions when offline
- Encryption: Optional encryption for cached data (system keyring)
Security:
- Runs on localhost only (not accessible externally)
- All data stored locally on your machine
- Optional encryption for cached data using system keyring
URL: http://localhost:7365 (default)
Testing:
make ci-full # Complete CI pipeline (includes Air tests + cleanup)
make test-air-integration # Run Air integration tests onlyLaunch Nylas Chat - a web-based AI chat interface that can access your email, calendar, and contacts:
nylas chat # Start with auto-detected agent (default port 7367)
nylas chat --agent claude # Use specific agent (claude, codex, ollama)
nylas chat --agent ollama --model llama2 # Use Ollama with specific model
nylas chat --port 8080 # Custom port
nylas chat --no-browser # Don't auto-open browserFeatures:
- Local AI agents: Uses Claude, Codex, or Ollama installed on your system
- Email & Calendar access: AI can read emails, check calendar, manage contacts
- Conversation history: Persistent chat sessions stored locally
- Agent switching: Change agents without restarting
- Web interface: Clean, modern chat UI
Supported Agents:
| Agent | Description | Auto-detected |
|---|---|---|
| Claude | Anthropic's Claude (via claude CLI) |
✅ |
| Codex | OpenAI Codex | ✅ |
| Ollama | Local LLM runner (customizable models) | ✅ |
Agent Detection:
The CLI automatically detects installed agents on your system. Use --agent to override the default selection.
Conversation Storage:
- Location:
~/.config/nylas/chat/conversations/ - Format: JSON files per conversation
- Persistent across sessions
Security:
- Runs on localhost only (not accessible externally)
- All data stored locally on your machine
- Agent communication happens through local processes
URL: http://localhost:7367 (default)
Examples:
# Quick start with best available agent
nylas chat
# Force use of Claude
nylas chat --agent claude
# Use Ollama with Mistral model
nylas chat --agent ollama --model mistral
# Run on different port
nylas chat --port 9000 --no-browserEnable AI assistants (Claude Desktop, Cursor, Windsurf, VS Code) to interact with your email and calendar.
nylas mcp install # Interactive assistant selection
nylas mcp install --assistant claude-code # Install for Claude Code
nylas mcp install --assistant cursor # Install for Cursor
nylas mcp install --all # Install for all detected assistants
nylas mcp status # Check installation status
nylas mcp uninstall --assistant cursor # Remove configuration
nylas mcp serve # Start MCP server (used by assistants)Supported assistants:
| Assistant | Config Location |
|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json + permissions in ~/.claude/settings.json |
| Cursor | ~/.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| VS Code | .vscode/mcp.json (project-level) |
Features:
- Auto-detects system timezone for consistent time display
- Auto-configures Claude Code permissions (
mcp__nylas__*) - Injects default grant ID for seamless authentication
- Local grant lookup (no email required for
get_grant)
Available MCP tools: list_messages, list_threads, list_calendars, list_events, create_event, update_event, send_message, create_draft, availability, get_grant, epoch_to_datetime, current_time
Interact with Slack workspaces directly from the CLI.
nylas slack auth set --token xoxp-... # Store Slack user token
nylas slack auth status # Check authentication status
nylas slack auth remove # Remove stored tokenToken sources (checked in order):
SLACK_USER_TOKENenvironment variable- System keyring (set via
nylas slack auth set)
Get your token: api.slack.com/apps → Your App → OAuth & Permissions → User OAuth Token
# List channels you're a member of
nylas slack channels list # List your channels
nylas slack channels list --type public_channel # List public channels only
nylas slack channels list --type private_channel # List private channels
nylas slack channels list --exclude-archived # Exclude archived channels
nylas slack channels list --limit 20 # Limit results
nylas slack channels list --id # Show channel IDs
# Filter by creation date
nylas slack channels list --created-after 24h # Channels created in last 24 hours
nylas slack channels list --created-after 7d # Channels created in last 7 days
nylas slack channels list --created-after 2w # Channels created in last 2 weeks
# Workspace-wide listing (slower, may hit rate limits)
nylas slack channels list --all-workspace # List all workspace channels
nylas slack channels list --all # Fetch all pages
# Get channel info
nylas slack channels info C01234567890 # Get detailed channel infonylas slack messages list --channel general # List messages from channel
nylas slack messages list --channel-id C01234567 # Use channel ID
nylas slack messages list --channel general --limit 10 # Limit results
nylas slack messages list --channel general --id # Show message timestamps
nylas slack messages list --channel general --thread 1234567890.123456 # Show thread replies# Send a message
nylas slack send --channel general --text "Hello team!"
nylas slack send --channel general --text "Message" --yes # Skip confirmation
# Reply to a thread
nylas slack reply --channel general --thread 1234567890.123456 --text "Reply"nylas slack users list # List all users
nylas slack users list --limit 50 # Limit results
nylas slack users list --id # Show user IDsnylas slack search --query "project update" # Search messages
nylas slack search --query "from:@john" # Search with Slack modifiers
nylas slack search --query "in:#general" # Search in specific channel
nylas slack search --query "meeting" --limit 20Required OAuth Scopes:
channels:read,groups:read,im:read,mpim:read- List channelschannels:history,groups:history,im:history,mpim:history- Read messageschat:write- Send messagesusers:read- List userssearch:read- Search messages
Manage Nylas Notetaker bots that join video meetings to record and transcribe.
# List all notetakers
nylas notetaker list # List all notetakers
nylas notetaker list --state scheduled # Filter by state
nylas notetaker list --limit 10 # Limit results
# Create a notetaker to join a meeting
nylas notetaker create --meeting-link "https://zoom.us/j/123456789"
nylas notetaker create --meeting-link "https://meet.google.com/abc-defg" --join-time "tomorrow 2pm"
nylas notetaker create --meeting-link "https://zoom.us/j/123" --bot-name "Meeting Recorder"
# Show notetaker details
nylas notetaker show <notetaker-id>
# Get recording and transcript URLs
nylas notetaker media <notetaker-id>
# Delete/cancel a notetaker
nylas notetaker delete <notetaker-id> # With confirmation
nylas notetaker delete <notetaker-id> --yes # Skip confirmationAliases: nylas nt, nylas bot
Supported Providers: Zoom, Google Meet, Microsoft Teams
States: scheduled, connecting, waiting, attending, processing, complete, cancelled, failed
Join Time Formats:
- ISO:
2024-01-15 14:00 - Relative:
30m,2h,1d - Natural:
tomorrow 9am,tomorrow 2:30pm
Retrieve OTP/verification codes from email automatically.
# Get the latest OTP code (auto-copies to clipboard)
nylas otp get # From default account
nylas otp get user@example.com # From specific account
nylas otp get --no-copy # Don't copy to clipboard
nylas otp get --raw # Output only the code
# Watch for new OTP codes (continuous polling)
nylas otp watch # Poll every 10 seconds
nylas otp watch --interval 5 # Poll every 5 seconds
nylas otp watch user@example.com # Watch specific account
# List configured accounts
nylas otp list
# Debug: Show recent messages with OTP detection
nylas otp messages # Show last 10 messages
nylas otp messages --limit 20 # Show more messagesFeatures:
- Auto-copies OTP to clipboard
- Supports 4-8 digit codes
- Detects OTPs from common providers (Google, Microsoft, banks, etc.)
- Pretty-printed display with sender info
Manage scheduling pages for appointment booking.
# Booking pages
nylas scheduler pages list # List scheduling pages
nylas scheduler pages show <page-id> # Show page details
nylas scheduler pages create # Create booking page
nylas scheduler pages update <page-id> # Update page
nylas scheduler pages delete <page-id> # Delete page
# Bookings
nylas scheduler bookings list # List bookings
nylas scheduler bookings show <booking-id> # Show booking details
nylas scheduler bookings confirm <booking-id> # Confirm booking
nylas scheduler bookings reschedule <booking-id> # Reschedule booking
nylas scheduler bookings cancel <booking-id> # Cancel booking
# Configurations
nylas scheduler configurations list # List configurations
nylas scheduler configurations show <config-id> # Show configuration
nylas scheduler configurations create # Create configuration
nylas scheduler configurations update <config-id> # Update configuration
nylas scheduler configurations delete <config-id> # Delete configuration
# Sessions
nylas scheduler sessions create # Create booking session
nylas scheduler sessions show <session-id> # Show session detailsDetails: docs/commands/scheduler.md
Manage Nylas applications, connectors, credentials, and grants.
# Applications
nylas admin applications list # List applications
nylas admin applications show <app-id> # Show app details
nylas admin applications create # Create application
nylas admin applications update <app-id> # Update application
nylas admin applications delete <app-id> # Delete application
# Connectors (provider integrations)
nylas admin connectors list # List connectors
nylas admin connectors show <connector-id> # Show connector
nylas admin connectors create # Create connector
nylas admin connectors update <connector-id> # Update connector
nylas admin connectors delete <connector-id> # Delete connector
# Credentials
nylas admin credentials list <connector-id> # List credentials
nylas admin credentials show <credential-id> # Show credential
nylas admin credentials create # Create credential
nylas admin credentials update <credential-id> # Update credential
nylas admin credentials delete <credential-id> # Delete credential
# Grants
nylas admin grants list # List all grants
nylas admin grants stats # Grant statisticsDetails: docs/commands/admin.md
Track CLI command execution for compliance, debugging, and AI agent monitoring.
# Setup
nylas audit init # Interactive setup
nylas audit init --enable # Quick setup with defaults
nylas audit logs enable # Enable logging
nylas audit logs disable # Disable logging
nylas audit logs status # Check status
# View logs
nylas audit logs show # Show last 20 entries
nylas audit logs show --limit 50 # More entries
nylas audit logs show --command email # Filter by command
nylas audit logs show --invoker alice # Filter by username
nylas audit logs show --source claude-code # Filter by source (AI agents, etc.)
nylas audit logs show --status error # Filter by status
nylas audit logs show --request-id req_abc123 # Find by Nylas request ID
# Statistics and export
nylas audit logs summary # Summary for last 7 days
nylas audit logs summary --days 30 # Summary for 30 days
nylas audit export --output audit.json # Export to JSON
nylas audit export --output audit.csv # Export to CSV
# Configuration
nylas audit config show # Show configuration
nylas audit config set retention_days 30 # Set retention
nylas audit logs clear # Clear all logsInvoker detection: Automatically tracks who ran commands:
terminal- Interactive terminal sessionclaude-code- Anthropic's Claude Codegithub-copilot- GitHub Copilot CLIssh- Remote SSH sessionscript- Non-interactive automation- Custom via
NYLAS_INVOKER_SOURCEenv var
Details: docs/commands/audit.md
nylas version # Show version
nylas doctor # System diagnostics
nylas update # Update CLI to latest version
nylas update --check # Check for updates without installing
nylas update --force # Force update even if on latest
nylas update --yes # Skip confirmation promptUpdate command features:
- Downloads from GitHub releases
- SHA256 checksum verification
- Automatic backup and restore on failure
- Detects Homebrew installs (redirects to
brew upgrade)
All commands follow consistent pattern:
nylas <resource> list- List resourcesnylas <resource> show <id>- Show detailsnylas <resource> create- Create resourcenylas <resource> update <id>- Update resourcenylas <resource> delete <id>- Delete resource
For detailed documentation on any feature, see:
- Email:
docs/commands/email.md - Email Signing:
docs/commands/email-signing.md - Email Encryption:
docs/commands/encryption.md - Calendar:
docs/commands/calendar.md - Contacts:
docs/commands/contacts.md - Webhooks:
docs/commands/webhooks.md - Inbound:
docs/commands/inbound.md - Scheduler:
docs/commands/scheduler.md - Admin:
docs/commands/admin.md - Workflows:
docs/commands/workflows.md(OTP, automation) - Timezone:
docs/commands/timezone.md - Audit:
docs/commands/audit.md - AI:
docs/commands/ai.md - MCP:
docs/commands/mcp.md - TUI:
docs/commands/tui.md