@xvml/cli 0.1.0

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 ADDED
@@ -0,0 +1,96 @@
1
+ # @xvml/cli
2
+
3
+ **XVML** (eXpressive Visual Markup Language) — write plain text, render live UI.
4
+
5
+ XVML sits between Markdown and HTML: as readable as Markdown, as structured as HTML.
6
+ The CLI compiles `.xvml` files into fully self-contained, deterministic HTML — all CSS inlined,
7
+ no CDN links, no external fonts.
8
+
9
+ ---
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @xvml/cli
15
+ ```
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ xvml init # scaffold CLAUDE.md + .xvmlrc in the current project
21
+ xvml render login.xvml # compile one file → docs/login.html
22
+ xvml build # compile every .xvml file in the project
23
+ ```
24
+
25
+ ## All commands
26
+
27
+ | Command | Description |
28
+ |---|---|
29
+ | `xvml init` | Create `CLAUDE.md` and `.xvmlrc` |
30
+ | `xvml render <file.xvml>` | Render one file to `docs/<name>.html` |
31
+ | `xvml render <file.xvml> --watch` | Re-render on every save |
32
+ | `xvml build` | Render all `.xvml` files in the project |
33
+ | `xvml check <file\|dir>` | Spec compliance check, exits 1 on errors |
34
+ | `xvml ask "<task>"` | Ask Claude to generate + render a XVML page |
35
+
36
+ ## AI integration
37
+
38
+ ```bash
39
+ export ANTHROPIC_API_KEY=sk-ant-...
40
+
41
+ xvml ask "Incident dashboard with alerts and service health"
42
+ xvml ask "user settings page" --out settings
43
+ xvml ask "billing page" --model claude-opus-4-8
44
+ xvml ask "simple card" --print # preview without saving
45
+ ```
46
+
47
+ Requires an [Anthropic API key](https://console.anthropic.com/settings/keys). Uses `temperature: 0` — same prompt always produces the same XVML.
48
+
49
+ ---
50
+
51
+ ## Example
52
+
53
+ ```
54
+ @page login
55
+ @card
56
+ @title "Welcome back"
57
+ @subtitle "Sign in to your account"
58
+ @field email "Email address"
59
+ @field password "Password" secret
60
+ @checkbox "Remember me"
61
+ @button "Sign in" primary
62
+ @divider "or"
63
+ @button "Continue with Google" secondary
64
+ @link "Don't have an account? Sign up"
65
+ @end
66
+ ```
67
+
68
+ `xvml render login.xvml` produces `docs/login.html` — a single, self-contained file with all
69
+ styles inlined. Same input always produces byte-identical output.
70
+
71
+ ---
72
+
73
+ ## Why XVML?
74
+
75
+ | | Markdown | HTML | **XVML** |
76
+ |---|---|---|---|
77
+ | Human-readable source | ✓ | ✗ | **✓** |
78
+ | Renders interactive UI | ✗ | ✓ | **✓** |
79
+ | No build toolchain | ✓ | ✓ | **✓** |
80
+ | Self-contained output | — | ✗ | **✓** |
81
+ | Deterministic | ✓ | — | **✓** |
82
+
83
+ ---
84
+
85
+ ## Spec
86
+
87
+ See [`XVML_SPEC.md`](./XVML_SPEC.md) for the full language reference — every `@command`,
88
+ its arguments, and the HTML it renders to.
89
+
90
+ ---
91
+
92
+ ## Links
93
+
94
+ - **GitHub:** [github.com/kumarrajdevops/xvml](https://github.com/kumarrajdevops/xvml)
95
+ - **npm:** [@xvml/cli](https://npmjs.com/package/@xvml/cli)
96
+ - **Issues:** [github.com/kumarrajdevops/xvml/issues](https://github.com/kumarrajdevops/xvml/issues)