@toon-ui/cli 0.1.2-beta.1 → 0.2.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 +63 -7
- package/dist/index.js +0 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# @toon-ui/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@toon-ui/cli` gives you terminal tooling for ToonUI validation and AST inspection.
|
|
4
|
+
|
|
5
|
+
Use it when you want:
|
|
6
|
+
|
|
7
|
+
- CI validation
|
|
8
|
+
- quick debugging of generated ToonUI
|
|
9
|
+
- AST inspection without writing scripts
|
|
4
10
|
|
|
5
11
|
---
|
|
6
12
|
|
|
@@ -10,7 +16,7 @@ CLI tools for validating and inspecting ToonUI files.
|
|
|
10
16
|
pnpm add -D @toon-ui/cli
|
|
11
17
|
```
|
|
12
18
|
|
|
13
|
-
Or run it
|
|
19
|
+
Or run it ad hoc:
|
|
14
20
|
|
|
15
21
|
```bash
|
|
16
22
|
pnpm dlx @toon-ui/cli validate example.toon
|
|
@@ -45,11 +51,61 @@ form "Crear producto":
|
|
|
45
51
|
|
|
46
52
|
---
|
|
47
53
|
|
|
48
|
-
##
|
|
54
|
+
## Server integration
|
|
55
|
+
|
|
56
|
+
`@toon-ui/cli` is useful in server-side workflows and CI, not as a runtime dependency for production rendering.
|
|
57
|
+
|
|
58
|
+
Example validation script:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"scripts": {
|
|
63
|
+
"validate:toon": "toon-ui validate samples/create-product.toon"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Example CI step:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm dlx @toon-ui/cli validate ./fixtures/example.toon
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Frontend integration
|
|
77
|
+
|
|
78
|
+
There is no direct frontend integration.
|
|
79
|
+
|
|
80
|
+
This package does NOT render UI and does NOT belong in browser code.
|
|
81
|
+
|
|
82
|
+
Pair it with:
|
|
83
|
+
|
|
84
|
+
- `@toon-ui/core` for server/runtime utilities
|
|
85
|
+
- `@toon-ui/react` or `@toon-ui/toon-ui` for frontend rendering
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Typical workflow
|
|
90
|
+
|
|
91
|
+
1. Your model emits a `toon-ui` block.
|
|
92
|
+
2. You save that block into a fixture file.
|
|
93
|
+
3. You run `toon-ui validate fixture.toon`.
|
|
94
|
+
4. You inspect the AST with `toon-ui inspect fixture.toon`.
|
|
95
|
+
5. You fix either the prompt or the generated output.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Boundary
|
|
100
|
+
|
|
101
|
+
`@toon-ui/cli` owns:
|
|
49
102
|
|
|
50
|
-
|
|
103
|
+
- file-based validation
|
|
104
|
+
- AST inspection
|
|
105
|
+
- local debugging ergonomics
|
|
51
106
|
|
|
52
|
-
|
|
53
|
-
- inspect AST output during development
|
|
54
|
-
- debug grammar problems quickly
|
|
107
|
+
It does NOT own:
|
|
55
108
|
|
|
109
|
+
- prompt composition
|
|
110
|
+
- rendering
|
|
111
|
+
- chat orchestration
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toon-ui/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CLI utilities for validating and inspecting ToonUI files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"toon-ui",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"default": "./dist/index.js"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@toon-ui/core": "0.2.0"
|
|
41
|
+
},
|
|
39
42
|
"scripts": {
|
|
40
43
|
"build": "tsc -p tsconfig.json",
|
|
41
44
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
42
45
|
"lint": "tsc -p tsconfig.json --noEmit"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@toon-ui/core": "0.1.2-beta.1"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|