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

secure-commit

v1.0.0

Published

A CLI tool to prevent secrets from being committed to Git repositories

Downloads

2

Readme

secure-commit

🛡️ Prevent secrets from being committed to your Git repositories

A lightweight CLI tool that automatically detects and blocks API keys, passwords, and other sensitive data from being committed to version control.

Features

  • 🔍 Smart Detection - Detects AWS keys, Stripe keys, OpenAI tokens, database URLs, and more
  • 🪝 Git Integration - Automatic pre-commit hooks to prevent accidents
  • 🚀 Zero Config - Works out of the box with sensible defaults
  • Fast & Lightweight - Minimal dependencies, maximum performance
  • 🎯 Developer Friendly - Clear error messages and helpful suggestions

Quick Start

Scan your project for secrets

npx secure-commit scan

Install protection (recommended)

npx secure-commit install

This installs a git pre-commit hook that automatically scans files before each commit.

Full setup (gitignore + hooks)

npx secure-commit init

Commands

| Command | Description | |---------|-------------| | npx secure-commit scan | Scan current directory for secrets | | npx secure-commit install | Install git pre-commit hooks | | npx secure-commit uninstall | Remove git pre-commit hooks | | npx secure-commit init | Setup .gitignore patterns and install hooks | | npx secure-commit clean | Remove tracked sensitive files from git | | npx secure-commit preview | Preview .gitignore changes |

What it detects

  • AWS Access Keys (AKIA...)
  • Stripe API Keys (sk_live_..., sk_test_...)
  • OpenAI API Keys (sk-...)
  • GitHub Personal Access Tokens (ghp_...)
  • Google API Keys (AIza...)
  • Database Connection Strings (connection URLs with credentials)

Examples

Basic usage

# Scan for secrets
npx secure-commit scan

# Install protection
npx secure-commit install

# Test with a dummy secret (will be blocked)
echo "const key = 'your-api-key-here'" > test.js
git add test.js
git commit -m "test" # This will be blocked!

Using flags

# Force reinstall hooks
npx secure-commit install --force

# Preview cleanup without making changes
npx secure-commit clean --preview

How it works

  1. Pre-commit Hook: When you try to commit, the hook scans staged files
  2. Pattern Matching: Uses regex patterns to identify secret formats
  3. Immediate Feedback: Shows exactly what was found and where
  4. Helpful Guidance: Suggests how to fix the issue

Bypass protection

Sometimes you need to commit test data or examples:

# Skip the pre-commit hook (use carefully!)
git commit --no-verify -m "Add test fixtures"

Configuration

The tool works without configuration, but you can customize:

  • Add patterns to .gitignore
  • Modify the pre-commit hook for custom behavior
  • Use with existing git hooks (they're preserved)

Requirements

  • Node.js 14+
  • Git repository

License

MIT © Samuel Umoren