DocumentationPresskitGithub@lintruleLogin Let the LLM review your code.Lintrule is a command line tool for making a large language model do your code reviews. Enforce policies your linter can't, find bugs your tests won't, and go beyond "LGTM" without wasting your team's time.Get started for free *No credit card requiredInstall the CLI$ curl -fsSL https://lintrule.com/install.sh | bashSupported on MacOS, Linux, and WSLView sourceWrite rules in plain language./rules/soc2.md🚨 Fail if we're logging customer data or we'll lose our SOC2 certification.
This is bad:
This is probably fine:
console.log("user id: " + user.id);
$ rules checkChecking 3 files in parallel...Pass - rules/soc2.md => app/routes/login.ts (2133ms)Pass - rules/soc2.md => app/routes/check.ts (1238ms)Fail - rules/soc2.md => app/routes/log.ts (2138ms)The expression 'throw new Error("Failed for customer: " + customer.email)' logs customer data, please fix.https://twitter.comKunal Gupta@djkgamc·FollowReplying to @evanjconradlmao this rules11:15 PM · May 24, 20232ReplyCopy linkRead more on TwitterSteven Tey@steventey·FollowReplying to @evanjconradwow this is amazing 🤯9:54 AM · May 24, 20233ReplyCopy linkRead more on TwitterJarred Sumner@jarredsumner·FollowReplying to @evanjconradvery cool11:58 AM · May 24, 20231ReplyCopy linkRead more on TwitterGonzalo Nuñez@gonzalo__nunez·FollowReplying to @evanjconradbrilliant. i absolutely love this9:59 AM · May 24, 20232ReplyCopy linkRead more on TwitterKarishnu@karishnu·FollowReplying to @evanjconradCan’t express how useful this is 🤯8:34 AM · May 25, 20231ReplyCopy linkRead more on TwitterCoyan@Kojenia·FollowReplying to @evanjconradThis is absolutely incredible7:04 AM · May 25, 20231ReplyCopy linkRead more on TwitterPricing$1.00per 1,000 lines of code changedEstimateLintrule runs on git diffs by default. You can estimate your bill by running the following command in your git repo:$rules billing estimateExamplesLintrule costs more, the more code you write.Small ProjectsThe Lintrule repo has ~4 contributors and costs about ~$20 per ruleset per month. Large ProjectsThe Next.js repo has ~55 contributors and costs ~$150 per month per ruleset. Really large projectsThe Rust repo has ~190 contributors and costs ~$250 per month per ruleset. If you write code, Lintrule can probably review it, no matter the language.Install
curl -fsSL https://www.lintrule.com/install.sh | bash
In your codebase, setup a .rules folder with the init command.
Next, login to Lintrule.
This will create a file a .rules/no-bugs.md with your first rule. It's just a markdown file that says "don't approve obvious bugs." Try running it with:
To save on costs, Lintrule runs on diffs. By default, it runs on the changes since the last commit, effectively git diff HEAD^. If you want it to run on other diffs, you can pass them in as arguments.
# Check against main and the a feature branch
rules check --diff main..my-feature-branch
# Run on the last 3 commits
rules check --diff HEAD~3
You can ensure rules only run on certain files by adding them to the frontmatter, like this:
We're running postgres 8 and have about 1m rows
in the "users" table, please make sure our
migrations don't cause problems.
Does Lintrule run on diffs?
Yes. By default, Lintrule runs only on changes that come from git