DEV Community

Qasim Muhammad
Qasim Muhammad

Posted on

Working with nylas contacts list: List all contacts from your address book

Your address book shouldn't require a web browser to access. nylas contacts list brings it to the terminal.

The nylas contacts list command displays contacts from your connected address book. Use --limit to control how many contacts are returned.

Syntax

nylas contacts list [--limit N] [--json]
Enter fullscreen mode Exit fullscreen mode

Examples

List first 20 contacts:

nylas contacts list --limit 20
Enter fullscreen mode Exit fullscreen mode

Export all contacts as JSON:

nylas contacts list --json > contacts-backup.json
Enter fullscreen mode Exit fullscreen mode

Count total contacts:

nylas contacts list --json | jq length
Enter fullscreen mode Exit fullscreen mode

Tips

CI/CD ready: This command works in non-interactive mode. Set NYLAS_API_KEY as an environment variable and it picks up credentials automatically.

Pipe to jq: nylas contacts list --json | jq '.' gives you structured data you can filter and transform.

How It Works

Contact data spans multiple providers and formats. Google Contacts uses its own People API, Outlook uses Microsoft Graph, and Exchange uses EWS. The CLI gives you a single interface across all of them.

Related Commands


Full docs: nylas contacts list reference — all flags, advanced examples, and troubleshooting.

All commands: Nylas CLI Command Reference

Get started: brew install nylas/nylas-cli/nylasother install methods

Top comments (0)