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 🙏

© 2025 – Pkg Stats / Ryan Hefner

reposnap

v1.3.0

Published

Create structured snapshots of codebases with configurable file and directory filtering.

Readme

reposnap

reposnap is a simple CLI tool to generate a complete snapshot of your codebase, including file contents and structure. You can exclude specific directories or files during the snapshot process.

AI Code Review

reposnap is ideal for preparing your code for AI review. It:

  • Creates a single file containing all your code files
  • Identifies and optionally excludes binary files
  • Limits the number of files to respect AI context limits
  • Focuses on source code by excluding common non-code files

Use the --ai-prep flag for optimal AI review preparation.

Installation

npm install reposnap

While the package name is reposnap, the CLI command is simply reposnap.

You can use it directly with npx:

npx reposnap

Alternatively, you can install it globally:

npm install -g reposnap

And then use it as:

reposnap

Usage

Basic Usage

Simply run the command:

reposnap

This will:

  • Generate a snapshot of the current directory.
  • Save the output as <folder-name>_snapshot.txt (e.g., my-project_snapshot.txt).

AI Review Preparation

reposnap --ai-prep

This will:

  • Exclude binary files
  • Set reasonable file count limits for AI context windows
  • Limit max file size to focus on code

Options

| Option | Alias | Description | | ------------------------ | --------- | ----------------------------------------------------------- | | --root <directory> | --r | Root directory of the codebase (default: current directory) | | --output <file> | --o | Output file name (default: <folder-name>_snapshot.txt) | | --ignore-dirs <dirs> | --idir | Additional directories to ignore (in addition to defaults) | | --ignore-files <files> | --ifile | Additional files to ignore (in addition to defaults) | | --exclude-binary | --xb | Completely exclude binary files from the snapshot | | --max-files <number> | --mf | Maximum number of files to include (default: 1000) | | --max-size <KB> | --ms | Maximum file size in KB (default: 500) | | --ai-prep | --ai | Optimize for AI review (excludes binary, limits files) |

Example

  1. Basic Snapshot:

    reposnap

    This will scan the current directory and generate a snapshot file with the default name.

  2. Specify Root Directory:

    reposnap --r ./my-project
  3. Custom Output File:

    reposnap --o my_snapshot.txt
  4. Ignore Additional Directories:

    reposnap --idir dist temp logs
  5. Ignore Additional Files:

    reposnap --ifile *.env *.pem
  6. Prepare for AI Review:

    reposnap --ai-prep --o for_gpt.txt
  7. Combine Options:

    reposnap --r ./my-project --o snapshot.txt --idir dist --ifile *.log --exclude-binary

Default Ignored Paths

Directories

  • .git
  • node_modules
  • dist
  • build
  • .vscode
  • __pycache__
  • coverage

Files

  • .DS_Store
  • .gitignore
  • *.pyc
  • *.log
  • .env
  • *.key
  • *.crt
  • *.pem
  • package-lock.json
  • yarn.lock
  • pnpm-lock.yaml
  • Many common binary file types (images, fonts, executables)

Why Use reposnap?

  • Quickly create a complete snapshot of your codebase.
  • Prepare code for AI review with appropriate context limits.
  • Avoid sensitive information by using default excludes.
  • Customize the snapshot with simple options.

License

MIT License