open source CLI tool

Your codebase has conventions.
Now enforce them.

One scan, real defaults, no config to start. viberails reads your existing project, generates AI context files, and enforces the rules it finds.

AI edits pre-commit PR checks
~/workspace
$ npx viberails
Scan complete
Ready to initialize
monorepo · 10 packages · TypeScript 5
pnpm · ESLint 9 · Prettier 3 · Jest 29
Rules
300-line file cap
kebab-case naming
missing tests enforced
Next step
› Accept defaults
Customize rules
Review detected details

how it works

01

Reads the room before it sets rules

Framework, tooling, structure, naming, tests. It pulls defaults from the codebase you already trust instead of inventing a policy on top of it.

02

Catches drift where drift starts

PostToolUse hooks catch drift during AI edits. Pre-commit hooks and CI enforce the rest.

03

Handles monorepos like a first-class case

Workspace packages get scanned independently. Boundaries can be inferred from current imports, not guessed from ideology.

04

Turns setup into team infrastructure

The same init flow can wire hooks, AI context, and PR checks so the rules live in the repo, not in one person's memory.

Monorepo-native. Detects workspaces, scans packages independently, infers import boundaries, and supports per-package config.

where it shows up

During AI edits

PostToolUse hooks validate files as AI tools edit them. Instant feedback, no context switch.

On commit

Repository-level checks hit before the branch leaves your machine.

In pull requests

Same rules run in CI with --enforce to block PRs with violations.

pre-commit / ci
$ viberails check --staged
Checking file rules... done
Checking missing tests... done
Checking boundaries... done
✓ 127 files checked · no violations
viberails check --staged

The everyday safety net.

viberails sync

Refresh the scan without trashing edits.

viberails fix --dry-run

Preview cleanup before touching files.

viberails boundaries --infer

Rebuild monorepo boundaries from reality.

get started

npm
$ npx viberails
pnpm
$ pnpm dlx viberails

The wizard scans your project, shows what it found, and writes config. After that, use check to validate, sync to refresh, and fix to auto-correct.