tofupilot agents-md
Last updated on November 10, 2026
The agents-md command writes the files a coding agent reads in a procedure project, so it uses the framework as this CLI implements it instead of what its training data remembers:
| File | Content |
|---|---|
AGENTS.md | A block between <!-- BEGIN:tofupilot-agent-rules --> and <!-- END:tofupilot-agent-rules -->: the edit, validate and run loop, the flags to test without hardware, the exit codes, and an index of the docs tofupilot docs prints. |
CLAUDE.md | @AGENTS.md, so Claude Code reads the same rules. Added to an existing CLAUDE.md that does not import it yet. |
.tofupilot/procedure.schema.json | The JSON Schema of procedure.yaml, as tofupilot schema prints it. |
.tofupilot/stubs/tofupilot_phase.pyi | Types of the parameters a phase receives by name: measurements, log, ui, unit, run, attach, config, secrets, inputs, phase. |
tofupilot agents-mdOnly the content between the markers belongs to the CLI. Anything you write above or below them is kept on every update. A file with one marker and not the other is refused, so a deleted line never swallows the rest of your file. tofupilot init writes the same files in a new project.
Automatic refresh
When the CLI runs under a coding agent (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, or any shell with AI_AGENT set), tofupilot validate and tofupilot run refresh the block and the .tofupilot/ files of the nearest AGENTS.md that already has the markers, within the repository. A CLI update then reaches the agent's instructions without anyone running agents-md again. The refresh never creates AGENTS.md or CLAUDE.md, and leaves alone a block written by a newer CLI, so teammates on different versions do not rewrite it back and forth. Line endings follow the file's. Set TOFUPILOT_AGENT_RULES=0 to turn the refresh off.
[DIR]
The project directory. Defaults to the current directory.
--json
Prints one object with the created and updated files. Both are empty when everything was already current.
How is this guide?
CLI
Learn how the TofuPilot CLI runs every subcommand for procedures, runs, units, stations, and the REST API from a single binary on macOS, Linux, and Windows.
tofupilot attachments
Drive the TofuPilot two-step upload directly from the terminal to script raw multipart uploads of reports, logs, and images outside the run flow.