Command
nylas audit logs show
View and filter audit log entries. Supports filtering by date range, command, status, grant, request ID, invoker, and source.
Written by Qasim Muhammad Staff SRE
What does nylas audit logs show do?
The nylas audit logs show command displays recorded CLI activity with filters for date range, command name, exit status, grant ID, request ID, invoker (claude-code, cursor, terminal), and source (cli, mcp, sdk). Use it to trace what an AI agent did, investigate errors, or generate compliance reports. Supports JSON output for piping into dashboards.
Usage
nylas audit logs show [--since DATE] [--until DATE] [--command CMD] [--invoker NAME]Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit(-n) | Number of entries to show (default: 50) |
| --yes(-y) | Skip confirmations |
| --since | Show entries after this date/time |
| --until | Show entries before this date/time |
| --command | Filter by command name |
| --status | Filter by exit status (success, error) |
| --grant | Filter by grant ID |
| --request-id | Look up a specific request ID |
| --invoker | Filter by invoker (e.g. claude-code, cursor, terminal) |
| --source | Filter by source (e.g. cli, mcp, sdk) |
Examples
The nylas audit logs show command displays recorded CLI activity with filters for date range, command name, exit status, grant ID, request ID, invoker (claude-code, cursor, terminal), and source (cli, mcp, sdk).
Show recent logs
nylas audit logs show -n 20Filter by AI invoker
nylas audit logs show --invoker claude-code --since 2024-01-01Filter by date range
nylas audit logs show --since "2024-01-01" --until "2024-01-31"Look up a specific request
nylas audit logs show --request-id req_abc123JSON output piped to jq
nylas audit logs show --json -n 100 | jq '.[] | select(.status == "error")'Example output
TIME COMMAND STATUS INVOKER SOURCE
2024-01-31 14:22 email send ok alice terminal
2024-01-31 14:20 calendar list ok alice terminal
2024-01-31 14:18 email list error alice github-actions
3 entries shownTroubleshooting
No logs found
Ensure audit logging is enabled with `nylas audit logs status`. If recently initialized, run a few commands first.
Date filter not working
Use ISO 8601 format (YYYY-MM-DD) or relative formats like '7d', '24h'.
Recommended guides
Thunderbird vs Nylas: GUI vs CLI email
Thunderbird is a desktop GUI email client with OAuth and calendar built in. Compare it to a scriptable, headless CLI for servers, cron jobs, and AI agents.
Pipedream vs Nylas for Email Automation
Pipedream wires 3,000+ apps with event workflows and code steps. Nylas is a native email API with a CLI for agents and cron. Compare as a Pipedream alternative.
Detect Calendar Conflicts from the CLI
Spot double-booked meetings and overlapping events from the terminal. AI conflict detection and jq scripts catch calendar conflicts before they derail your day.
Block Focus Time on Your Calendar (CLI)
Context-switching costs 23 minutes of focus per interruption. Block focus time on Google Calendar from your terminal so meetings can't eat your deep-work slots.
Build a Strands Email Agent
Give a Strands Agents SDK agent email access using the Nylas CLI as a @tool. One function reaches Gmail, Outlook, and 4 more providers — no OAuth code needed.
Cloudflare Agents Email Tools
Use the Cloudflare Agents SDK to build a stateful email agent on Workers — connect to the Nylas MCP server over HTTP and call email tools in TypeScript.
Run nylas audit logs show --help for full help output.