drift-guard locks your design tokens before AI agents touch your code,
then detects and blocks any unauthorized changes. Zero overhead. Pure CLI.
Click through each step to see how drift-guard protects your design from AI agents.
npx drift-guard init
Scans CSS, HTML, Tailwind config. Extracts every design token. Creates an immutable snapshot.
npx drift-guard rules
Generates .cursorrules, CLAUDE.md, AGENTS.md — AI agents now know your design is sacred.
npx drift-guard check
Compares current code against snapshot. Catches drift. Returns exit code 1 for CI. Under 1 second.
| Feature | 🛡️ drift-guard | BackstopJS / Percy |
|---|---|---|
| When | Before commit (pre-commit) | After deploy (QA) |
| What | Design tokens (code-level) | Screenshots (pixel-level) |
| AI-aware | ✅ Generates agent rules | ❌ No AI integration |
| Speed | < 1 second | Minutes |
| Dependencies | Zero (no browser) | Headless Chrome |
| Token overhead | 0 tokens (CLI) | N/A |
| Cost | Free, forever | $99+/mo |