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

dcg-hermes

v1.0.0

Published

Bridge between dcg (Destructive Command Guard) and Hermes Agent — pre-command scanning, cron-safe reports, workspace protection for AI agent workflows

Downloads

9

Readme

dcg-hermes 🛡️🛸

Bridge between dcg (Destructive Command Guard) and Hermes Agent.

Pre-command scanning, cron-safe reports, pre-commit hooks, and workspace protection for AI agent workflows.

npm install -g dcg-hermes

Why?

AI coding agents (including Hermes) occasionally run catastrophic commands like git reset --hard or rm -rf ./src, destroying hours of work in seconds. dcg intercepts and blocks these commands before they execute.

dcg-hermes wraps dcg with:

  • Cron-friendly output — silent when clean, actionable reports when findings exist
  • Pre-commit hooks — blocks commits containing destructive commands
  • JSON reports — machine-parseable output for CI/CD pipelines
  • Hermes agent awareness — integrates with Hermes cron and skill workflows

Prerequisites

dcg must be installed first:

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/main/install.sh" | bash

Usage

dcg-hermes <command> [options]

Commands

| Command | Description | |---------|-------------| | scan <path> | Scan files/directories for destructive commands | | check "<command>" | Test if a command would be blocked | | status | Check dcg installation and hook status | | precommit | Run as pre-commit hook (blocks on findings) | | report <path> | Generate a full JSON report | | cron [path] | Cron mode — silent if clean, report if findings |

Examples

# Check a command
dcg-hermes check "git reset --hard HEAD~5"
# → ⛔ git reset --hard HEAD~5
#      → matched deny rule

# Scan a directory
dcg-hermes scan ./src

# Pre-commit hook (add to .git/hooks/pre-commit)
dcg-hermes precommit

# Cron-friendly scan
dcg-hermes cron /opt/data/workspace

# Full JSON report
dcg-hermes report /opt/data > dcg-report.json

Git Pre-Commit Hook

ln -s "$(which dcg-hermes)" .git/hooks/pre-commit
# or
echo '#!/bin/sh\ndcg-hermes precommit' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Hermes Agent Integration

Add to your .hermes.md:

## Safety

Before running destructive commands, check with dcg:
```bash
dcg-hermes check "<command>"
``

For cron workflows, use dcg-hermes cron to silently scan nothing if clean, or deliver a report if findings exist.

How It Works

dcg-hermes is a thin Node.js wrapper around the dcg binary. It:

  1. Locates dcg on the system (common paths or PATH)
  2. Parses dcg's output into structured formats
  3. Provides agent-friendly interfaces (cron, precommit, report)
  4. Exits with appropriate codes for scripting

License

MIT — see LICENSE