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

project-share-zip

v2.0.0

Published

Create a shareable ZIP of a Git project while respecting ignore rules.

Readme

project-share-zip

Create a normal .zip of the current Git project for sharing with ChatGPT or another code-review tool.

The goal is deliberately small: run one command and get the project files you normally want to share, without node_modules, build output, private ignored config, or other Git-ignored files.

Install

npm install --save-dev project-share-zip

Add a script:

{
    "scripts": {
        "pkg": "project-share-zip"
    }
}

Then run:

npm run pkg

This package uses the same CLI for its own npm run pkg script, so changes to the tool are exercised against the project itself too.

A project in C:\code\my-app creates:

C:\code\my-app\my-app.zip

What gets included

The file list comes from Git, so the package automatically respects:

  • .gitignore files
  • .git/info/exclude
  • your global Git ignore file

It includes all tracked files plus untracked files that are not ignored, so current working-tree changes can be shared even before they are committed.

This follows normal Git behavior: ignore rules do not stop a file from being included once that file is tracked. Use --exclude for tracked files or directories that should remain in version control but should not be shared.

The package additionally always excludes:

  • node_modules at any depth
  • every package-lock.json
  • the output ZIP itself

The ZIP contains the actual working-tree bytes on disk; it does not archive a committed snapshot or run files through Git clean/line-ending filters.

Share-only exclusions

Use --exclude for project files that should stay in version control but should not be shared in the ZIP. The option is repeatable, so the exclusions can live directly in the project's npm script:

{
    "scripts": {
        "pkg": "project-share-zip --exclude ./sensitive --exclude ./private-notes.txt"
    }
}

Each value is a literal file or directory path relative to the project root. Excluding a directory excludes everything below it, including tracked files. Globs are intentionally not interpreted.

You can also pass exclusions directly:

npx project-share-zip --exclude ./sensitive --exclude ./fixtures/private

Git's built-in .git/info/exclude and global Git ignore file remain supported for untracked files. Like .gitignore, they do not exclude files that are already tracked.

Custom output path

npm run pkg -- --output ./tmp/code-review.zip

Or directly:

npx project-share-zip --output ./tmp/code-review.zip

Important security note

This is a convenience tool, not a secret scanner. Before uploading a ZIP, make sure untracked private files are covered by .gitignore, .git/info/exclude, or your global Git ignore file, and use --exclude for private files that remain tracked.

Requirements

  • Node.js 20.19 or newer
  • Git available on PATH
  • Run the command from the Git repository root

Why not npm pack?

npm pack is excellent for creating the package you intend to publish, but its file selection can be controlled by package.json#files and .npmignore. Those rules often intentionally omit source, tests, or project metadata, which makes them a poor fit for sharing a working project snapshot.