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

gitleakguard

v1.3.4

Published

One-command Git secret protection — blocks commits with exposed credentials

Readme

gitleakguard

One-command Git secret protection for vibe coders.

Protejează-ți commit-urile de credențiale expuse (API keys, tokens, parole) cu un hook pre-commit automat și integrare opțională cu Keeper Secret Manager.

$ npx gitleakguard init

  gitleakguard Setup

▶ Installing pre-commit hook
✓ Pre-commit hook installed → .git/hooks/pre-commit

▶ Configuring .gitignore
✓ .gitignore updated (5 entries added)

▶ Creating .env template
✓ .env.example created

✓ gitleakguard is active. Your next commit will be scanned automatically.

Ce face

| Funcție | Descriere | |---|---| | Pre-commit hook | Blochează commit-ul dacă detectează credențiale | | History scanner | Scanează retroactiv tot istoricul git | | AI Editor Skill | /gitleakguard slash command în Claude Code, Cursor, Windsurf | | Docker | Rulează în orice CI/CD fără instalare locală | | Keeper integration | Stochează cheile SSH în vault pentru semnare commit-uri | | Auto-remediation | Oferă pași exacți + prompt gata pentru orice AI editor |


Instalare rapidă

AI Editor Skill (Claude Code, Cursor, Windsurf, Copilot)

npx skills add podutpetru/gitleakguard

Instalează skill-ul în orice editor AI care suportă formatul Vercel Skills. Activează /gitleakguard ca slash command în Claude Code, Cursor Agent etc.

macOS / Linux / WSL

curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/install.sh | sh

Windows (PowerShell)

irm https://raw.githubusercontent.com/podutpetru/gitleakguard/main/install.ps1 | iex

Docker

# Scanează staged files din repo-ul curent
docker run --rm -v "$(pwd):/repo" podutpetru/gitleakguard scan

# Scanează tot istoricul git
docker run --rm -v "$(pwd):/repo" podutpetru/gitleakguard history

# Setup (instalează hook-ul în repo-ul montat)
docker run --rm -v "$(pwd):/repo" podutpetru/gitleakguard init

Image: podutpetru/gitleakguard — node:18-alpine + git, ~50MB

npm / npx

# Fără instalare:
npx gitleakguard init

# Global:
npm install -g gitleakguard
gitleakguard init

Manual (clone)

git clone https://github.com/podutpetru/gitleakguard.git .gitleakguard
cd .gitleakguard
node cli.js init

Opțiuni instalare

# Doar hook-ul (fără skills AI editors)
curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/install.sh | sh -s -- --hook-only

# Fără skills globale (Claude, Cursor, Gemini CLI)
curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/install.sh | sh -s -- --no-editor-skills

# Windows — doar hook
irm https://raw.githubusercontent.com/podutpetru/gitleakguard/main/install.ps1 | iex -HookOnly

Comenzi

gitleakguard init      # Setup complet (hook + gitignore + Keeper opțional)
gitleakguard scan      # Scanează manual fișierele staged
gitleakguard history   # Scanează tot istoricul git pentru secrete expuse
gitleakguard help      # Afișează ajutor

Cum funcționează hook-ul

La fiecare git commit, hook-ul rulează automat și verifică fișierele staged:

$ git commit -m "add openai integration"
gitleakguard — scanning staged files for secrets...

✖  Commit blocked — 1 secret(s) detected:

  ● OpenAI API Key
    File: src/api.js:14
    Preview: const apiKey = "sk-proj-abc123...";

How to fix:
  1. Move the secret to a .env file
  2. Add .env to .gitignore
  3. Replace the value with process.env.YOUR_KEY in code
  4. Revoke and rotate the exposed credential

AI prompt to fix automatically:
  "Find all hardcoded credentials and move them to .env,
   replacing with process.env.VARIABLE_NAME"

To bypass (not recommended): LEAKGUARD_BYPASS=1 git commit ...

Credențiale detectate

| Tip | Pattern | |---|---| | AWS Access Key | AKIA + 16 chars | | GitHub Token | ghp_..., github_pat_... | | OpenAI API Key | sk-[48+ chars], sk-proj-... | | Anthropic API Key | sk-ant-api03-... | | Google API Key | AIza + 35 chars | | Stripe Keys | sk_live_..., sk_test_... | | Slack Tokens | xoxb-... | | Private Keys | -----BEGIN PRIVATE KEY----- | | JWT Tokens | eyJ... cu 3 segmente | | URL cu parolă | scheme://user:pass@host | | Variabile generice | password = "...", api_key = "..." |


Docker — pentru CI/CD

Imaginea Docker e utilă în pipeline-uri automate unde nu vrei să instalezi Node.js. Nu e un MCP server — pentru integrarea cu AI editors folosește skill-ul de mai jos.

Image: podutpetru/gitleakguard

GitHub Actions

- name: Scan for secrets
  run: |
    docker run --rm -v "${{ github.workspace }}:/repo" podutpetru/gitleakguard scan

GitLab CI

scan-secrets:
  image: podutpetru/gitleakguard
  script:
    - gitleakguard scan
  variables:
    GIT_STRATEGY: fetch

Linie de comandă

# Scan staged files
docker run --rm -v "$(pwd):/repo" podutpetru/gitleakguard scan

