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

@anthril/vguard

v3.0.0

Published

AI coding guardrails framework. Runtime-enforced quality controls for Claude Code, Cursor, Codex, and more.

Downloads

676

Readme

VGuard

AI coding guardrails that actually enforce.

npm version npm downloads license CI node


AI coding tools write code fast, but they also introduce security vulnerabilities, break project conventions, and push to protected branches. VGuard sits between the AI tool and your codebase, checking every proposed change before it happens. Bad changes get blocked with a clear explanation and a suggested fix. Good changes pass through without friction.

Quick Start

npm install -D @anthril/vguard
npx vguard init

Answer four questions and you have working guardrails. The init wizard detects your framework, asks which AI tools you use, and generates everything. See the full Getting Started guide.

Features

Runtime Enforcement — Claude Code hooks run before every tool call. VGuard inspects the proposed change, evaluates it against your rules, and blocks anything that violates them. The AI agent sees exactly what went wrong and how to fix it. Adapter docs →

Advisory Guidance — Cursor, Codex, and OpenCode don't support runtime hooks, so VGuard generates configuration files that teach the AI your project's rules before it starts writing. Agent setup →

Smart Detection — Edit rules only flag problems that are newly introduced. Pre-existing issues in the file are left alone so you can adopt guardrails incrementally without fixing every legacy violation first. Rules overview →

Rule Layers

Rules — 25 built-in

| Category | Count | Examples | Docs | | ------------ | ----: | --------------------------------------------------------------------- | -------------------------------------------------------- | | Security | 7 | branch-protection, secret-detection, prompt-injection, rls-required | security rules | | Quality | 11 | import-aliases, naming-conventions, hallucination-guard, dead-exports | quality rules | | Workflow | 7 | commit-conventions, pr-reminder, migration-safety, changelog-reminder | workflow rules |

Presets — 14 ecosystem presets

nextjs-15 · react-19 · typescript-strict · supabase · tailwind · django · fastapi · laravel · wordpress · react-native · astro · sveltekit · python-strict · go

Browse all presets →

Agent Support

Documentation

| Section | Description | | ----------------------------------------------------------- | --------------------------------------------- | | Getting Started | Install, init wizard, first run | | Configuration | vguard.config.ts reference | | CLI | init, add, remove, generate, doctor | | Rules | All built-in rules with examples | | Presets | Framework-specific rule bundles | | Agent Setup | Per-agent adapter configuration | | Custom Rules | Write your own guardrails | | Troubleshooting | Common issues and fixes |

Exit codes

VGuard follows the BSD sysexits.h conventions so CI scripts can branch on specific failure modes. The mapping is stable across the major version and lives in src/cli/exit-codes.ts.

| Code | Name | When | | ----- | --------------- | --------------------------------------------------------------------------------------------- | | 0 | OK | Success. | | 1 | LINT_BLOCKING | vguard lint found one or more block-severity issues. | | 2 | USAGE | Unknown flag, missing required argument, invalid --format choice, --check + --apply. | | 65 | DATA_ERR | Config file loaded but failed validation (malformed JSON / zod parse error). | | 66 | NO_INPUT | Expected config not found (e.g. any command needing vguard.config.ts before vguard init). | | 69 | UNAVAILABLE | Cloud API or network dependency unreachable. | | 70 | SOFTWARE | Unexpected internal error. --debug reveals the stack trace. | | 77 | NO_PERM | Not logged in, 401/403 from Cloud, missing API key. | | 78 | CONFIG | vguard doctor ran all checks and at least one failed (or warned with --strict). | | 130 | SIGINT | Ctrl+C — interactive prompts and long-running commands both honour this. |

Example CI gate:

vguard doctor --strict
case $? in
  0)  echo "healthy" ;;
  66) echo "run 'vguard init' first" ;;
  78) echo "config or hooks broken - blocking deploy"; exit 1 ;;
  *)  exit 1 ;;
esac

Terminal behaviour

VGuard plays nicely with pipes, CI, and accessibility tooling out of the box:

| Variable / flag | Effect | | ------------------------------ | -------------------------------------------------------------------------------------------------------------- | | NO_COLOR=1 (env) | Disable all ANSI colour output. Follows the no-color.org standard. | | --no-color | Same as NO_COLOR=1 for a single invocation. | | --ascii | Replace Unicode glyphs (, , ) with ASCII equivalents (*, [ok], [fail]). Useful on LANG=C. | | -q / --quiet | Suppress banners, progress spinners, and summaries. Machine output on stdout is unaffected. | | --verbose | Emit extra diagnostic detail on stderr. | | --debug (or DEBUG=vguard*) | Show full stack traces on error instead of the friendly one-line message. | | CI=true (env, auto-detected) | Disables interactive prompts; commands fall back to defaults or --yes-style flags. | | stdout not a TTY | Auto-disables colour, spinners, and the vguard no-args setup hint — safe for vguard cmd \| jq . pipelines. |

vguard already auto-detects non-TTY stdout, so you rarely need to set any of these manually.

VGuard Cloud

VGuard Cloud gives your team a dashboard for AI coding activity — which rules fire most, who's triggering blocks, and how conventions drift over time. Set up drift alerts, connect webhooks, and export analytics. Free tier available for small teams.

Cloud docs → · Sign up →

Sponsors

This project is maintained by Anthril and funded by our sponsors.

Become a sponsor →

Community

License

Apache 2.0 — Anthril