CLI reference
The il commands used in the Quickstart and CI, with their flags, exit codes and JSON output.
il is InputLayer's command line. The Claude Code plugin and CI both run it, and you can run it yourself. Every command reads the guarantees in .inputlayer/guarantees.yaml at the project root unless told otherwise, and runs on your machine or in your CI. Your code is not sent to InputLayer.
Output is plain words for people by default. --json prints the same result for machines.
il <command> [flags]
il <command> Global flags
| Flag | Meaning |
|---|---|
--json | Print one JSON document on stdout, for machines. A failure prints {"error": {"code": ..., "message": ...}} on stderr |
--config <file> | The configuration file. Default ~/.config/inputlayer/config.toml. Env: INPUTLAYER_CONFIG |
Exit codes
Every command uses the same codes. A command's own section says which it can return.
| Exit | Means |
|---|---|
| 0 | Holds within bounds, or the command did what it was asked |
| 1 | Broken, reproduced on the real code (or, for il replay, the bundle did not replay as recorded) |
| 2 | Usage: a bad flag, a missing or unreadable guarantee file, an unknown id. Nothing was checked |
| 3 | Access refused: a key the engine refused |
| 4 | Cannot tell: the check could not give a verdict. The reason is printed |
| 5 | No engine could run the check |
| 6 | il ci and il audit: a check no longer matches its code |
| 7 | il guarantee-diff --fail-on-weakening only: a change weakens a guarantee |
| 130 | Interrupted |
A failure that is not a verdict is never exit 1, except a break found in the check that could not be tried on the code: il ci and il audit exit 1 for it (cannot tell on the certificate). When il cannot check something, it says cannot tell with the reason and exits 4, 3 or 5.
Checking
il audit and il evidence check the repository as committed. They check each guarantee's check as it is in .inputlayer/, on the code as it is, and do not derive the check again from the code. To check a change, use il ci: it compares the change with its base, and with --certificate it derives the guarantees il derived itself again from the change's code.
On InputLayer's checkout-quickstart example, with its guarantee accepted and committed, il audit prints:
Its flags are under il audit.
il evidence
Check one guarantee and write its evidence bundle, so anyone can run it again with il replay.
il evidence retry | Flag | Meaning |
|---|---|
<id> | The guarantee's id in the guarantee file |
--guarantees <file> | The guarantee file. Default .inputlayer/guarantees.yaml |
--spawn | Start a private engine for this check, and stop it after |
--trace <file> | A shortest counterexample (inputlayer.trace/1) to put in the bundle |
--mutant <file> | A check with a bug planted in it: a pass counts only while this is still caught |
--python <file> | The Python that runs the counterexample's test on the code. Default python3 |
--out <dir> | The bundle's directory. Default .inputlayer/evidence/<id>/ |
It prints the guarantee's state, the evidence and the scope. On the same sample:
The bundle holds the check, the guarantee entry, the verdict, the engine's version, the counterexample and planted bug when given, and a manifest with the sha256 of each file and the commit the code was at. For a break with a counterexample and a guarantee replay, the counterexample is also tried on the code at that commit, and the result recorded. With --json, it prints the bundle's path and files, the report (id, state, state_code, evidence, scope, assumed, outside, reason, lines) and the engine's verdict (inputlayer.verdict/1). Exits as il check.
il replay
Run an evidence bundle again from its own files and say whether it replays as recorded.
il replay .inputlayer/evidence/retry It never trusts the bundle. It checks every file against the sha256 in the bundle's manifest and checks the bundle's model again. A break is tried again on the code at the commit the bundle recorded, in a copy, without writing your working tree. A pass must still catch the bundle's planted bug.
| Flag | Meaning |
|---|---|
<bundle> | The bundle's directory |
--project <dir> | The repository the recorded commit is read from. Default: the one the current directory is in |
--python <file> | The Python that runs the counterexample's test on the code. Default python3 |
--other-engine | Replay on an engine build other than the recorded one, and say so |
--spawn | Start a private engine for this replay, and stop it after |
Exits 0 matches, 1 differs (each difference printed: a changed or missing file, another verdict, a planted bug no longer caught, a reproduction that changed), 4 cannot replay, or consistent but with nothing to anchor it (with the reason), 2, 3 and 5 as above.
il trace
Print the shortest path to a guarantee's break, step by step in plain words.
il trace retryIt checks the guarantee again first. il trace --relation <rel> searches the model loaded in a knowledge graph instead. Exits 0 when a path is printed, 4 when there is none (no reachable state breaks it, or the check could not give an answer, with the reason), 2 usage.
il check
The model checker: check one model and say whether each relation of violations is empty.
il check repeated_effect .inputlayer/models/derived/retry.iqlIt lints the model first, and with --strict a lint finding gives no verdict. Exits 0 every relation is empty, 1 one has rows, 4 no verdict (the model did not load cleanly), 2, 3 and 5 as above. --json prints inputlayer.verdict/1.
il recheck
Edit a model and check it again without computing its states again: only what the edit touches is recomputed.
il recheck before.iql after.iql repeated_effect il recheck <id> checks a guarantee again by its id. --verify also checks the edited model from scratch and compares the counts. Exits as il check. A re-check that differs from its --verify run exits 4.
Finding and proposing
il audit
Check a repository's guarantees, or those a diff touches, and report only the breaks that reproduce on its code.
il audit
il audit origin/main| Flag | Meaning |
|---|---|
--guarantees <file> | The guarantee file. Default .inputlayer/guarantees.yaml |
--diff <base> | Audit only the guarantees whose checks or covered code the changes since <base> touch |
--derive <path>... | Also audit the guarantees il derive proposes for these paths, as proposed ones |
--python <file> | The project's Python, with its packages, which runs the replays. Default python3 |
An audit writes only .inputlayer/audit/<run>/: AUDIT.md, audit.json (inputlayer.audit/1), and for each guarantee its verdict, its counterexample, its replay and the replay's output. A counterexample whose replay does not break the code is reported apart, as not reproduced. Nothing is a finding on the check's word alone.
Exits 0 no reproduced break, 1 a reproduced break or a break found in the check that was never tried on the code, 4 a guarantee could not be checked, 6 a check out of date, 2 usage.
il derive
Propose guarantees for the known patterns in the given paths, each with a check derived from the code's own steps. The plugin uses it to rebuild a check after Claude's edits, so Claude cannot grade its own homework.
il derive workspaces/
il derive workspaces/ | Flag | Meaning |
|---|---|
<path>... | Files or directories to derive from. Tests are skipped |
--out <dir> | Write each proposed check, and its planted bug, into this directory |
--check | Run each check and its planted bug, and propose only guarantees whose check runs and catches its planted bug. Needs --out |
--explain | Say why each function gave no proposal |
--site <family@path::function> | Re-derive one proposal on the code as it is now, or say why there is none |
--tree <dir> | Read the code as if run in another working tree |
A proposal is a suggestion. It is written with status: suggested and blocks nothing until a person accepts it. When nothing applies, il derive says what it searched.
il accept
Accept a suggested guarantee. Run it yourself, in your own terminal, with Claude Code closed.
il accept removedIt sets the guarantee's status to accepted in .inputlayer/guarantees.yaml, so the plugin's stop and il ci act on it. Commit the file and merge it to main through a normal pull request. il protect accept is its older name.
| Flag | Meaning |
|---|---|
<id> | The suggested guarantee to accept |
--without-replay | Accept a guarantee that has no replay. A break on it is tried on the code only by a Claude Code session with INPUTLAYER_REDERIVE=on; otherwise it is cannot tell (no way to reproduce it on the code here), which il ci exits 1 for |
--project <dir> | The project directory. Default $CLAUDE_PROJECT_DIR, else the working directory |
An agent does not accept a guarantee. When Claude Code is open in the project, il accept says so, and the acceptance is not enforced until you run it again with Claude Code closed. The Quickstart shows its output.
il protect coverage
List the code a change touched and which guarantee's check covers it. The rest is the uncovered diff that goes on the certificate.
il protect coverage origin/main| Flag | Meaning |
|---|---|
--diff <commit> | The commit to compare the working tree with. Default HEAD |
--checks-at <commit> | Read the guarantees and checks at this commit instead of the working tree, as CI does with the base branch |
--committed | Compare HEAD as committed, from the merge base, not the working tree |
--project <dir> | The project directory. Default $CLAUDE_PROJECT_DIR, else the working directory |
It reports each changed class, function or method as covered by <id> or not covered, and files no guarantee watches. Exits 0 whether or not anything is uncovered.
CI
il ci
Check every guarantee of a repository for a pull request's job, write the certificate, and exit with the result. See CI for the workflow.
il ci origin/main cert.json | Flag | Meaning |
|---|---|
--base <rev> | The base branch's commit the change is compared with: for the changed code no check covers, and with --certificate for its guarantees and checks |
--certificate <file> | Write the pull request's certificate (inputlayer.certificate/1) to this file. Needs --base |
--guarantees <file> | The guarantee file. Default .inputlayer/guarantees.yaml |
--only <id>... | Check only these guarantees. An id the file does not have is a usage error (exit 2) |
--github | Print GitHub annotations and append the summary table to $GITHUB_STEP_SUMMARY |
--fail-on-stale | Exit 6 when a check is older than the code it watches. Default: a warn line, except with --certificate, where a check not derived again in the run exits 6 |
--enforce-suggested | Let suggested guarantees decide the exit, as accepted ones do. Without it they are reported under "suggested, not enforced" |
--python <file> | The Python that runs the replayed tests, for --certificate. Default python3 |
--strict | With --certificate: a counterexample replayed on the code that did not reproduce exits 4 |
--server <url>, --api-key <key> | The engine to check on instead of a private one |
--server-bin <file> | The engine binary to start. Default: inputlayer-server beside il, else on PATH |
il ci comment posts a certificate on its pull request and updates il's earlier comment there, for a job that runs none of the pull request's code, with the job's GITHUB_TOKEN.
One line per guarantee, then a summary line. On InputLayer's checkout-quickstart example with its break, il ci --certificate cert.json prints:
The replay runs as a pytest test, so it needs pytest installed for the Python il ci runs (python3, or the one --python names). Without it the break is not reproduced: see CI.
| Exit | Outcome |
|---|---|
| 0 | Nothing blocks: every guarantee holds within bounds, or its break is pre-existing, or was replayed on the code and did not reproduce (exit 4 with --strict) |
| 1 | A guarantee is broken, reproduced on the real code, introduced by this change (an override does not change this exit); or the check found a break that was never tried on the code: no way to replay it, its test could not run, or its trace or replay ran out of time or could not be made (cannot tell on the certificate) |
| 2 | Usage. Nothing was checked |
| 3 | Access refused |
| 4 | A check could not run (cannot tell) |
| 5 | No engine could run the checks |
| 6 | A check no longer matches its code: by default when code a check is anchored to is gone or changed, and with --certificate when the code is newer than a check not derived again in the run; with --fail-on-stale, whenever the code is newer than the check |
When several apply, the worst wins: 5 > 3 > 4 > 1 > 6 > 0. With --json, il ci prints the certificate. Its fields are listed in CI.
il guarantee-diff
Say in plain words what a change to the guarantee file does, weakenings first.
il guarantee origin/main| Flag | Meaning |
|---|---|
--guarantees <file> | The guarantee file as it is now. Default .inputlayer/guarantees.yaml |
--base-ref <ref> | The base: a commit, branch or tag |
--base-file <file> | The base: another guarantee file |
--fail-on-weakening | Exit 7 when any change weakens a guarantee |
Each change is one line: a guarantee dropped, one that no longer blocks, a smaller bound, something more left out. A reworded sentence or bounds that cannot be compared are listed as "to read". Exits 0, 7 with --fail-on-weakening, 2 usage.
il codeowners
Keep the guarantee files with their code owners.
il codeowners write @acme/workspace
il codeowners check
il codeowners approval| Subcommand | What it does | Exits |
|---|---|---|
write --owner <owner>... [--root <dir>] | Writes a marked block at the end of CODEOWNERS that gives these owners the guarantee files and every file a check is made of (.inputlayer/checks/, models/, mutants/). --checks is accepted and does nothing | 0, 2 |
check [--root <dir>] | Says whether the block is there, current and last | 0 ok, 1 missing, out of date or overridden |
approval | A pull request's check: each changed guarantee file needs an approval of the head commit by one of its owners, as the base commit's CODEOWNERS names them | 0 no change or each approved, 1 a change without its owner's approval, 4 cannot tell (git or the GitHub API), 2 usage |
approval takes --base <sha>, --head <sha>, --pr <n>, --repo <owner/name> (env GITHUB_REPOSITORY), --token (env GITHUB_TOKEN), --api-url and --json-out <file>. In a pull request's GitHub job, the commits, number and repository come from the event.
Change requests and review
il change-request
File, list, read and close requests to change a guarantee.
il change open removed "The task asks that whoever started a job can read and cancel it, also after they are removed." conflicts
il change list
il change show removed
il change close removed guarantee "A removed member loses access at once, including to their own runs."| Subcommand | Flags | What it does |
|---|---|---|
open <id> | --belief <text>, --kind guarantee-wrong | conflicts-with-task | repairs-failed (default guarantee-wrong) | Writes .inputlayer/change-requests/<id>-<n>.json with the belief and the evidence. Changes no verdict |
list | Lists requests, open ones first | |
show <request> | Prints one request in full | |
close <request> | --decision guarantee-changed | guarantee-kept, --note <text> | Records a person's decision. Refused without a terminal on standard input, and inside an agent session |
All take --project <dir>.
il protect review
Mark a guarantee's check as wrong, not the code, at a person's word.
il protect review removed "The check leaves out the middleware that closes sockets on removal."Until the check is rebuilt or a new session starts, the guarantee is cannot tell with the reason under_review. It is not checked and does not block, and the certificate says it is under review and who marked it. It is never holds within bounds.
il protect rederive
Rebuild a guarantee's check from the code as it is now, then check it.
il protect rederive removedThe old check is kept in .inputlayer/rederive/. If no rebuilt check passes InputLayer's own checks, the guarantee is cannot tell with the reason not_rederived.
Setup and integration
il doctor
Say whether the checker can run here, and how to fix what cannot.
il doctorIt checks the il that runs, the engine and that it starts, the replay runtime, the project's guarantee file, and that each check loads. Each item is ok, missing or broken, with a one-line fix. Exits 0 when every required item is ok, 1 otherwise. --json prints inputlayer.doctor/1.
il mcp
Serve InputLayer to an agent as an MCP server over stdio. The Claude Code plugin starts it for you, and Codex can use it as an MCP server. Public install is not available yet.
| Flag | Meaning |
|---|---|
--data-dir <dir> | Where a started engine keeps its files. Default: in memory ($XDG_RUNTIME_DIR or /dev/shm), else the temporary directory. Env: INPUTLAYER_SPAWN_DIR |
--server-bin <file> | The engine binary to start. Default: next to il, else on PATH. Env: INPUTLAYER_SERVER_BIN |
The first tool call that needs an engine starts one, later calls reuse it, and it stops when the session ends. The tools are listed in Agents.
il hook
Run one of the Claude Code plugin's hooks on its JSON input from stdin. You do not call this yourself.
il hook session | pre | post | stop | sessionSee Agents for what each hook does.
il guard check
Say whether the guarantee or check files changed outside il since the session started. Read-only. Exits 0 when nothing changed, 1 when something did, 4 when there is nothing to compare with.
il report
Print the end-of-task summary from check results given on stdin. The plugin's stop hook uses it to write .inputlayer/last-task.md.
Files il writes
| Path | What | Committed |
|---|---|---|
.inputlayer/guarantees.yaml | Guarantees. Only people edit it | yes |
.inputlayer/checks/ | Checks, written by il | yes |
.inputlayer/change-requests/ | Change requests | yes |
.inputlayer/evidence/<id>/ | Evidence bundles | locally; CI regenerates its own |
.inputlayer/audit/<run>/ | Audit reports | no |
.inputlayer/state.json, .inputlayer/last-task.md | Local results and the last task's summary | no (git-ignored) |