lnav-unattendedlisted
Install: claude install-skill Voronenko/ai-files
## Key CLI Flags
| Flag | Purpose |
|------|---------|
| `-n` | Headless mode — no curses UI |
| `-c CMD` | Execute a single command after files load (repeatable) |
| `-f FILE` | Execute commands from a `.lnav` script file |
| `-e CMD` | Execute a shell command and capture output |
| `-q` | Quiet — suppress default log output after commands finish |
| `-t` | Prepend timestamps to stdin lines |
| `-d FILE` | Write debug log to file |
| `-r` | Recursively load files from directories |
| `-R` | Load rotated log files |
| `-N` | Do not open default syslog |
---
## Core Pattern
```
lnav -n [-q] -c "CMD1" -c "CMD2" ... -c "OUTPUT_CMD" LOGFILE [LOGFILE ...]
```
- `-n` disables the TUI
- Each `-c` is executed in order after file loading
- Commands starting with `:` are lnav commands
- Commands starting with `;` are SQL statements
- Pass `-` as the output path to write to **stdout**
---
## Output Targets (the `-` means stdout)
| Command | Format | Writes |
|---------|--------|--------|
| `:write-csv-to -` | CSV | Last SQL result as comma-separated |
| `:write-table-to -` | Aligned text | Last SQL result as text table |
| `:write-json-to -` | JSON array | Last SQL result as JSON |
| `:write-jsonlines-to -` | JSON Lines | One JSON object per row |
| `:write-json-cols-to -` | Columnar JSON | Flattened JSON columns |
| `:write-raw-to -` | Raw text | Original log file content of marked lines |
| `:write-view-to -` | Plain text | Top view content (formatted) |
| `:write-screen-to -