Skip to main content
lager box dut manages the DUT context stored in /etc/lager/bench.json on a Lager Box. This context tells AI agents (via the MCP server) what the box tests: purpose, MCU, key peripherals, subsystem groupings, and references to schematics and datasheets. See Authoring DUT Context for the concepts and workflow.

Syntax

lager box dut [COMMAND] [OPTIONS]

Global Options

OptionDescription
--box TEXTLagerbox name or IP address
--helpShow help message and exit

Commands

CommandDescription
showPrint the current DUT context as JSON
editOpen the DUT context in $EDITOR for live editing
add-docAttach a schematic / datasheet / firmware reference to the DUT

Command Reference

Show

Print the current DUT context as JSON.
lager box dut show --box my-box

Edit

Round-trip the DUT context through $EDITOR (falls back to nano, then vi). On save, the new JSON is validated and written back to /etc/lager/bench.json.
lager box dut edit --box my-box
The editable block accepts these fields:
FieldMeaning
nameDUT slot name (e.g. main).
activeWhether this slot is the active DUT.
purposeOne-line description of what the box tests.
summaryMarkdown paragraph: what the DUT is, known quirks.
mcuThe DUT’s microcontroller (e.g. STM32H7).
key_peripheralsList of notable peripherals.
schematic_refs / datasheet_refs / firmware_refs / extra_docsLists of document references.
subsystemsFunctional blocks, each with name, summary, nets, and doc_refs.

Add Doc

Attach a single document reference to the active DUT without hand-editing JSON. The box records only a pointer — it does not store the file. The agent fetches and analyses it with its own tools.
lager box dut add-doc --kind schematic \
  --title "Main board" --repo-path docs/sch.pdf --pages 3-5 --box my-box
Options:
OptionDescription
--kindschematic, layout, datasheet, firmware, manual, errata, or other (default schematic).
--title TEXTHuman label for the document (required).
--url TEXTExternal URL.
--repo-path TEXTPath relative to your test project (synced to the box on lager python).
--pages TEXTOptional page/sheet hint, e.g. "3-5" or "POWER sheet".
--notes TEXTOptional free-form note.
You must supply at least one of --url or --repo-path. The reference is appended to the list matching --kind (schematicschematic_refs, datasheetdatasheet_refs, firmwarefirmware_refs; everything else → extra_docs).

After editing

The MCP server reads the bench config at startup. So agents see your changes, either have a connected agent call the box_manage tool with action="reload" (re-reads /etc/lager/bench.json and rebuilds the capability graph), or restart the box service.