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

@struct-ai/logbox

v0.3.0

Published

Persist dev server logs to SQLite so AI coding agents can search and query them

Readme

logbox

Capture dev server logs so coding agents can search them directly.

When your agent asks "what's in the logs?", you end up scrolling through your terminal, copying log lines, and pasting them into the chat.

Use logbox to pipe your dev server logs through it and query them directly via MCP. No more copy-pasting.

Previous dev sessions can also be searched, tagged with commit sha and branch.

Quickstart

1. Pipe your dev server through logbox

npx @struct-ai/logbox collect

Add it to your dev scripts:

{
  "scripts": {
    "dev": "npm run dev 2>&1 | npx @struct-ai/logbox collect"
  }
}

Logs pass through to your terminal as normal, but are also saved to ~/.logbox/logs.db.

2. Connect your coding agent

Claude Code:

claude mcp add logbox -- npx @struct-ai/logbox serve

Cursor:

Add to your MCP config:

{
  "mcpServers": {
    "logbox": {
      "command": "npx",
      "args": ["@struct-ai/logbox", "serve"]
    }
  }
}

3. Ask your agent to check the logs

❯ The test request failed, check the logs.

Install

No install required — npx @struct-ai/logbox works out of the box.

Or, install globally:

npm install -g @struct-ai/logbox

Or with cargo:

cargo install logbox

And then invoke with logbox:

logbox collect

CLI reference

Capture logs

# Pipe dev server output (logs pass through to terminal)
npm run dev 2>&1 | logbox collect

# Silent mode (store only, no terminal output)
npm run dev 2>&1 | logbox collect --quiet

Browse logs

View recent log lines, newest first:

logbox logs
logbox logs --since 1h
logbox logs --since 2h --until 1h
logbox logs --session <session-id> --limit 100
logbox logs --offset 50          # paginate

Search logs

Find log lines matching a keyword (case-insensitive):

logbox search "error"
logbox search "connection refused" --last 1h
logbox search "404" --branch main

Tip: Use search to find a specific event, then logs --since/--until around that timestamp to see surrounding context.

Sessions

Each logbox collect invocation creates a session tagged with git repo, branch, and commit SHA:

logbox sessions
logbox sessions --branch feature/auth --since 2d
logbox sessions --commit e30d239

Session stats

logbox stats                     # latest session
logbox stats <session-id>

MCP server

logbox serve                     # start MCP server on stdio

Tools:

  • list_logs — browse consecutive log lines in a time range, or from the end
  • search_logs — find lines matching a keyword
  • list_sessions — list recorded dev server runs
  • session_stats — get summary stats for a session

How it works

  • Logs are stored in ~/.logbox/logs.db (SQLite with WAL mode)
  • Each logbox collect creates a session tagged with git repo, branch, and commit SHA
  • The collector batches writes (every 100 lines or 500ms) for efficiency
  • All query commands support --json for structured output

Contributing

See CONTRIBUTING.md for development setup, testing, and PR guidelines.

License

MIT