← Docs

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.

bash
il <command> [flags]
il <command> --help

Global flags

FlagMeaning
--jsonPrint 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.

ExitMeans
0Holds within bounds, or the command did what it was asked
1Broken, reproduced on the real code (or, for il replay, the bundle did not replay as recorded)
2Usage: a bad flag, a missing or unreadable guarantee file, an unknown id. Nothing was checked
3Access refused: a key the engine refused
4Cannot tell: the check could not give a verdict. The reason is printed
5No engine could run the check
6il ci and il audit: a check no longer matches its code
7il guarantee-diff --fail-on-weakening only: a change weakens a guarantee
130Interrupted

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:

retry-once-payments-checkoutclient-pay: holds within boundsil audit: 0 reproduced finding(s) of 1 guarantee(s) checked; exit 0; report in .inputlayer/audit/20261204T223105Z/AUDIT.md

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.

bash
il evidence retry-once-payments-checkoutclient-pay --spawn
FlagMeaning
<id>The guarantee's id in the guarantee file
--guarantees <file>The guarantee file. Default .inputlayer/guarantees.yaml
--spawnStart 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:

retry-once-payments-checkoutclient-pay: holds within bounds Says: One call to pay makes self.network.call take effect at most once, also when a reply is lost and pay retries. Evidence: bounded model check of a model written from the code (19 states) Scope: Checked for one call; any request or reply may be lost; each retry loop run at most twice. Assumed, not checked: the far side of self.network.call honours a repeated key. Outside this check: process crashes; concurrent calls.Evidence bundle: .inputlayer/evidence/retry-once-payments-checkoutclient-pay (run it again with `il replay .inputlayer/evidence/retry-once-payments-checkoutclient-pay`)

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.

bash
il replay .inputlayer/evidence/retry-once-payments-checkoutclient-pay --spawn

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.

FlagMeaning
<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-engineReplay on an engine build other than the recorded one, and say so
--spawnStart 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.

bash
il trace retry-once-payments-checkoutclient-pay

It 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.

bash
il check --check repeated_effect .inputlayer/models/derived/retry-once-payments-checkoutclient-pay.iql

It 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.

bash
il recheck --model before.iql --edit after.iql --check repeated_effect --spawn

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.

bash
il audit
il audit --diff origin/main
FlagMeaning
--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.

bash
il derive workspaces/
il derive workspaces/ --explain
FlagMeaning
<path>...Files or directories to derive from. Tests are skipped
--out <dir>Write each proposed check, and its planted bug, into this directory
--checkRun each check and its planted bug, and propose only guarantees whose check runs and catches its planted bug. Needs --out
--explainSay 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.

bash
il accept removed-member-no-access

It 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.

FlagMeaning
<id>The suggested guarantee to accept
--without-replayAccept 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.

bash
il protect coverage --diff origin/main
FlagMeaning
--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
--committedCompare 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.

bash
il ci --base origin/main --certificate cert.json --github
FlagMeaning
--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)
--githubPrint GitHub annotations and append the summary table to $GITHUB_STEP_SUMMARY
--fail-on-staleExit 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-suggestedLet 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
--strictWith --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:

FAIL retry-once-payments-checkoutclient-pay: broken, reproduced on the real code. derived again from the head's code by il derive, its break replayed on the head and the base its test failed in 20 of 20 runs on this change's code, and in 0 of 20 on the base's codeil ci: 1 guarantee(s): 1 broken, reproduced on the real code (exit 1)

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.

ExitOutcome
0Nothing 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)
1A 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)
2Usage. Nothing was checked
3Access refused
4A check could not run (cannot tell)
5No engine could run the checks
6A 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.

bash
il guarantee-diff --base-ref origin/main
FlagMeaning
--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-weakeningExit 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.

bash
il codeowners write --owner @acme/workspace-leads
il codeowners check
il codeowners approval
SubcommandWhat it doesExits
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 nothing0, 2
check [--root <dir>]Says whether the block is there, current and last0 ok, 1 missing, out of date or overridden
approvalA 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 them0 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.

bash
il change-request open removed-member-no-access --belief "The task asks that whoever started a job can read and cancel it, also after they are removed." --kind conflicts-with-task
il change-request list
il change-request show removed-member-no-access-1
il change-request close removed-member-no-access-1 --decision guarantee-kept --note "A removed member loses access at once, including to their own runs."
SubcommandFlagsWhat 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
listLists 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.

bash
il protect review removed-member-no-access --reason "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.

bash
il protect rederive removed-member-no-access

The 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.

bash
il doctor

It 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.

FlagMeaning
--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.

bash
il hook session-start | pre-tool-use | post-tool-use | stop | session-end

See 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

PathWhatCommitted
.inputlayer/guarantees.yamlGuarantees. Only people edit ityes
.inputlayer/checks/Checks, written by ilyes
.inputlayer/change-requests/Change requestsyes
.inputlayer/evidence/<id>/Evidence bundleslocally; CI regenerates its own
.inputlayer/audit/<run>/Audit reportsno
.inputlayer/state.json, .inputlayer/last-task.mdLocal results and the last task's summaryno (git-ignored)

AI shouldn't certify its own code.

Public install is not available yet. The Quickstart shows what InputLayer printed on an example.

Rather we check one service for you first? Book an audit →