Command

nylas audit init

Initialize audit logging for the Nylas CLI. Creates the log directory, default configuration, and optionally enables logging immediately.

Usage

nylas audit init [--path DIR] [--retention DAYS] [--enable]

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
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--pathCustom directory for audit log storage
--retentionLog retention period in days (default: 90)
--max-sizeMaximum log file size in MB (default: 50)
--formatLog format: json or text (default: json)
--enableEnable logging immediately after initialization
--no-promptSkip interactive prompts (use defaults)

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

Troubleshooting

Permission denied when creating log directory

Ensure you have write permissions to the target path, or use --path to specify an accessible directory.

Audit already initialized

Run `nylas audit config show` to see current settings. Use `nylas audit config set` to modify individual values.

Recommended guides

Run nylas audit init --help for full help output.