The lewron command is the console entry point. Every invocation is a subcommand:
lewron <command> [arguments] [flags]Run lewron --help or lewron <command> --help for the built-in help.
All commands return exit code 0 on success and a nonzero code on failure; errors are rendered as a clean panel rather than a Python traceback. Set LEWRON_DEBUG=1 in the environment to also print the full traceback when debugging.
These flags are shared by run, stage, revise, and report. They are optional; both default to Sonnet.
| Flag | Default | Applies to |
|---|---|---|
--reasoning-model <id> |
claude-sonnet-4-6 |
auditing, physics reasoning, the report writer, bootstrap |
--coding-model <id> |
claude-sonnet-4-6 |
code generation |
--thinking-budget <int> |
unset | extended-thinking token budget for reasoning calls |
The selected models are recorded in the run's state.json, so a finished run documents which models produced it. See Python API → ModelConfig for the equivalent in code.
lewron run --input <file-or-prompt> [--run-dir <dir>] [--allow-bypass] [model flags]
lewron run --run-dir <dir> # resume an existing runRuns the full toolbox pipeline and, when the build includes thermal analysis, flows straight into the Explorer. The build depth is inferred from your request — there is no build-mode flag.
| Argument / flag | Required | Meaning |
|---|---|---|
--input |
to start a run | Path to an input file, or an inline prompt string. Omit it to resume. |
--run-dir |
to resume | Output directory. When starting a run it defaults to a directory named after the model. When resuming, it must already contain state.json. |
--allow-bypass |
no | Enables the Explorer's /bypass mode (skips all permission checks). Off by default; the Explorer's /edit auto-edit mode works without it. |
To resume, pass --run-dir with no --input; LeWRON continues from the last completed stage, or re-enters the Explorer if the toolbox is already built.
lewron revise <stage> "<feedback>" --run-dir <dir> [--run] [model flags]Resets <stage> and all downstream stages, attaches your feedback, and re-derives. Stages that can be revised: 1a, 1b, 2a, 2b. (Bootstrap and the finite-T stage are not revised this way.)
| Argument / flag | Required | Meaning |
|---|---|---|
<stage> |
yes | Stage to revise. |
<feedback> |
yes | Free-form text guiding the revision, e.g. "Use the paper's Higgs-basis convention." |
--run-dir |
yes | Existing run directory. |
--run |
no | Immediately resume the pipeline after queuing the feedback. Without it, the feedback is queued and LeWRON prints the lewron run command to apply it later. |
For the tree-level stage, a revision is scoped automatically to the part of the derivation your feedback targets plus whatever depends on it — earlier and independent work is preserved. See The interactive workflow.
lewron reset <stage> --run-dir <dir> [--yes]Resets <stage> and all downstream stages back to not-run, discarding their generated outputs. Use it to redo a stage from scratch (as opposed to revise, which re-derives with guidance). For finer-grained control, the Python API also exposes reset_substep, which resets a single Stage 1b substep and the substeps after it.
| Argument / flag | Required | Meaning |
|---|---|---|
<stage> |
yes | Stage to reset (1a, 1b, 2a, 2b, 3). Downstream stages reset automatically. |
--run-dir |
yes | Existing run directory. |
--yes, -y |
no | Skip the confirmation prompt. |
lewron report --run-dir <dir> [--stage <stage>] [model flags]Regenerates notes/report.md from the artifacts already in the run, without rerunning any stage. This is the recovery path when a report write was interrupted but the artifacts are intact.
| Argument / flag | Required | Meaning |
|---|---|---|
--run-dir |
yes | Existing run directory. |
--stage |
no | Which stage to report on. Defaults to the last completed stage. |
lewron install-skill [--uninstall]Packages your physics priors as a global lewron-physics Claude Code skill under ~/.claude/skills/, so a plain Claude Code session can draw on them (run /lewron-physics, or let Claude load them on its own when you work on a phase transition). It is built from your effective experience library, so re-run it to refresh after editing your priors. This command is not tied to a run directory.
| Argument / flag | Required | Meaning |
|---|---|---|
--uninstall |
no | Remove the installed skill instead of installing it. |
lewron stage <stage> --run-dir <dir> [model flags]Runs one toolbox stage in an existing run that already has all prior stages completed. Stage keys: 1a, 1b, 2a, 2b, 3. A normal analysis uses run instead; stage is for re-running an individual stage during development.
When a command pauses for you, pressing Enter accepts the default and typing quit or exit stops cleanly. The exact keyword contract is described in The interactive workflow.