# Scan git history
docker run --rm -v "$(pwd):/repo" podutpetru/gitleakguard history

AI Editor Skill — npx skills add

Cel mai simplu mod de a instala skill-ul în orice editor AI compatibil:

npx skills add podutpetru/gitleakguard

Sau explicit:

npx skills add podutpetru/gitleakguard --skill gitleakguard

Skill-ul se instalează automat în directorul potrivit pentru editorul detectat. Activează slash command-ul /gitleakguard cu 4 moduri:

| Comandă | Ce face | |---|---| | /gitleakguard init | Setup complet în repo-ul curent | | /gitleakguard scan | Scanează staged files pentru secrete | | /gitleakguard history | Scanează tot istoricul git | | /gitleakguard fix | Ghid pas cu pas pentru un credential deja expus |


Integrare în medii de dezvoltare

install.sh / install.ps1 instalează automat:

  • CLAUDE.md — Claude Code (activ automat)
  • GEMINI.md — Gemini CLI + Antigravity (activ automat)
  • .cursor/rules/gitleakguard.mdc — Cursor (alwaysApply: true)
  • .vscode/tasks.json — VSCode tasks

Și global:

  • ~/.claude/commands/gitleakguard.md/gitleakguard în Claude Code
  • ~/.cursor/skills/gitleakguard//gitleakguard în Cursor Agent

Claude Code

mkdir -p ~/.claude/commands
curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/.claude/commands/gitleakguard.md \
  > ~/.claude/commands/gitleakguard.md

Utilizare: /gitleakguard scan, /gitleakguard fix, /gitleakguard history

Cursor

Instalare skill (slash command /gitleakguard în Agent mode):

npx skills add podut/gitleakguard

Sau manual — regulă always-on per proiect:

mkdir -p .cursor/rules
curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/templates/cursor-rule.mdc \
  > .cursor/rules/gitleakguard.mdc

Utilizare:

  • Deschide Cursor → panel Agent (Ctrl+L) → mod Agent
  • Tastează /gitleakguard → apar comenzile în autocomplete
  • Regula alwaysApply: true e activă automat — Cursor nu va scrie niciodată credențiale hardcodate

Gemini CLI / Antigravity

Instalare Gemini CLI (dacă nu îl ai):

npm install -g @google/gemini-cli
gemini auth login

Instalare skill:

npx skills add podut/gitleakguard

Sau manual — adaugă regulile în proiect:

curl -fsSL https://raw.githubusercontent.com/podutpetru/gitleakguard/main/templates/GEMINI.md >> GEMINI.md

Utilizare:

gemini          # deschide Gemini CLI
/gitleakguard scan
/gitleakguard history
/gitleakguard fix

VSCode

Tasks instalate automat. Ctrl+Shift+P → Run Task → gitleakguard.

Suport pentru orice AI editor

| Editor | Fișier instrucțiuni | |---|---| | Claude Code | CLAUDE.md | | Gemini CLI / Antigravity | GEMINI.md | | Cursor | .cursor/rules/gitleakguard.mdc | | GitHub Copilot | .github/copilot-instructions.md | | Windsurf | .windsurf/rules/gitleakguard.md | | Aider | .aider.conf.ymlsystem-prompt: | | Continue.dev | .continuerc.jsonsystemMessage: |


Integrare Keeper Secret Manager

gitleakguard init
# → alege "y" la "Set up Keeper SSH signing?"

Stochează cheile SSH în Keeper Vault și le folosește pentru semnarea commit-urilor.


Scanare istorică și remediere

# Scanează tot istoricul
gitleakguard history

# Curăță istoricul (necesită git-filter-repo)
pip install git-filter-repo
git filter-repo --invert-paths --path src/config.ts
git push --force-with-lease

Dacă repo-ul e public: rotește imediat orice credential găsit — ștergerea din istoric nu e suficientă.


Structura proiectului

gitleakguard/
├── cli.js                    # Entry point: gitleakguard <command>
├── package.json
├── Dockerfile                # Docker image
├── install.sh                # Installer POSIX
├── install.ps1               # Installer Windows
├── scanners/secrets.js       # Regex patterns pentru 15+ tipuri de credențiale
├── hooks/pre-commit          # Hook instalat în .git/hooks/pre-commit
├── setup/init.js             # Setup interactiv one-command
├── setup/scan-history.js     # Scanner retroactiv git history
├── integrations/keeper.js    # Keeper Secret Manager wrapper
├── templates/
│   ├── CLAUDE.md             # Template instrucțiuni Claude Code
│   ├── GEMINI.md             # Template instrucțiuni Gemini CLI
│   └── cursor-rule.mdc       # Template regulă Cursor
└── .vscode/tasks.json        # VSCode tasks

FAQ

Q: Cum bypass-uiesc hook-ul?

LEAKGUARD_BYPASS=1 git commit -m "message"

Q: Hook-ul blochează .env.example? Nu — .env.example, .env.template, node_modules/ sunt excluse automat.

Q: Funcționează pe Windows? Da — Node.js ≥ 18 pe orice platformă. Sau folosește Docker.

Q: Pot adăuga pattern-uri proprii?

// scanners/secrets.js
{ name: "My Pattern", regex: /your-regex/g },

Licență

MIT — folosește, modifică, distribuie liber.