DISPATCH

Your codebase's night watch.

BEAT

Pre-Commit Guardian

Intercepts every commit before it lands. Runs your linting rules, formatting checks, and custom policies in milliseconds. No bad code gets past the gate.

Pattern Enforcement

Define architectural boundaries. Enforce import rules, naming conventions, and module dependencies. Your codebase, your laws.

Auto-Fix Patrol

When violations are found, localcop doesn't just report — it fixes. Automated formatting, import sorting, and style corrections applied instantly.

Zero Config Start

Works out of the box with sensible defaults. One command to install, one file to customize. Complexity is optional; protection is immediate.

EVIDENCE

// localcop.config.ts
import { defineConfig } from 'localcop';

export default defineConfig({
  rules: {
    'no-circular-imports': 'error',
    'enforce-barrel-exports': 'warn',
    'max-file-length': ['error', { max: 300 }],
    'naming-convention': ['error', {
      components: 'PascalCase',
      hooks: 'camelCase',
      constants: 'UPPER_SNAKE'
    }]
  },
  patrol: {
    preCommit: true,
    autoFix: true,
    reportFormat: 'compact'
  }
});

PRECINCT

git commit localcop hook lint engine format engine policy engine PASS commit allowed FAIL commit blocked