nylas init — Guided setup wizard for first-time Nylas CLI users
Source: Dev.to
Overview
First time with the Nylas CLI? nylas init is where everything starts.
The command walks you through setting up the Nylas CLI in four steps:
- Create or log into your Nylas account
- Select or create an application
- Generate an API key
- Sync your connected email accounts
If you already have an API key, pass --api-key to skip the interactive wizard.
nylas init [--api-key KEY] [--region us|eu] [--google|--microsoft|--github]
Interactive guided setup
nylas init
- Step 1: Create account or log in
- Step 2: Select or create application
- Step 3: Generate API key
- Step 4: Sync email accounts
Quick setup with an existing API key
nylas init --api-key nyl_abc123
Quick setup for the EU region
nylas init --api-key nyl_abc123 --region eu
Start with Google SSO
nylas init --google
Environment detection
The wizard detects your environment and chooses the fastest path to a working CLI installation:
- macOS: uses Keychain for credential storage
- Linux: uses Secret Service
- Docker/CI: falls back to encrypted file storage
Help and machine‑readable output
nylas init --help
Add --json for JSON output — useful when piping into jq or feeding data to scripts.
Common issues
- “non-interactive mode requires —api-key”
- SSO browser window doesn’t open
- API key verification fails
Further reading
- Full documentation: nylas init reference — all flags, advanced examples, and troubleshooting
- All commands: Nylas CLI Command Reference
- Get started:
brew install nylas/nylas-cli/nylas(other install methods)