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

agent-log-digest

v0.1.2

Published

Turn noisy test, lint, typecheck, and build logs into clean JSON for AI coding agents.

Readme

agent-log-digest

npm version npm downloads CI GitHub stars License: MIT

한국어 README

Turn noisy test, lint, typecheck, and build logs into compact JSON that AI coding agents can route, summarize, and store.

agent-log-digest is a local-only Node CLI. It runs a command or parses an existing log file, redacts common secrets by default, detects known tool output, and writes deterministic digests without telemetry, hosted services, or LLM calls.

If this CLI saves you time, please star the GitHub repo. It helps other developers discover local-only tooling for AI coding agents.

Install

npm install -D agent-log-digest

Use directly with npx during early testing:

npx agent-log-digest --json -- npm test

Usage

Wrap a command and preserve its exit code:

agent-log-digest --json -- npm run typecheck

Parse a saved log:

agent-log-digest parse ./logs/eslint.log --tool eslint --json --output ./digest.json

Keep CI green while still recording the failing command in the digest:

agent-log-digest --json --always-zero -- npm test

Write a redacted raw log next to the digest:

agent-log-digest --json --raw-log ./raw.log --output ./digest.json -- npm test

Check local runtime assumptions:

agent-log-digest doctor --json

Print the project URL:

agent-log-digest repo

Write local example files explicitly:

agent-log-digest init

CI Recipe

Keep a CI step green while saving a structured digest for agents:

- name: Test with digest
  run: npx agent-log-digest --json --always-zero --output ./agent-log-digest.json -- npm test

Before and After

TypeScript log:

src/user.ts(3,7): error TS2322: Type string is not assignable to number.

Digest summary:

{"status":"failed","detectedTools":["typescript"],"summary":{"headline":"TypeScript failed with 1 error in 1 file."}}

Vite build log:

[vite]: Rollup failed to resolve import "./missing" from "src/main.ts".
file: /repo/src/main.ts:3:18

Digest summary:

{"status":"failed","detectedTools":["vite"],"nextCommands":["vite build"]}

Output

The JSON output uses schema version 0.1.

{
  "schemaVersion": "0.1",
  "status": "failed",
  "exitCode": 2,
  "command": "npm run typecheck",
  "detectedTools": ["typescript"],
  "summary": {
    "headline": "TypeScript failed with 1 error in 1 file.",
    "errors": 1,
    "warnings": 0,
    "failedTests": 0,
    "filesWithProblems": 1
  },
  "problems": []
}

Public TypeScript types and helpers are exported from the package root:

import { SCHEMA_VERSION, createDigest, redactSecrets } from "agent-log-digest"
import type { AgentLogDigest, Problem } from "agent-log-digest"

Supported Parsers

  • TypeScript tsc diagnostics
  • ESLint JSON formatter and minimal stylish output
  • Vitest JSON-style failed test results
  • Jest JSON-style failed test results
  • Next.js text build failures
  • Vite/Rollup text build failures
  • Playwright text/list reporter failures
  • Generic Node-style stack traces and file:line:column references

CLI Options

  • --json, --markdown, --pretty: choose formatter.
  • --output <file>: write formatted digest to disk.
  • --raw-log <file>: write the captured raw log after redaction.
  • --no-raw-log: disable raw-log output even if configured.
  • --max-errors <n>: cap reported problems.
  • --max-log-bytes <n>: cap captured command output.
  • --cwd <dir>: run or parse from another working directory.
  • --timeout <ms>: terminate wrapped commands after a timeout.
  • --always-zero: return exit code 0 while preserving the command exit code in JSON.
  • --no-stream: capture command output without live passthrough.
  • --notify: call code-notify or cn if available.
  • --redact, --no-redact: enable or disable secret redaction.
  • --tool <name>: force parser preference for typescript, eslint, vitest, jest, next, vite, playwright, or generic.

Usage errors exit 2. Internal CLI errors exit 1. Wrapped command exit codes are preserved unless --always-zero is set.

Trust Model

Runtime behavior is local-only:

  • no telemetry
  • no runtime network calls
  • no install hooks
  • no automatic fixing
  • no AI API calls

The package uses child_process.spawn with shell: false for wrapped commands.