@uwmd/cli 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/bin/uwmd.mjs +18 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# `uwmd` — UW Markdown CLI
|
|
2
|
+
|
|
3
|
+
The standalone command-line installer for [UW Markdown](https://github.com/jaredmaxey/uw-markdown) — an open standard for commercial real-estate underwriting documents.
|
|
4
|
+
|
|
5
|
+
This package is a thin wrapper around [`@uwmd/core`](https://www.npmjs.com/package/@uwmd/core) so that anyone can use the tooling without cloning the monorepo.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
No install needed — run via `npx`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx uwmd <command> [args]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or install globally:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g uwmd
|
|
19
|
+
uwmd <command> [args]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
| Command | What it does |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `uwmd init <file>` | Scaffold a blank `.uw.md` deal file |
|
|
27
|
+
| `uwmd parse <file>` | Parse and emit canonical JSON |
|
|
28
|
+
| `uwmd validate <file>` | Run the full Tier-1 validator and print issues |
|
|
29
|
+
| `uwmd render <file>` | Render to `chat`, `summary`, or full markdown |
|
|
30
|
+
| `uwmd edit <file> <op.json>` | Apply a Tier-2 `EditOperation` and write back |
|
|
31
|
+
| `uwmd calc <file> <calc.json>` | Evaluate a Tier-3 calc declaration |
|
|
32
|
+
| `uwmd run <file>` | Invoke the Tier-4 Bancroft agent host |
|
|
33
|
+
| `uwmd compact <file>` | Strip narrative; emit the canonical JSON-only form |
|
|
34
|
+
| `uwmd diff <a> <b>` | Diff two `.uw.md` files at the section level |
|
|
35
|
+
| `uwmd summary <file>` | One-screen deal summary |
|
|
36
|
+
| `uwmd export <file.uw.md>` | Write a digested, model-lossless `.uw.json` sibling |
|
|
37
|
+
| `uwmd formats` | List registered machine representations |
|
|
38
|
+
| `uwmd convert <file> --to uw-json\|uw-xml\|uw-csv-bundle` | Convert Markdown, verified JSON/XML, or normalized CSV ZIP bundles |
|
|
39
|
+
| `uwmd layers <file>` | Show the agent-context layer breakdown |
|
|
40
|
+
|
|
41
|
+
Run any command without arguments for usage help.
|
|
42
|
+
|
|
43
|
+
## Library use
|
|
44
|
+
|
|
45
|
+
If you're writing TypeScript / JavaScript and need programmatic access to the parser, validator, renderer, or calc engine, depend on [`@uwmd/core`](https://www.npmjs.com/package/@uwmd/core) directly:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install @uwmd/core
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import { parseUWFile, validateUWFile, evaluateCalc } from '@uwmd/core';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Conformance
|
|
56
|
+
|
|
57
|
+
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](https://github.com/jaredmaxey/uw-markdown/blob/main/spec/UW_PROTOCOL_v1.md) for what each tier guarantees.
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
[MIT](https://github.com/jaredmaxey/uw-markdown/blob/main/LICENSE) © UW Markdown contributors.
|
package/bin/uwmd.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// uwmd — standalone CLI installer for the UW Markdown standard.
|
|
3
|
+
//
|
|
4
|
+
// This is a thin wrapper that re-exposes the CLI from @uwmd/core so that
|
|
5
|
+
// non-developers can run:
|
|
6
|
+
//
|
|
7
|
+
// npx uwmd init # scaffold a blank .uw.md file
|
|
8
|
+
// npx uwmd parse # parse and inspect a deal file
|
|
9
|
+
// npx uwmd validate # run the full conformance validator
|
|
10
|
+
// npx uwmd render # render to chat / summary / markdown
|
|
11
|
+
// npx uwmd edit # apply a Tier-2 EditOperation
|
|
12
|
+
// npx uwmd calc # evaluate a Tier-3 calc declaration
|
|
13
|
+
// npx uwmd run # invoke the Tier-4 agent host
|
|
14
|
+
//
|
|
15
|
+
// All implementation lives in @uwmd/core; this package exists purely so
|
|
16
|
+
// people who haven't cloned the repo can `npx uwmd ...` straight from npm.
|
|
17
|
+
|
|
18
|
+
import '@uwmd/core/cli';
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uwmd/cli",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "Command-line installer for UW Markdown — `npx uwmd init|parse|validate|render|run` for .uw.md underwriting files. Thin wrapper over @uwmd/core.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/jaredmaxey/uw-markdown.git",
|
|
8
|
+
"directory": "packages/uwmd-cli"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://uwmd.org",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"bin": {
|
|
13
|
+
"uwmd": "bin/uwmd.mjs"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"prepublishOnly": "npm --prefix ../uwmd-core run build && npm --prefix ../.. test && npm --prefix ../.. run conformance && npm --prefix ../.. run validate-schemas"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@uwmd/core": "1.1.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^20.0.0",
|
|
28
|
+
"typescript": "^5.4.0",
|
|
29
|
+
"vitest": "^3.2.6"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"uwmd",
|
|
37
|
+
"underwriting",
|
|
38
|
+
"commercial-real-estate",
|
|
39
|
+
"cli",
|
|
40
|
+
"markdown"
|
|
41
|
+
]
|
|
42
|
+
}
|