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

@builtbyecho/git-digest

v1.0.0

Published

Concise, structured git repository summaries for AI agents and developers. Branch status, recent commits, change hotspots, and open PRs in one command.

Readme

@builtbyecho/git-digest

Concise, structured git repository summaries for AI agents and developers.

Get branch status, recent commits, change hotspots, and open PRs in a single command — formatted for humans, agents, or pipelines.

Why?

Every time an AI agent starts working on a repository, it needs context: what branch am I on? Is the tree clean? What changed recently? Which files are hotspots? Are there open PRs? Parsing raw git log and git status output wastes tokens and is error-prone. git-digest gives you all of that in one structured, agent-friendly output.

Install

npm install -g @builtbyecho/git-digest

Or use directly:

npx @builtbyecho/git-digest

Usage

CLI

# Markdown summary (default)
git-digest

# JSON for programmatic use
git-digest --format json

# Compact single-line summary
git-digest --format compact

# Digest a different repo
git-digest /path/to/repo

# Customize output
git-digest --commits 5 --hotspot-days 30 --base develop --format json

Options

| Option | Default | Description | |---|---|---| | --format | markdown | Output format: json, markdown, or compact | | --commits | 10 | Number of recent commits to include | | --hotspot-days | 14 | Days to analyze for change hotspots | | --hotspot-limit | 10 | Max hotspot files to show | | --base | main | Base branch for ahead/behind comparison | | --no-prs | — | Skip GitHub PR lookup (via gh CLI) |

Programmatic API

import { digest, toMarkdown, toCompact } from "@builtbyecho/git-digest";

// Get structured digest
const d = digest("/path/to/repo", {
  commits: 10,
  hotspotDays: 14,
  hotspotLimit: 10,
  baseBranch: "main",
  includePRs: true,
});

// Format output
console.log(toMarkdown(d));  // Human/agent-readable markdown
console.log(toCompact(d));   // Single-line compact summary
console.log(JSON.stringify(d, null, 2)); // Raw JSON

Digest Object

{
  "branch": "main",
  "headHash": "a1b2c3d",
  "status": { "state": "clean" },
  "aheadBehind": { "base": "main", "ahead": 0, "behind": 0 },
  "recentCommits": [
    { "hash": "a1b2c3d", "subject": "Add feature X", "author": "dev", "relativeDate": "2 hours ago", "files": ["src/x.js"] }
  ],
  "hotspots": [
    { "file": "src/index.js", "changes": 12 }
  ],
  "stashCount": 0,
  "remote": { "name": "origin", "url": "https://github.com/org/repo.git" },
  "lastTag": { "tag": "v1.0.0", "commitsAhead": 5 },
  "contributors": { "count": 3, "top": [{ "name": "dev", "commits": 42 }] },
  "openPRs": [],
  "generatedAt": "2026-05-11T05:00:00.000Z"
}

Output Examples

Markdown:

# Git Digest: main

**Head:** `a1b2c3d` · **Status:** ✅ clean · **Stashes:** 0
**vs main:** ahead 0 · behind 0
**Last tag:** v1.0.0 (5 commits behind HEAD)
**Remote:** origin → https://github.com/org/repo.git

## Recent Commits

- `a1b2c3d` Add feature X — _dev_ 2 hours ago (3 files)
- `e4f5g6h` Fix bug Y — _dev_ 1 day ago (1 file)

## Change Hotspots (last 14 days)

- `src/index.js` — 12 changes
- `src/api.js` — 8 changes

Compact:

branch=main head=a1b2c3d status=clean | vs-main=ahead0/behind0 | tag=v1.0.0+5 | stashes=0 | commits=10 | hotspots=src/index.js,src/api.js

Agent Integration Tips

  • Use --format json for reliable programmatic parsing
  • Use --format compact for context-constrained agents (single line, ~200 chars)
  • Use --no-prs when gh CLI is unavailable or to avoid API rate limits
  • Pipe output directly into agent context windows for instant repo awareness
  • Run as a pre-task hook: agents can check if the tree is dirty before starting work

Requirements

  • Node.js 18+
  • Git (in PATH)
  • GitHub CLI (gh) — optional, for open PR data

License

MIT © BuiltByEcho