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

autosnap-git

v1.0.0

Published

Production-ready CLI for automatic Git snapshots.

Readme

Autosnap Git

Autosnap Git is a production-ready CLI that automates Git snapshots and gives a clean, friendly view of your commit history.

Features

  • Automatic snapshots only when changes exist
  • Initializes Git repositories automatically
  • Safety checks for secrets and .env
  • Human-readable history, diff, and status
  • Watch mode with debounce and recursion protection
  • Ready for npm link or global installs

Install

npm install -g autosnap-git

For local development:

npm link

Usage

autosnap-git

Snapshots only if there are changes. If nothing changed, Autosnap exits cleanly.

CLI Reference

autosnap-git                 # auto snapshot
autosnap-git --dry-run        # preview without committing
autosnap-git --push           # commit + push
autosnap-git --watch          # watch for file changes (5s debounce)
autosnap-git --watch --interval 300  # commit after 300s of inactivity
autosnap-git --watch --every 300     # alias for --interval
autosnap-git --prefix dev     # prefix commit messages

autosnap-git log              # recent commits
autosnap-git log -n 10         # last 10 commits
autosnap-git log --full        # detailed commit info
autosnap-git last             # show last commit
autosnap-git diff             # diff vs last commit
autosnap-git diff --stat      # summary diff
autosnap-git status           # git status summary

Commit Message Rules

  • First commit: Initial snapshot
  • Later commits: Auto snapshot: YYYY-MM-DD HH:mm
  • Optional file hints are appended for context
  • --prefix adds a prefix such as dev:

Watch Mode

--watch uses chokidar to track changes:

  • Debounce of 5 seconds
  • Ignores .git, node_modules, dist, and coverage
  • Prevents recursive commits
  • Shows live activity events

Safety

Autosnap respects .gitignore and refuses to commit:

  • .env files
  • private keys (*.pem, *.key, id_rsa)
  • filenames containing secret or credentials

On first run, Autosnap prints a warning so you can double-check changes.

Examples

autosnap-git
autosnap-git --prefix dev
autosnap-git log -n 3
autosnap-git diff --stat
autosnap-git --watch --dry-run

FAQ

Why didn't Autosnap create a commit?

No changes were detected, or sensitive files were found and blocked.

Does Autosnap respect .gitignore?

Yes. It uses git add . and Git's ignore rules.

How do I stop watch mode?

Press Ctrl+C.

Development

npm install
npm test