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

gitoutput

v0.4.14

Published

CLI tool to turn a Git repository or local directory into a single text digest for LLMs

Readme

Gitoutput

Turn any Git repository or local directory into a prompt-friendly text digest for LLMs — no install required, straight from npx.

Quick start

npx gitoutput /path/to/directory
npx gitoutput https://github.com/AnEntrypoint/gitoutput

That's it — gitoutput writes a chunked digest (summary + mcp-thorns report in chunk 1, directory tree and file contents split across the rest) to <gitprojectname>-1.txt, -2.txt, etc. in the current directory. npx fetches the latest published version each time, so there's nothing to install or keep up to date.

# Print a single digest to stdout instead of writing files
npx gitoutput . --output -
npx gitoutput . --output - | pbcopy

# Point it at a subdirectory or branch
npx gitoutput https://github.com/AnEntrypoint/gitoutput/tree/main/src
npx gitoutput . --branch develop

Requirements

  • Node.js 18+ (ships with npx)
  • git installed and on your PATH — used as a fallback for private repos, non-GitHub hosts, and anything a plain zip download can't express. Public github.com repos are fetched directly as a zipball instead, with no git subprocess involved.
  • For private repositories: a GitHub Personal Access Token (PAT). Generate one here.

Private repositories

npx gitoutput https://github.com/username/private-repo --token github_pat_...

# or via environment variable
export GITHUB_TOKEN=github_pat_...
npx gitoutput https://github.com/username/private-repo

Filtering what's included

By default, everything not matched by .gitignore/.gitingestignore or gitoutput's own built-in ignore list is included — the goal is a digest with exactly what an agent needs to plan changes, nothing more. The built-in list unconditionally excludes:

  • All hidden files and directories (anything starting with ..github/, .eslintrc, .env.example, editor/IDE config, AI-agent tooling state, VCS internals, etc.)
  • Build/output directories that mirror or duplicate source (build/, dist/, out/, output/, builds/, artifacts/, generated/, public/, static/, etc.)
  • Binaries and compiled artifacts across every major language/platform (executables, object files, ML model weights, 3D/game-engine assets, archives, media, fonts, office documents)
  • Lockfiles, caches, and secrets (node_modules, *.lock, *.key/*.pem/credentials.json, etc.)
npx gitoutput . --exclude-pattern "*.test.js"
npx gitoutput . --include-pattern "src/**"
npx gitoutput . --include-gitignored   # also include .gitignore'd files

Output

By default, gitoutput writes chunked files instead of printing to stdout: <gitprojectname>-1.txt, <gitprojectname>-2.txt, etc., each at most 80,000 characters. Chunk 1 contains the summary and an mcp-thorns codebase report; later chunks contain the directory tree and file contents.

npx gitoutput .                       # writes gitoutput-1.txt, gitoutput-2.txt, ...
npx gitoutput . --output digest.txt   # writes digest-1.txt, digest-2.txt, ...
npx gitoutput . --output -            # print a single digest to stdout instead

All options

| Flag | Short | Description | | ------------------------ | ----- | ----------------------------------------------------------------------------| | --max-size <bytes> | -s | Maximum file size to process, in bytes (default: 10 MB) | | --exclude-pattern <p> | -e | Shell-style glob pattern to exclude (repeatable) | | --include-pattern <p> | -i | Shell-style glob pattern to include (repeatable) | | --branch <name> | -b | Branch to clone and ingest | | --include-gitignored | | Include files matched by .gitignore / .gitingestignore | | --exclude-submodules | | Exclude Git submodules (recursively included by default) | | --token <token> | -t | GitHub PAT for private repositories (falls back to GITHUB_TOKEN env var) | | --output <path> | -o | Output file base name for chunked files. Defaults to <gitprojectname>.txt. Pass - for stdout |

npx gitoutput --help

Supported Git hosts

Bare user/repo slugs and scheme-less URLs are resolved against known hosts: github.com, gitlab.com, bitbucket.org, gitea.com, codeberg.org, and gist.github.com. Self-hosted instances are also recognized heuristically when the hostname starts with git., gitlab., or github. (e.g. GitHub Enterprise).

Using it as a library

If you're building a Node.js tool on top of gitoutput rather than shelling out to the CLI:

npm install gitoutput
import { ingestAsync } from "gitoutput";

const [summary, tree, content] = await ingestAsync("https://github.com/AnEntrypoint/gitoutput");

console.log(summary);

Docker

docker build -t gitoutput .
docker run --rm gitoutput https://github.com/AnEntrypoint/gitoutput

Contributing

Issues and pull requests welcome — see CONTRIBUTING.md.

Stack