DEV Community

Cover image for Working with nylas audit logs summary: View summary statistics of audit log entries including command counts, error rates, an...
Qasim Muhammad
Qasim Muhammad

Posted on Edited on Originally published at cli.nylas.com

Working with nylas audit logs summary: View summary statistics of audit log entries including command counts, error rates, an...

When AI agents send emails on your behalf, you need a record of what happened. nylas audit logs summary is part of that audit trail.

The nylas audit logs summary command aggregates CLI usage over a configurable time window — total commands run, error rates, most-used commands, top invokers (AI agents vs humans), and busiest hours. Use --days to set the window and --json for dashboard-ready output.

Syntax

nylas audit logs summary [--days N]
Enter fullscreen mode Exit fullscreen mode

Examples

7-day summary (default):

nylas audit logs summary
Enter fullscreen mode Exit fullscreen mode

30-day summary:

nylas audit logs summary --days 30
Enter fullscreen mode Exit fullscreen mode

JSON output for dashboards:

nylas audit logs summary --days 7 --json
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 audit logs summary --json | jq '.' gives you structured data you can filter and transform.

How It Works

Every entry in the audit log captures: the exact command, all arguments (with secrets redacted), the invoker identity (human or AI agent name), the exit code, and a nanosecond timestamp. This level of detail is what compliance auditors expect.

Related Commands

  • nylas audit init — Initialize audit logging for the Nylas CLI. Creates the log directory, default c
  • nylas audit logs show — View and filter audit log entries. Supports filtering by date range, command, st
  • nylas audit logs clear — Clear all audit log entries. This is a destructive action — consider exporting l
  • nylas audit export — Export audit logs to JSON or CSV for compliance, analysis, or backup

Related posts

Full docs: nylas audit logs summary reference — all flags, advanced examples, and troubleshooting.

All commands: Nylas CLI Command Reference

Get started: brew install nylas/nylas-cli/nylas — other install methods

Top comments (0)