DEV Community

Qasim Muhammad
Qasim Muhammad

Posted on

nylas auth logout: Developer Reference with Examples

Every email, calendar, and contact operation requires auth. nylas auth logout manages that layer.

The nylas auth logout command disconnects an email account from the CLI by revoking its local session. Pass --grant to target a specific account; otherwise, it logs out the currently active grant.

Quick Start

brew install nylas/nylas-cli/nylas
nylas init
nylas auth logout
Enter fullscreen mode Exit fullscreen mode

Syntax

nylas auth logout [--grant GRANT_ID]
Enter fullscreen mode Exit fullscreen mode

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.

Key Flags

Run nylas auth logout --help to see all available flags. Add --json for machine-readable output — useful when piping into jq or feeding data to scripts.

nylas auth logout --help
Enter fullscreen mode Exit fullscreen mode

Examples

Log out of the active account:

nylas auth logout
Enter fullscreen mode Exit fullscreen mode

Log out a specific grant:

nylas auth logout --grant abc-123-def-456
Enter fullscreen mode Exit fullscreen mode

Related Commands


Full docs: nylas auth logout 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)