open source cli tool

Guardrails for
vibe coding.

Scan your codebase, generate AI context, and enforce coding conventions. Zero config to start — it learns from your code.

init · scan · enforce
~/my-project
$ npx viberails
Scanning project...
Detected: (example output)
Next.js 15
TypeScript 5
Tailwind CSS 4
vitest 4
Rules:
Max file size: 300 lines
Test coverage: 80%
File naming: kebab-case
Created:
viberails.config.json
.viberails/context.md
.github/workflows/viberails.yml
.claude/settings.json — added hook

what it does

01

Scan

Detects your framework, tooling, structure, and naming conventions. A confidence model scores each detection — high means 90%+ consistency across your files.

02

Enforce

File size limits, naming rules, test coverage thresholds, and import boundary violations. Runs as a pre-commit hook, Claude Code hook, or in CI.

03

Fix

Auto-renames files to match conventions and generates test stubs. AST-aware import rewriting via ts-morph keeps everything connected.

04

Integrate

Set up pre-commit hooks, Claude Code PostToolUse hooks, and a GitHub Actions workflow during init. Blocks PRs on violations.

+

Monorepo support. Detects pnpm/npm/yarn workspaces, scans each package independently, infers import boundaries between packages, and applies per-package rule overrides.

ongoing workflow

pre-commit hook
$ viberails check --staged
Checking files... done
Checking missing tests... done
Boundary check: 127 files in 234ms
127 files checked — no violations
viberails check --staged

Validate files against your rules. Runs in pre-commit hooks and CI.

viberails sync

Re-scan and update config + context files. Preserves your manual edits.

viberails fix --dry-run

Auto-rename files and generate test stubs. Preview changes first.

viberails boundaries --infer

Analyze imports and infer package boundary rules for monorepos.

get started

npm
$ npx viberails
pnpm
$ pnpm dlx viberails

No global install. One command to scan, configure, and optionally set up hooks. Then use check, sync, and fix as you work.