@optique/core 1.2.0-dev.2285 → 1.2.0-dev.2287
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/package.json +2 -2
- package/skills/optique/SKILL.md +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.2.0-dev.
|
|
3
|
+
"version": "1.2.0-dev.2287",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"fast-check": "^4.7.0",
|
|
226
226
|
"tsdown": "^0.13.0",
|
|
227
227
|
"typescript": "^5.8.3",
|
|
228
|
-
"@optique/env": "1.2.0-dev.
|
|
228
|
+
"@optique/env": "1.2.0-dev.2287+86d0fd20"
|
|
229
229
|
},
|
|
230
230
|
"scripts": {
|
|
231
231
|
"build": "tsdown",
|
package/skills/optique/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ they cover the parts agents most often get wrong.
|
|
|
22
22
|
Core rules
|
|
23
23
|
----------
|
|
24
24
|
|
|
25
|
-
- Use `run()` from
|
|
25
|
+
- Use `run()` from *@optique/run* for real CLI applications. It reads
|
|
26
26
|
`process.argv`/`Deno.args`, handles help, version output, errors, exit
|
|
27
27
|
codes, colors, terminal width, and shell completion. Use `parse()` from
|
|
28
28
|
`@optique/core/parser` or `runParser()` from `@optique/core/facade` when
|
|
@@ -37,7 +37,7 @@ Core rules
|
|
|
37
37
|
`undefined`; `withDefault(p, value)` yields a fallback value. For Boolean
|
|
38
38
|
flags, use `withDefault(flag("--name"), false)` when absence should mean
|
|
39
39
|
`false`.
|
|
40
|
-
- Use `message` from
|
|
40
|
+
- Use `message` from *@optique/core/message* for descriptions, help text, and
|
|
41
41
|
custom errors. Prefer semantic message helpers such as `optionName()` and
|
|
42
42
|
`metavar()` over string concatenation when naming CLI elements.
|
|
43
43
|
- Use value parsers such as `integer()`, `choice()`, `url()`, and `uuid()`
|
|
@@ -46,7 +46,7 @@ Core rules
|
|
|
46
46
|
`{ mode, metavar, parse, format }` value parser only when the catalog does
|
|
47
47
|
not cover the domain.
|
|
48
48
|
- Async value parsers make the containing parser async. If you use packages
|
|
49
|
-
such as
|
|
49
|
+
such as *@optique/git*, remember to `await run(...)`, `await parse(...)`, or
|
|
50
50
|
`await runParser(...)` as appropriate.
|
|
51
51
|
- Build subcommands with `command()` combined by `or()`. Put a literal field
|
|
52
52
|
such as `command: constant("serve")` in each branch when you want a
|