---
title: Introduction
description: Lawbook checks code standards with repeatable rules and LLM decisions.
sidebar:
  order: 0
---

Lawbook checks a directory against the rules in its `lawbook.yaml`. Most rules
are repeatable: the same files always give the same result, and a failing
rule names the file and line that broke it. A `standard` rule states a
standard in prose and lets a model judge each file against it. Lawbook ships
as an npm package and needs Node.js 22.12 or newer.

```sh
npm install --global lawbook
lawbook init
lawbook check
```

- [Getting started](/lawbook/getting-started) walks through the first run.
- [Configuration](/lawbook/configuration) describes the rule kinds and the config file.
- [LLM rules](/lawbook/llm-rules) explains `standard` rules and how to write one.
- [Clean-code example](/lawbook/examples) is a drop-in `lawbook.yaml` built from ten software engineering books.
- [Providers](/lawbook/providers) configures the Claude Code, Codex, or Kiro CLI, so a
  subscription pays for `standard` rules.
- [Suppressions](/lawbook/suppressions) turns a rule off for a line or a file with a comment.
- [Baseline](/lawbook/baseline) records today's findings so only new ones fail.
- [Commands](/lawbook/commands) lists every command and flag.
- [Exit codes](/lawbook/exit-codes) says what `0`, `1`, and `2` mean.

## Build from source

With Node.js 22.12 or newer and pnpm, from a clone of the repository:

```sh
pnpm install
pnpm run build
npm install --global .
```

Then check the install:

```sh
lawbook --version
```
