Command
nylas audit export
Export audit logs to JSON or CSV for compliance, analysis, or backup.
Usage
nylas audit export [-o FILE] [--format json|csv] [--since DATE]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 | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --output(-o) | Output file path (default: stdout) |
| --format | Export format: json or csv (default: json) |
| --since | Export entries after this date |
| --until | Export entries before this date |
| --limit(-n) | Maximum number of entries to export |
Examples
Export to JSON file
nylas audit export -o audit-logs.jsonExport as CSV
nylas audit export --format csv -o audit-logs.csvExport date range
nylas audit export --since "2024-01-01" --until "2024-02-01" -o january.jsonPipe to jq for analysis
nylas audit export | jq '[.[] | .command] | group_by(.) | map({command: .[0], count: length})'Backup before clearing
nylas audit export -o backup-$(date +%Y%m%d).json
nylas audit logs clear --forceTroubleshooting
Export file is empty
Check that audit logs exist with `nylas audit logs show`. Verify the date range if using --since/--until.
CSV formatting issues
Some fields contain commas. Use --format json for complex log data or a proper CSV parser.
Recommended guides
Create a Manus Skill for Email and Calendar
Build a Manus AI Skill that gives your agent email and calendar access using the Nylas CLI.
Nylas CLI with OpenClaw Personal Assistant
Give your OpenClaw assistant email, calendar, and contacts superpowers. Includes exec-approvals.json setup and a ready-made Nylas skill.
Manage Calendar from the Terminal
DST-aware event creation, timezone locking, AI scheduling, and break time protection.
GPG Encrypted Email from the CLI
Sign, encrypt, and verify email with GPG. Auto-fetches keys from public keyservers.
Give AI Agents Email Access via MCP
Connect Claude, Cursor, or VS Code to your inbox and calendar in one command.
Send Email from the Terminal
Send, read, search, and automate email from your terminal. Works with Gmail, Outlook, and IMAP.
Run nylas audit export --help for full help output.