CLI reference
Entrypoint: mechaharness (mechaharness.cli.main:app)
Commands
Command |
Purpose |
|---|---|
|
Print package version |
|
List configured inference backends |
|
List configured harness families |
|
Run one prompt via Agentic Recipe |
|
Start the FastAPI server |
|
Backend metadata via Agentic Recipe |
|
Catalog ids and descriptions (summaries) |
|
Full pydoc (module + class, including examples) + soft points |
|
SVG flowchart (own layout engine) + explanations below |
|
Execute a recipe ( |
run
Flag |
Env / default |
Description |
|---|---|---|
|
— |
User prompt |
|
|
Inference backend name |
|
|
Harness family ( |
|
|
Model id |
|
|
Provider API key |
|
|
Override endpoint |
|
|
System prompt |
|
|
Agent loop limit |
|
off |
Machine-readable result |
recipes
mechaharness recipes list
mechaharness recipes show harness_run
mechaharness recipes render harness_run
mechaharness recipes render harness_run -o /tmp/harness_run.svg --tool lookup
mechaharness recipes run harness_run --soft prompt="hello" --soft backend=mock
list prints each catalog id with its human summary (what the recipe does).
show prints that summary plus the full template pydoc (module + class
docstrings, including Example: blocks) and the soft-point table. --json
includes a doc field from GraphTemplate.describe().
render instantiates the recipe (with safe defaults / --soft / --input),
derives node components, and writes an SVG from
MechaHarness’s layout engine (recipe_diagram — no Mermaid/Graphviz). Default
output path is NAME.svg in the cwd (--out / -o to override). Outer edges
are recipe execution (prepare → harness_loop → render), attaching to the
container box whose title is the graph node name (e.g. harness_loop).
Interiors use flowchart start/end circles and sequential then edges, laid
out about three steps per row. Parallel fan-out / fan-in siblings collapse
into one stack band with a single outer arrow (no lines crossing sibling
boxes). Configuration soft points are ER-style tables (name | type | value) on leaf nodes. Concrete steps stay square. Explanations follow
below. Use --tool NAME to preview planned tool steps.
serve
Flag |
Env / default |
Description |
|---|---|---|
|
|
Bind host |
|
|
Bind port |
|
off |
Uvicorn auto-reload |
describe
mechaharness describe lmstudio
Runs Agentic Recipe backend_describe (Strategy describe() metadata).