Skip to content

Commands

Interactive REPL

Drop into an interactive SQL prompt (no arguments):

bash
vant

Inside the REPL, type SQL queries or shortcuts:

vant> SELECT * FROM vantmetry_logs LIMIT 10
vant> recent
vant> errors
vant> help
vant> exit

Available REPL shortcuts:

  • recent - Show the last 20 logs
  • errors - Show recent errors grouped by fingerprint
  • count - Show total log count
  • help - Show available commands
  • clear - Clear the screen
  • exit - Quit the REPL

Direct Query

Execute a query directly without entering the REPL:

bash
vant query "SELECT severity, count(*) as cnt FROM vantmetry_logs GROUP BY severity"

Output Formats

By default, results are displayed in a formatted table. For programmatic use:

  • --json: JSON array
  • --ndjson: Newline-delimited JSON (for piping to LLMs or large datasets)
  • --fields=col1,col2: Return only specific columns

Example:

bash
vant query "SELECT * FROM vantmetry_logs WHERE severity = 'ERROR'" --ndjson --fields=ts,message

Recent Logs

Show the last 20 logs with timestamps, severity, and message:

bash
vant recent

Equivalent to:

bash
vant query "SELECT ts, severity, message, trace_id FROM vantmetry_logs ORDER BY ts DESC LIMIT 20"

Errors Grouped

Show recent errors grouped by fingerprint with counts:

bash
vant errors

Groups errors by fingerprint (hash of error type, message, and stack), showing:

  • Fingerprint
  • Severity
  • First message
  • Count of occurrences
  • Last seen timestamp

Useful for finding your most frequent errors.

Stream (Tail)

Stream new logs in real-time as they arrive:

bash
vant tail

Polls every 2 seconds (default). Press Ctrl+C to stop.

Custom poll interval:

bash
vant tail --interval 5

Shows timestamp, severity, and message for each new log in real-time.

Schema

Print the database schema in machine-readable JSON:

bash
vant schema

Outputs:

  • CLI command reference
  • Available table names
  • Column names and types for vantmetry_logs

Useful for AI agents and introspection tools.

Help

Show the help message with all available commands and flags:

bash
vant help

Or use the --help / -h flag:

bash
vant --help
vant query --help