tutuca 0.9.56 → 0.9.57
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 +25 -21
- package/dist/tutuca-cli.js +1129 -541
- package/dist/tutuca-dev.js +11 -3
- package/dist/tutuca-dev.min.js +2 -2
- package/dist/tutuca-extra.js +5 -1
- package/dist/tutuca-extra.min.js +1 -1
- package/dist/tutuca.js +5 -1
- package/dist/tutuca.min.js +1 -1
- package/package.json +2 -2
- package/skill/tutuca/cli.md +82 -29
- package/skill/tutuca/core.md +7 -7
- package/skill/tutuca/testing.md +5 -5
package/README.md
CHANGED
|
@@ -80,21 +80,24 @@ The package exposes `tutuca` via `bin`, so `npx tutuca` (or a global `npm i -g t
|
|
|
80
80
|
### Commands
|
|
81
81
|
|
|
82
82
|
```
|
|
83
|
-
tutuca <module-path>
|
|
83
|
+
tutuca <command> <module-path> [args] [flags]
|
|
84
84
|
tutuca help [command]
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
| Command | What it does |
|
|
88
88
|
|---|---|
|
|
89
|
-
| `
|
|
90
|
-
| `list
|
|
91
|
-
| `examples
|
|
92
|
-
| `
|
|
93
|
-
| `lint [name]` | Run lint checks — all, or one by name (exit 2 on errors) |
|
|
94
|
-
| `render [name] [--title t] [--view v]` | Render examples to HTML |
|
|
95
|
-
| `
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
| `get <module>` | Export inventory and counts for the module |
|
|
90
|
+
| `list <module>` | List components and their fields/views |
|
|
91
|
+
| `examples <module>` | List the examples defined in the module's section |
|
|
92
|
+
| `show <module> [name]` | Component API docs — all, or one by name |
|
|
93
|
+
| `lint <module> [name]` | Run lint checks — all, or one by name (exit 2 on errors) |
|
|
94
|
+
| `render <module> [name] [--title t] [--view v]` | Render examples to HTML |
|
|
95
|
+
| `test <module> [name] [--grep p] [--bail]` | Run `getTests()` (exit 4 on failures) |
|
|
96
|
+
| `feedback [message]` | Append a feedback note (positional or stdin) to `~/.tutuca/feedback.jsonl` (no module path needed) |
|
|
97
|
+
| `install-skill [--user\|--project] [--margaui-skill\|--immutable-skill\|--all] [--dot-agents] [--dry-run] [--force]` | Install bundled Claude Code skills (no module path needed) |
|
|
98
|
+
| `agent-context` | Print a versioned JSON schema of the entire CLI surface (no module path needed) |
|
|
99
|
+
|
|
100
|
+
Global flags: `--json`, `-f, --format <cli\|md\|json\|html>`, `-o, --output <file>`, `--pretty`, `--module <path>`, `-h, --help`.
|
|
98
101
|
|
|
99
102
|
Exit codes:
|
|
100
103
|
|
|
@@ -102,39 +105,40 @@ Exit codes:
|
|
|
102
105
|
- `1` — usage error (bad args, missing module, bad module shape)
|
|
103
106
|
- `2` — `lint` reported errors
|
|
104
107
|
- `3` — `render` crashed while rendering
|
|
108
|
+
- `4` — `test` reported failures
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
Errors carry stable codes (`ERR_USAGE_*`, `ERR_FORMAT_*`, `ERR_SKILL_*`) and "did you mean" suggestions for unknown commands and flags. Under `--json`, errors are emitted as a single-line JSON envelope on stderr.
|
|
107
111
|
|
|
108
112
|
### Usage examples
|
|
109
113
|
|
|
110
114
|
```sh
|
|
111
115
|
# Summary of what the module exports
|
|
112
|
-
npx tutuca ./src/components.js
|
|
116
|
+
npx tutuca get ./src/components.js
|
|
113
117
|
|
|
114
118
|
# API docs for one component, as markdown
|
|
115
|
-
npx tutuca ./src/components.js
|
|
119
|
+
npx tutuca show ./src/components.js Button --format md -o docs/button.md
|
|
116
120
|
|
|
117
121
|
# Render every example to HTML, pretty-printed
|
|
118
|
-
npx tutuca ./src/components.js
|
|
122
|
+
npx tutuca render ./src/components.js --format html --pretty -o dist/examples.html
|
|
119
123
|
|
|
120
124
|
# Render a single named example
|
|
121
|
-
npx tutuca ./src/components.js
|
|
125
|
+
npx tutuca render ./src/components.js Button --title "Disabled state"
|
|
122
126
|
|
|
123
127
|
# Lint just one component (exit 2 if findings)
|
|
124
|
-
npx tutuca ./src/components.js
|
|
128
|
+
npx tutuca lint ./src/components.js Button
|
|
125
129
|
|
|
126
130
|
# Post-edit verification: lint, then render the example covering the
|
|
127
131
|
# feature you just changed.
|
|
128
|
-
npx tutuca ./src/components.js
|
|
129
|
-
npx tutuca ./src/components.js
|
|
132
|
+
npx tutuca lint ./src/components.js
|
|
133
|
+
npx tutuca render ./src/components.js --title "Disabled state"
|
|
130
134
|
```
|
|
131
135
|
|
|
132
136
|
### Wrapping
|
|
133
137
|
|
|
134
138
|
The invocation stays short even without wrapping, but common patterns:
|
|
135
139
|
|
|
136
|
-
- **`package.json` scripts** — `"docs": "tutuca ./src/components.js
|
|
137
|
-
- **Shell alias** — `tut() { npx tutuca ./src/components.js "
|
|
140
|
+
- **`package.json` scripts** — `"docs": "tutuca show ./src/components.js"`
|
|
141
|
+
- **Shell alias** — `tut() { npx tutuca "$1" ./src/components.js "${@:2}"; }`, then `tut render Button`
|
|
138
142
|
- **`justfile` / `Makefile`** — one recipe per subcommand, passing through positionals
|
|
139
143
|
- **Programmatic** — `import "tutuca/cli"` (the bundled entry) for custom build integration
|
|
140
144
|
|
|
@@ -165,7 +169,7 @@ npx tutuca install-skill --force
|
|
|
165
169
|
```
|
|
166
170
|
|
|
167
171
|
The skill content is generated from `docs/llm/`, so the same reference
|
|
168
|
-
runs locally (`tutuca <module
|
|
172
|
+
runs locally (`tutuca lint <module>` + `tutuca render <module> --title …`)
|
|
169
173
|
and inside Claude.
|
|
170
174
|
|
|
171
175
|
## License
|