Skip to main content

Command Options Reference

Complete reference for all logget command-line options.

Data Collection Options

--logs, -L

Capture browser console logs.

Usage:

logget --logs https://example.com

Captures:

  • console.log() messages → LOG level
  • console.info() messages → INFO level
  • console.warn() messages → WARN level
  • console.error() messages → ERROR level
  • console.debug() messages → DEBUG level

--network, -N

Capture network HTTP requests and responses.

Usage:

logget --network https://example.com

Captures:

  • Request method with URL
  • Response status code, headers, MIME type
  • Resource type (Document, XHR, Image, Script, Stylesheet, Font, Media, Manifest, WebSocket, Other)
  • Response size
  • Detailed timing metrics

Output Format Options

warning

Only one output format can be specified at a time. You cannot combine multiple format options (e.g., --json --csv or --yaml --har).

--json, -J

Output data in JSON format.

Usage:

logget --json --logs --network https://example.com

--csv

Output data in CSV (Comma-Separated Values) format.

Usage:

logget --csv --logs --network https://example.com

--har

Output network data in HAR (HTTP Archive) format.

Usage:

logget --har --network https://example.com
info

HAR format only includes network data. Use --network with --har.

--yaml

Output data in YAML (YAML Ain't Markup Language) format.

Usage:

logget --yaml --logs --network https://example.com

Output Destination Options

--output <file>, -o <file>

Write output to a file instead of stdout.

Usage:

logget --logs --output results.txt https://example.com

Examples:

# JSON file
logget --logs --json --output logs.json https://example.com

# CSV file
logget --logs --csv --output logs.csv https://example.com

# HAR file
logget --network --har --output network.har https://example.com

# YAML file
logget --logs --yaml --output logs.yaml https://example.com

--append, -a

Append output to an existing file instead of overwriting it.

Usage:

logget --logs --append --output results.txt https://example.com

--follow, -f

Follow mode - stream output in real-time as logs and requests occur.

Usage:

logget -f --logs https://example.com
info

In follow mode, output is streamed line by line. For CSV format, headers are written once at the start.

--quiet, -q

Suppress progress messages, only show data (errors and warnings still displayed).

Usage:

logget -q --logs --network https://example.com

HTTP Options

--header <header>, -H <header>

Add a custom HTTP header. Can be used multiple times to add multiple headers. Also supports reading from files.

Usage:

logget --logs --header "Authorization: Bearer token123" https://api.example.com

Examples:

# Single header
logget --header "User-Agent: MyBot/1.0" https://example.com

# Multiple headers
logget \
--header "Authorization: Bearer token123" \
--header "X-Custom-Header: value" \
https://api.example.com

# From file
logget --header headers.txt https://api.example.com

Format: "Name: Value" (quotes recommended for values with spaces)

Header File Format:

Authorization: Bearer token123
X-Custom-Header: value
Content-Type: application/json
# Comments (lines starting with # are ignored)

Set a cookie. Can be used multiple times to set multiple cookies. Also supports reading from files.

Usage:

logget --logs --cookie "sessionid=abc123" https://example.com

Examples:

# Single cookie
logget --cookie "sessionid=abc123" https://example.com

# Multiple cookies
logget \
--cookie "sessionid=abc123" \
--cookie "csrf=xyz789" \
https://example.com

# With additional attributes
logget --cookie "session_id=abc123; domain=.example.com; secure" https://example.com

# From file
logget --cookie cookies.txt https://example.com

Format: "name=value" or "name=value; domain=example.com; secure"

Cookie File Format:

session_id=abc123
user_token=xyz789
pref=dark_mode; domain=example.com
# Comments (lines starting with # are ignored)

--user-agent <name>, -A <name>

Set User-Agent header (default: "logget/1.0").

Usage:

logget --user-agent "MyBot/1.0" https://example.com

--insecure, -k

Skip SSL certificate verification (useful for self-signed certificates).

Usage:

logget -k --logs https://localhost:8080

Timing Options

--timeout <milliseconds>, -T <milliseconds>

Set timeout for page load in milliseconds. Default is 60 seconds.

Usage:

logget --timeout 30000 https://example.com
info

The timeout applies to the initial page load. In follow mode, monitoring continues indefinitely.

--wait <milliseconds>, -W <milliseconds>

Wait time in milliseconds after page load. Default is 3000ms.

Usage:

logget --wait 5000 https://example.com

Filtering Options

--filter <regex>

Show only logs/requests matching this regex pattern.

Usage:

logget -f --logs --filter "ERROR" https://example.com

Examples:

# Filter for WARN messages only
logget -f --logs --filter "WARN" https://example.com

# Filter for multiple patterns
logget -f --logs --filter "ERROR|WARN" https://example.com

--exclude <regex>

Exclude logs/requests matching this regex pattern.

Usage:

logget -f --logs --exclude "DEBUG" https://example.com

--status <regex>

Only include requests whose HTTP status code matches this regex.

Usage:

logget --network --status "^2..$" https://example.com

Examples:

# Only 4xx responses
logget --network --status "^4..$" https://example.com

# Only 200 or 204
logget --network --status "^(200|204)$" https://example.com

--domain <regex>

Only include requests whose domain matches this regex.

Usage:

logget --network --domain "^api\\.example\\.com$" https://example.com

--mime <regex>

Only include requests whose MIME type matches this regex.

Usage:

logget --network --mime "^application/(javascript|json)$" https://example.com

--min-size <bytes>

Only include requests whose size is at least this many bytes.

Usage:

logget --network --min-size 1024 https://example.com

--max-size <bytes>

Only include requests whose size is at most this many bytes.

Usage:

logget --network --max-size 10240 https://example.com

Example:

# Requests between 1KB and 100KB
logget --network --min-size 1024 --max-size 102400 https://example.com

Request Type Filtering

--xhr

Only include fetch/XHR requests.

Usage:

logget --network --xhr https://example.com

--document

Only include Document requests.

Usage:

logget --network --document https://example.com

--css

Only include CSS requests.

Usage:

logget --network --css https://example.com

--script

Only include Script requests.

Usage:

logget --network --script https://example.com

--font

Only include Font requests.

Usage:

logget --network --font https://example.com

--img

Only include Image requests.

Usage:

logget --network --img https://example.com

--media

Only include Media requests.

Usage:

logget --network --media https://example.com

--manifest

Only include Manifest requests.

Usage:

logget --network --manifest https://example.com

--socket

Only include WebSocket requests.

Usage:

logget --network --socket https://example.com

Advanced Options

--refresh

Refresh interval in milliseconds for real-time streaming (default: 100).

Usage:

logget -f --logs --refresh 500 https://example.com

--no-rotate-fingerprints

Disable fingerprint rotation (default: enabled).

Usage:

logget --no-rotate-fingerprints --network https://example.com

--fingerprint-interval

Interval in milliseconds for fingerprint rotation (default: 5000).

Usage:

logget --fingerprint-interval 2000 --network https://example.com

--execute, -e

Execute JavaScript code in the page context. Can be used for debugging, testing, or interacting with the page. Accepts either inline JavaScript code or a file path containing JavaScript code.

Usage:

logget --execute "document.title" https://example.com

Examples:

# Execute inline JavaScript code
logget -e "console.log('Hello from logget')" --logs https://example.com

# Execute multiple statements
logget -e "const title = document.title; console.log(title); title" --logs https://example.com

# Execute from file
logget -e script.js https://example.com

info
  • The JavaScript code is executed after the page loads
  • Single expressions are automatically wrapped to return their value
  • Multiple statements (containing ; or newlines) are executed as a block
  • Results are displayed in the output (or logged if using --logs)
  • If the code is a file path, the file content is read and executed
  • Errors in JavaScript execution are reported in the output

--no-color

Disable colored output.

Usage:

logget --no-color --logs https://example.com

--verbose, -V

Show detailed HTTP protocol information.

Usage:

logget -V --network https://example.com

--version, -v

Show version information and exit.

Usage:

logget --version

--help, -h

Show help message with all available options and exit.

Usage:

logget --help

Next Steps