# Reference
Every command of the published tool, with its one-line form. The table
is built from the binary's own list — it holds no hand-written rows —
and `law --help` carries every flag behind each line. The same list as
JSON is one call away: `law help --json`.
## Project
| Command | Usage | What it does |
|---|---|---|
| `law init` | `law init
[--name ] [--template case\|package] [--json]` | a new case folder or canon package |
| `law add` | `law add [@] \| [--project ] [--registry ]… [--dry-run] [--json]` | pin a dependency in law.lock and install its bytes |
| `law install` | `law install [--from ] [--project ] [--registry ]… [--offline] [--dry-run] [--recover] [--json]` | restore deps/ from law.lock |
| `law update` | `law update [@] [--project ] [--registry ]… [--dry-run] [--replay ] [--json]` | move a pin, replaying saved answers with --replay |
| `law outdated` | `law outdated [--project ] [--registry ]… [--json]` | pinned vs published versions; the lock is untouched |
## Container
| Command | Usage | What it does |
|---|---|---|
| `law pack` | `law pack --out \| --answers … \| --runs … [--project ] [--json]` | release artifact: a directory or a portable .arxo container |
| `law unpack` | `law unpack --out [--json]` | check and expand a container tree |
| `law inspect` | `law inspect […]` | a saved evaluation document, or a container's contents |
| `law key` | `law key new --out ` | a new Ed25519 signing key |
| `law sign` | `law sign --key [--role publisher\|executor]` | sign a container |
| `law publish` | `law publish (--registry = \| --candidate --bytes ) [--json]` | publish into a registry directory or prepare a candidate |
## Ask
| Command | Usage | What it does |
|---|---|---|
| `law ask` | `law ask [] (--query … \| --query-json \| --card ) [--out ] [--format json\|text\|brief]` | a question to a case; --out saves the evaluation |
| `law case` | `law case questions\|check\|diff\|document\|facts … [--json]` | questions, facts with provenance, documents, diffs |
| `law eval` | `law eval [--answer ] [--out ]` | replay a saved evaluation |
## Check
| Command | Usage | What it does |
|---|---|---|
| `law types` | `law types [--out ]` | CLIR .d.ts declarations of a package |
| `law fix` | `law fix imports [ \| --workspace \| --changed ] [--check] [--json]` | use self::{…} blocks from the resolution journal |
| `law test` | `law test [] [--family ]… [--file ]… [--grep ] [--json]` | the package's declared scenarios over the law.lock world |
| `law audit` | `law audit [] [--profile static] [--clir ] [--min-bytes ] [--json]` | formalization measure of a package; executes no cases |
## Serve
| Command | Usage | What it does |
|---|---|---|
| `law serve` | `law serve --world (--journal \| --no-journal) [--host ] [--port ]` | pinned-world HTTP service: POST /v1/ask |
| `law replay-record` | `law replay-record --world --journal [--decision ]… [--json]` | replay the decision journal |
| `law check-file` | `law check-file --world --template --questions --input --out ` | batch check of a file of cases |
## Engine
| Command | Usage | What it does |
|---|---|---|
| `law engine` | `law engine …` | low-level engine commands |
| `law version` | `law version [--json]` | tool version, semantics lines, binary hash |
## Where next
- The interactive session, `law shell`, is not in the published tool yet:
[Shell](/cli/shell/).
- `ask`, `case` and `eval` end in an evaluation document: [How to read
an answer](/guide/reading-an-answer/).
- `serve` answers over HTTP with the same documents: the [Fact
protocol](/protocols/fact-protocol/) for what goes in, the [Decision
protocol](/protocols/decision-protocol/) for what comes back.
- `engine check` reports diagnostic codes: every code is explained under
[Diagnostics](/diagnostics/).
- Questions about the model itself — rules, predicates, sources — belong
to [LawQL](/lawql/), not to this table.