The CLI (am)
@agentmark/cli is a thin wrapper over @agentmark/core. It projects views, enforces the linter,
and reports staleness from the terminal or CI.
am render <file> [--view <name>] [--to mermaid|svg] [--direction LR|TB] [-o <out>]
am lint <file> [--strict]
am stale <file> [--today YYYY-MM-DD]
am views <file>
am --version | --help
Exit codes: 0 ok · 1 problem found (lint errors / stale) · 2 usage error — so it drops straight
into CI.
render
Project a view to SVG or Mermaid (PNG export is web-only — it needs a rasterizer).
am render hermes.agentmark --view topology --to svg -o topology.svg
am render hermes.agentmark --view decision --to mermaid
am render hermes.agentmark --direction TB --to svg -o top-down.svg
lint
Enforce the central rule. Without --strict, unknown keys are warnings; with it, they're errors.
$ am lint hermes.agentmark
WARNING W-7 line 95: Matrix "Coding Agent Candidates" should carry review_by.
0 error(s), 1 warning(s).
stale
Report claims/decisions past review_by or whose invalid_if conditions reference expired claims.
The core never reads the clock — pass --today (defaults to the real date).
$ am stale hermes.agentmark --today 2026-07-01
STALE claim C-001 expired on 2026-06-16.
STALE decision D-001 — depends on expired claim C-001.
views
List the views a document declares:
$ am views hermes.agentmark
topology
decision
risk
In CI
am lint arch.agentmark # fail the build on documentation errors
am stale arch.agentmark # fail when the architecture has gone stale