# jev-lint

> A CLI that checks JavaScript and TypeScript files against project conventions written in plain English, using the Jev model through Vercel AI Gateway. Built for coding agents and CI.

jev-lint is a command-line linter by Zac Denham that checks JavaScript and TypeScript code against rules written in plain English instead of hand-coded syntax rules. It sends code and rules to TypeSafe's Jev model through Vercel AI Gateway and reports possible violations. The README calls it an early release and advises reviewing findings before letting them block CI.

## What It Is

jev-lint sits where a normal linter would, but each rule is a sentence or a section of your project docs. Jev reads each file as a whole, without following imports, and reports violations with locations, the rule that triggered, token usage, and cost. It points to top-level declarations or class members, counts uncertain results separately from passing ones, and never edits code. Output is compact by default so coding agents can consume it, with pretty and JSON modes available.

## Writing Rules

Rules live in a `jev.config.json` file created by `jev-lint init`. Each rule has an instruction, either inline text or a pointer to a Markdown file and heading, plus an optional severity and file globs that narrow where it applies. Markdown rules can include good and bad examples and exceptions to guide the model; the README notes examples are never executed. Markdown rule files must sit inside the config folder.

## Running Checks

A dry run previews the files, rules, and an offline cost estimate without calling the API. Normal runs can target the whole config, a single path, or only files changed since a branch's merge-base. Every run saves a report that can be browsed later without new API calls, and output is capped by finding count and size unless you raise the limits. Exit codes follow the usual pattern: 0 for clean, 1 for errors or too many warnings, 2 for config or run failures.

## Cost Guardrails

Because each file uses your own Vercel AI Gateway credits, jev-lint enforces per-run limits on estimated spend, files, requests, and input size, which can be changed in the config or per run. Live runs check current gateway rates before evaluating. The README is explicit that the spend limit is a client-side guardrail, not a hard billing cap, since an in-flight request can go over its estimate.

## Setup Requirements

jev-lint is not published to npm under this project; it is installed by cloning the repository, building it, and linking the command globally. It needs Node.js 22.22 or later, Git, and a Vercel AI Gateway API key. An unrelated project by another developer uses the same name on npm.

## Features
- Lint JavaScript and TypeScript against plain-English conventions
- Inline or Markdown-section rule definitions
- Rule examples and exceptions in Markdown
- Per-rule severity and file globs
- Whole-file context evaluation
- Findings located to top-level declarations or class members
- Uncertain results counted separately from compliance
- Compact output by default, with pretty and JSON modes
- Dry-run mode with offline cost estimate
- Changed-files mode via git merge-base
- Saved reports browsable without API calls
- Output budget with explicit truncation and --summary
- Client-side limits on spend, files, requests, and input size
- Token usage and cost reporting per run
- CI-friendly exit codes with --max-warnings
- init command to scaffold jev.config.json

## Integrations
Vercel AI Gateway, Jev, Git

## Platforms
CLI, MACOS, LINUX

## Pricing
Free

## Version
0.1.0

## Links
- Website: https://github.com/zdenham/jev-lint
- Documentation: https://github.com/zdenham/jev-lint#readme
- Repository: https://github.com/zdenham/jev-lint
- EveryDev.ai: https://www.everydev.ai/tools/jev-lint
