Getting Started
Installation
bash
# Install Bun if you haven't
curl -fsSL https://bun.sh/install | bash
# Clone and install
git clone https://github.com/code-with-auto/loq.git
cd loq
bun install
bun linkQuick Start
bash
# View logs with colorized output
loq app.log
# Filter by level
loq app.log where level=error
# Filter HTTP logs by status
loq access.log where "status >= 400"
# Search in messages
loq app.log where message contains "timeout"
# Count by level
loq app.log count by level
# Tail mode
loq -f app.log where level=error
# Pipe support
cat *.log | loq where level=errorCLI Options
| Option | Description |
|---|---|
-f, --follow | Tail mode (like tail -f) |
-o, --output | Output format: color, table, json, csv |
--format | Force log format: json, apache, syslog, clf |
-n, --limit | Limit number of results |
-h, --help | Show help |
-v, --version | Show version |