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

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limit(-n)Number of entries to show (default: 50)
--yes(-y)Skip confirmations
--sinceShow entries after this date/time
--untilShow entries before this date/time
--commandFilter by command name
--statusFilter by exit status (success, error)
--grantFilter by grant ID
--request-idLook up a specific request ID
--invokerFilter by invoker (e.g. claude-code, cursor, terminal)
--sourceFilter 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 20

Filter by AI invoker

nylas audit logs show --invoker claude-code --since 2024-01-01

Filter 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_abc123

JSON 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 shown

Troubleshooting

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

Run nylas audit logs show --help for full help output.