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.
npm install -D @anthril/vguard
npx vguard initAnswer 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.
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 →
| 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 |
nextjs-15 · react-19 · typescript-strict · supabase · tailwind · django · fastapi · laravel · wordpress · react-native · astro · sveltekit · python-strict · go
| 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 |
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.
This project is maintained by Anthril and funded by our sponsors.
Apache 2.0 — Anthril