Every email, calendar, and contact operation requires auth. nylas auth login manages that layer.
The nylas auth login command connects your email account to the CLI via OAuth. It opens a browser window, walks you through the provider's consent flow, and stores the grant locally.
Syntax
nylas auth login
When to use this command
Authentication commands manage API credentials and provider connections. Use auth config for initial setup, auth login to connect a mailbox, auth status to verify.
Examples
Connect Gmail or Outlook:
nylas auth login
# Opens browser for OAuth; follow prompts to connect
How It Works
The CLI stores credentials securely in your system keychain (macOS Keychain, Linux Secret Service, or Windows Credential Manager). Tokens are refreshed automatically — you authenticate once and commands just work.
When to Use This
Reach for nylas auth login during initial setup, in CI/CD pipelines, or when managing multiple connected accounts. Combine with --json to pipe output into other tools.
Tips
Pipe to jq: nylas auth login --json | jq '.' gives you structured data you can filter and transform.
Combine with other commands: Chain nylas auth login with other Nylas CLI commands using shell pipes and variables for complex workflows.
Related posts
Full docs: nylas auth login reference — all flags, advanced examples, and troubleshooting.
All commands: Nylas CLI Command Reference
Get started: brew install nylas/nylas-cli/nylas — other install methods
Top comments (0)