New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@struct-ai/logbox

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@struct-ai/logbox

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

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

logbox

A dev log black box. Captures dev server logs into SQLite so you can search, compare, and query them later.

Logs get lost in terminal scrollback, disappear on restart, and can't be searched across branches or sessions. logbox fixes that — pipe your dev server through it and every line is stored with timestamps, git branch, and repo info.

Install

cargo install logbox

Usage

Capture logs

Pipe your dev server output through logbox. It stores every line and passes it through to your terminal:

npm run dev 2>&1 | logbox collect

Use --quiet to store without terminal output:

npm run dev 2>&1 | logbox collect --quiet

Search logs

# Regex search across all logs
logbox search "error|panic"

# Filter by time
logbox search "connection refused" --last 1h

# Filter by branch or session
logbox search "error" --branch main
logbox search "error" --session abc12345

# JSON output
logbox search "error" --json

List sessions

Each time you run logbox collect, a new session is created.

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

Session stats

# Latest session
logbox stats

# Specific session
logbox stats <session-id>

Compare sessions

See what changed between two server runs:

logbox compare <session-a> <session-b>
logbox compare <session-a> <session-b> --pattern "error"

How it works

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

Use with Claude Code

Claude Code can query your logs directly via the CLI:

# Claude runs this via Bash tool
logbox search "ERROR" --last 1h --json

License

MIT

FAQs

Package last updated on 31 Mar 2026

Related posts