Compliance and debugging both need logs. nylas audit logs clear handles the clear all audit log entries. this is a destructive action â consider exporting logs first with nylas audit export.
The nylas audit logs clear command permanently deletes all stored audit log entries. This is destructive and cannot be undone.
Syntax
nylas audit logs clear [--force]
Examples
Interactive clear (with confirmation):
nylas audit logs clear
Export before clearing:
nylas audit export -o audit-backup.json
nylas audit logs clear --force
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.
Key Flags
Run nylas audit logs clear --help to see all available flags. Add --json for machine-readable output â useful when piping into jq or feeding data to scripts.
nylas audit logs clear --help
Common Issues
Logs not clearing
Check file permissions on the audit log directory. Use nylas audit config show to find the log path.
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 summaryâ View summary statistics of audit log entries including command counts, error rat -
nylas audit exportâ Export audit logs to JSON or CSV for compliance, analysis, or backup
Full docs: nylas audit logs clear 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)