npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loglens/cli

v1.1.0

Published

Command-line interface for LogLens log analytics

Readme

LogLens CLI

LogLens log analytics from your terminal.

Install

npm install -g @loglens/cli
# or
pnpm add -g @loglens/cli

Requires Node.js 18+.

Authenticate

loglens config set-key llapi_xxxxxxxxxxxxxxxx
loglens config set-website 23955f93-02cf-4728-b4d2-8022c4a2cc82

API keys are managed at app.loglens.ai/settings. Once a default website is set you can omit -w on every subsequent command. Config is stored at ~/.loglens/config.json.

loglens config show         # print current config (key redacted)
loglens config set-url <u>  # override API URL (default: https://api.loglens.ai)

Commands

All analytics commands accept -w <id> (website), -h <hours> (default 24), --start/--end (ISO 8601), --json, --csv.

Account

| Command | Description | |---|---| | loglens websites | List every website on your account |

$ loglens websites
ID                                    Domain                      Name
────────────────────────────────────  ──────────────────────────  ─────────────
23955f93-02cf-4728-b4d2-8022c4a2cc82  keywordspeopleuse.com       KPU
8c1e09a3-7720-4f01-9921-bb35a0a17f24  example.com                 Example

Traffic analytics

| Command | Description | |---|---| | loglens summary | Headline metrics (requests, unique IPs, bot share, error rate) | | loglens traffic [--interval 1h\|1d] | Time-series traffic buckets | | loglens bots [--split-variants] | Bot/crawler breakdown with verification status | | loglens paths | Top URL paths | | loglens geography | Requests by country | | loglens status-codes | HTTP status code distribution | | loglens ips | Top client IPs | | loglens ip-requests --ip <addr> | Per-IP request log (paginated) | | loglens referrers | Top referrers | | loglens devices | Device type breakdown |

$ loglens bots -h 168
Bot                Requests   Category    Verified
─────────────────  ─────────  ──────────  ──────────
Googlebot            142,318  search      verified
GPTBot                38,221  ai          verified
ClaudeBot             12,907  ai          verified
bingbot                9,144  search      verified
PerplexityBot          4,012  ai          unverified

SEO and crawl

All seo subcommands accept -h <hours> and --bot <name> (e.g. googlebot).

| Command | Description | |---|---| | loglens seo overview | Crawler analytics summary | | loglens seo sitemap [--status never_crawled\|stale\|...] | Sitemap coverage by URL | | loglens seo budget-urls [--dir /blog] | Crawl budget per URL within a directory | | loglens seo url-patterns [--min-urls 3] | Auto-detected URL patterns and crawl frequency | | loglens seo path-explorer | Hierarchical directory tree of crawled paths | | loglens seo status-consistency [--min-requests 3] | URLs returning inconsistent status codes | | loglens seo requests [--filter errors\|redirects\|slow] | Raw crawler request log | | loglens seo robots | Robots.txt fetch and disallow analysis | | loglens seo url-history --url /blog/post | Crawl history for one URL | | loglens seo index-coverage | Google index coverage summary | | loglens seo index-urls --bucket indexed\|crawled_not_indexed\|... | URLs in a specific coverage bucket | | loglens seo events | Site events / annotations |

$ loglens seo url-patterns --bot googlebot -h 168
Pattern                       URLs   Requests  % Crawl  Type      Flags
────────────────────────────  ─────  ────────  ───────  ────────  ─────
/blog/{slug}                    412     8,221    34.20  template  -
/keyword/{slug}               1,983     5,107    21.25  template  -
/api/v1/{*}                      14       802     3.34  api       noindex

Operations

| Command | Description | |---|---| | loglens exports | List background export jobs (status, row count, download URL) | | loglens alerts [--severity critical\|warning\|info] [--alert-type ...] | Fired alert history | | loglens alerts-config | Current alert configuration (enabled types, thresholds, recipients) | | loglens llms [--countries US,GB] | LLM/AI-crawler analytics (GPTBot, ClaudeBot, PerplexityBot, etc.) |

$ loglens alerts -h 168 --severity critical
Alert ID                              Type             Severity  Name                       Fired
────────────────────────────────────  ───────────────  ────────  ─────────────────────────  ────────────────────
3f8a-...                              error_spike_5xx  critical  5xx spike on /api          2026-05-09T14:02:11Z
b21c-...                              bot_surge        critical  GPTBot 12x baseline        2026-05-08T03:44:00Z
$ loglens llms -h 168
  Total Requests        184,221
  Unique Bots           7
  Top Bot               GPTBot
  Top Bot Share         42.10%
  Verified Share        91.30%

Output formats

  • default — colourised table, headers bolded, numbers right-aligned. Where it adds signal (traffic time-series, bot trends), a small inline sparkline is rendered. Long string columns are truncated to 50 chars.
  • --json — pretty-printed JSON. The full upstream API response, untouched. Pipe to jq.
  • --csv — RFC-4180 CSV with quoted headers. Suitable for spreadsheets.

Examples

Top crawlers for the last 7 days as JSON, piped into jq:

loglens bots -h 168 --json | jq '.bots[] | select(.category == "ai") | {name, requests}'

Export every 404 from the last 24h as CSV for the SEO team:

loglens seo requests --filter errors --page-size 500 --csv > 404s.csv

Watch the live alert feed (re-run every minute):

watch -n 60 'loglens alerts -h 1 --severity critical'

Crawl-budget audit for /blog, sorted/filtered downstream:

loglens seo budget-urls --dir /blog --bot googlebot -h 168 --json \
  | jq '.urls | sort_by(-.requests) | .[0:20]'

Daily LLM-traffic snapshot mailed to the team:

loglens llms -h 24 --csv | mail -s "Daily AI crawler report" [email protected]