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

git-shield

v1.1.0

Published

Git Shield is a CLI tool that helps developers automatically **block or ignore specific files from being committed** using Git hooks (pre-commit). It's designed to enhance code hygiene and prevent unwanted files from being pushed to the repository.

Readme

Git Shield 🧱

Git Shield is a CLI tool that helps developers automatically block or ignore specific files from being committed using Git hooks (pre-commit). It's designed to enhance code hygiene and prevent unwanted files from being pushed to the repository.

✨ Features

Feature | | --- | | 🔒 Prevents commits of .env, secrets, and other sensitive files | | 🧹 Keeps your commits clean and focused | | 👨‍💻 Educates devs on best practices | | 🧩 Integrates directly into your local Git hooks | | 👌Quick overview of your Git repository's activity and contributors. |

📦 Installation

🌍 Option 1: Global Installation (Recommended)

Install the package globally on your system and use it directly from anywhere:

# Install Package
npm install -g git-shield
🚀 Usage
#Initialize in your project
# Make sure your project is already a Git repository:
git init # If not already initialized
# Then initialize Git Shield:
git-shield init

📁 Option 2: Local Installation (Using npx)

If you prefer not to install it globally, you can use npx to run it directly in your project:

# Install Package
npm install git-shield
🚀 Usage
#Initialize in your project
# Make sure your project is already a Git repository:
git init # If not already initialized
# Then initialize Git Shield:
npx git-shield init

💡 This will create the following file if it doesn’t exist:

📁 File

# .git/hooks/pre-commit
# .gitwallrc

➡️ Configuration

Edit the .gitwallrc file to specify which files or patterns you want to block:

{
  "blockedPatterns": [
    "src/config/*.env",
    "*.log",
    "temp/**"
  ]
}

You can use glob patterns to match files and directories.

➡️ Make a Commit

When you try to commit, Git Shield will check the staged files and block the commit if any blocked files are included.

git add .
git commit -m "Your commit message"

If any blocked files are detected, the commit will be rejected with a message listing the blocked files.

Example Output:

❌ Commit blocked!
Blocked file(s):
 - .env
 - node_modules/some-lib/index.js

Fix the issue or update your config to allow these files

📊 Additonal Functionality: git-shield stats

The git-shield stats command gives you a quick overview of your Git repository's activity and contributors.

🔍 What it does:

Feature | | --- | | Displays a list of top contributors to your repo. | | Shows commit activity for today, the last 7 days, and this month. | | Lists the most changed files with number of changes. | | Helps identify active developers and hotspot files. | | Useful for team insights and project analysis. |

📅 Commit Activity:

Today       : 0 commits  
Last 7 days : 5 commits  
This month  : 5 commits  

👨‍💻 Top Contributors:

Using Git repo at: C:\Users\pgarg\OneDrive\Desktop\Git-guard
     5  itz10pankaj

📂 Most Changed Files:

Top  most changed files:
bin/index.js - 5 changes  
package-lock.json - 5 changes  
package.json - 5 changes  
.gitwallrc - 4 changes  
README.md - 4 changes  
utils/gitwallrc.default.js - 3 changes  
lib/init.js - 3 changes  
.gitignore - 2 changes  
CONTRIBUTING.md - 2 changes  
LICENCE.md - 1 changes

🛠 Development

Clone this repo and link it locally if you're working on Git Shield itself:

git clone https://github.com/itz10pankaj/git-shield.git
cd git-shield
npm install
npm link

Now git-shield command will be available globally.

📄 License

MIT © Pankaj