Skip to content

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 link

Quick 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=error

CLI Options

OptionDescription
-f, --followTail mode (like tail -f)
-o, --outputOutput format: color, table, json, csv
--formatForce log format: json, apache, syslog, clf
-n, --limitLimit number of results
-h, --helpShow help
-v, --versionShow version

Released under the MIT License.