Compliance and debugging both need logs. nylas audit init handles the initialize audit logging for the nylas cli. creates the log directory, default configuration, and optionally enables logging immediately.
The nylas audit init command sets up audit logging to record every CLI command execution with timestamps, arguments, and outcomes. Logs are stored locally in JSON or text format with configurable retention (default 90 days) and max file size (default 50 MB).
Syntax
nylas audit init [--path DIR] [--retention DAYS] [--enable]
Examples
Interactive setup:
nylas audit init
# Follow prompts to configure retention, format, and storage
Non-interactive (CI/automation):
nylas audit init --retention 30 --format json --enable --no-prompt
Custom storage path:
nylas audit init --path /var/log/nylas-audit --max-size 100 --enable
When to Use This
Reach for nylas audit init for compliance reporting, AI agent oversight, or debugging automation failures. Combine with --json to pipe output into other tools.
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 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 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
Full docs: nylas audit init 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)