@uwmd/cli
v2.13.0
Published
Command-line installer for UW Markdown — `npx uwmd init|parse|validate|render|run` for .uw.md underwriting files. Thin wrapper over @uwmd/core.
Maintainers
Readme
uwmd — UW Markdown CLI
The standalone command-line installer for UW Markdown — an open standard for commercial real-estate underwriting documents.
This package is a thin wrapper around @uwmd/core so that anyone can use the tooling without cloning the monorepo.
Install
No install needed — run via npx:
npx @uwmd/cli <command> [args]Or install globally:
npm install -g @uwmd/cli
uwmd <command> [args]Commands
| Command | What it does |
|---|---|
| uwmd init <file> | Scaffold a blank .uwx.md deal file |
| uwmd parse <file> | Parse and emit canonical JSON |
| uwmd validate <file> | Run the full Tier-1 validator and print issues |
| uwmd render <file> | Render to chat, summary, or full markdown |
| uwmd edit <file> <op.json> | Apply a Tier-2 EditOperation and write back |
| uwmd calc <file> <calc.json> | Evaluate a Tier-3 calc declaration |
| uwmd run <file> | Invoke UWMD optional Claude-backed Bancroft reference agent suite |
| uwmd compact <file> | Strip narrative; emit the canonical JSON-only form |
| uwmd diff <a> <b> | Diff two .uw.md files at the section level |
| uwmd summary <file> | One-screen deal summary |
| uwmd export <file.uw.md> | Write a digested, model-lossless .uw.json sibling |
| uwmd formats | List registered machine representations |
| uwmd convert <file> --to uw-json\|uw-xml\|uw-csv-bundle | Convert Markdown, verified JSON/XML, or normalized CSV ZIP bundles |
| uwmd layers <file> | Show the agent-context layer breakdown |
The source checkout also implements the unreleased read-only command
uwmd verify-cash-flows <file> [--variant <name>] [--json]. It checks stated
dated-cash-flow metrics with the existing verifier. Exit 0 means nonempty verified
claims, 1 means failure/input refusal, and 3 means unverifiable or no stated
metrics. This command is not included in CLI 2.9.0. See the
workflow and limitations.
The source checkout also implements the unreleased read-only command
uwmd inspect-property-cash-flows <file> [--json]. It inventories exact
lease-up variants, periods, supplemental rows and stated metric names so an
author can prepare an RFC 0045 assembly plan without guessing the source
shape. It never assigns cash-flow categories, dates, zeros or assertions. See
the workflow and limitations.
Run any command without arguments for usage help.
Calculation context files (source implementation)
The source checkout adds --calc-context <JSON file> to calc and refine.
This flag is included in the 2.8.0 release line. After building the
checkout, run from the repository root:
npm run cli -- calc deal.uwx.md "[email protected]" --calc-context context.json --json
npm run cli -- refine deal.uwx.md --targets year_three_noi_per_unit --calc-context context.json --jsonyear_three_noi_per_unit must be a calculation declared in the deal. A context
file can contain {"sectionVariants":{"dcf":"base"},"overrides":{}}.
Variants select period references only. Overrides use exact paths and JSON
scalars, preserving zero and null. calc supports ordinary and period overrides;
refine rejects ordinary scalar overrides and requires canonical period keys.
Inspect refinement's diagnostics.period_inputs for excluded outputs.
See the complete source guide for context validation, missing inputs, Excel export and library usage.
Library use
If you're writing TypeScript / JavaScript and need programmatic access to the parser, validator, renderer, or calc engine, depend on @uwmd/core directly:
npm install @uwmd/coreimport { parseUWFile, validateUWFile, evaluateCalc } from '@uwmd/core';Conformance
This CLI is the reference implementation of the UW Markdown protocol's Tier-1 (Reader), Tier-2 (Editor), Tier-3 (Calc Host), and Tier-4 (Agent Host) conformance levels. See the protocol spec for what each tier guarantees.
License
MIT © UW Markdown contributors.
Project verified lease-up amounts (2.8.0)
uwmd project-lease-up deal.uwx.md cash-dates.json --jsonThe plan requires exact source_variant, explicit day_count and a complete
cash_dates array of { period, date } mappings. Success emits a JSON candidate
with source digest and binding evidence. Refusals exit 1 and retain nested
diagnostics with --json. No input files are edited. This partial stream covers
rent receipts, concessions and TI/LC only; it is not a complete DCF.
Property cash-flow assembly (2.9.0)
uwmd assemble-property <file> <plan.json> [--json] emits a read-only candidate
for explicitly covered unlevered, pre-tax cash flows in one declared currency.
It preserves source evidence and refuses missing or overlapping coverage. The
plan and source are not edited; no financial inputs are inferred. CLI 2.9.0
includes this command under Protocol 2.12.0.
See the synthetic workflow.
