@chalksurf/cli 0.3.7 → 0.4.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 +22 -18
- package/dist/bin/chalksurf.js +9280 -9245
- package/docs/agents.md +59 -51
- package/docs/content-operations.md +36 -0
- package/docs/examples/authoritative-sheet-import-manifest.json +48 -0
- package/docs/examples/exercise-import-manifest.json +16 -9
- package/docs/examples/exercise-sheet-solution-import-manifest.json +13 -8
- package/docs/examples/exercise-sheet-translation-import-manifest.json +20 -0
- package/docs/examples/exercise-solution-import-manifest.json +13 -8
- package/docs/examples/sheet-import-manifest.json +12 -5
- package/docs/exit-codes.md +12 -4
- package/docs/manifest.md +12 -165
- package/docs/manual.md +44 -30
- package/docs/mcp.md +58 -53
- package/docs/migration-0.4.md +79 -0
- package/package.json +6 -3
- package/schemas/content-manifest.schema.json +2308 -0
- package/schemas/content-plan.schema.json +5003 -0
- package/schemas/exercise-import-manifest.schema.json +131 -101
- package/schemas/exercise-sheet-solution-import-manifest.schema.json +118 -90
- package/schemas/exercise-sheet-translation-import-manifest.schema.json +156 -0
- package/schemas/exercise-solution-import-manifest.schema.json +118 -90
- package/schemas/sheet-import-manifest.schema.json +547 -181
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# `@chalksurf/cli`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ChalkSurf CLI 0.4.0 provides content generation, imports, updates, saved plans and recoverable job controls. This release intentionally breaks older command and manifest formats; see the [migration guide](./docs/migration-0.4.md).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
Run the published CLI without a global install:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx @chalksurf/cli
|
|
10
|
+
npx @chalksurf/cli --help
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Install it globally when you want a persistent local binary:
|
|
@@ -31,7 +31,6 @@ chalksurf sheet import ./fixtures/algebra.pdf --wait
|
|
|
31
31
|
Headless or agent flow:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
CHALKSURF_TOKEN=cs_cli_... \
|
|
35
34
|
printf '%s' "$CHALKSURF_TOKEN" | npx @chalksurf/cli auth login \
|
|
36
35
|
--profile prod-codex \
|
|
37
36
|
--base-url https://chalksurf-api.fly.dev \
|
|
@@ -50,8 +49,9 @@ npx @chalksurf/cli --profile prod-codex sheet copy SHEET_ID "Easier variant" \
|
|
|
50
49
|
npx @chalksurf/cli --profile prod-codex exercise update EXERCISE_ID \
|
|
51
50
|
--target-sheet-id COPIED_SHEET_ID \
|
|
52
51
|
--expected-updated-at 2026-01-01T00:00:00.000Z \
|
|
53
|
-
--
|
|
54
|
-
|
|
52
|
+
--input - --json <<'JSON'
|
|
53
|
+
{"translations":{"english":{"exercise_text":"Find $x^2$."}}}
|
|
54
|
+
JSON
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Admin sheet-series labeling:
|
|
@@ -59,28 +59,32 @@ Admin sheet-series labeling:
|
|
|
59
59
|
```bash
|
|
60
60
|
npx @chalksurf/cli --profile prod-codex sheet list --all --result-file inventory.json --json
|
|
61
61
|
npx @chalksurf/cli --profile prod-codex sheet series list --subject math --json
|
|
62
|
-
npx @chalksurf/cli --profile prod-codex sheet
|
|
63
|
-
--
|
|
62
|
+
npx @chalksurf/cli --profile prod-codex sheet update \
|
|
63
|
+
--manifest batch-001.json --dry-run --plan-out batch-001.plan.json --json
|
|
64
|
+
npx @chalksurf/cli --profile prod-codex plan apply batch-001.plan.json --result-file applied.json --json
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
Review the saved plan before applying it. If the apply response is uncertain, use `plan verify batch-001.plan.json` and inspect request acceptance before considering another write. `--input FILE|-` supplies one patch; `--manifest FILE|-` supplies a strict v1 repeated request. See [content operations](./docs/content-operations.md) for the complete generation, translation, import and recovery flow.
|
|
67
68
|
|
|
68
69
|
Every operational command accepts `--result-file PATH`. The CLI preflights a new destination before command execution, writes the complete success or failure JSON envelope to a private file, and refuses to overwrite existing evidence. Stdout stays compact and includes the absolute result path. If publication fails after the command finishes, stdout contains the complete envelope plus a warning and the command keeps its original exit code.
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
Content manifests use `schemaVersion: "v1"`, `operation` and `items[]`. Sheet entries retain ordered sources, components or authoritative language groups. File paths resolve relative to the manifest file; stdin paths use the invocation directory. See the [manifest reference](./docs/manifest.md) and [canonical examples](./docs/examples/).
|
|
71
72
|
|
|
72
73
|
## Docs
|
|
73
74
|
|
|
74
75
|
- [Public CLI and MCP documentation](https://chalksurf.com/docs)
|
|
75
|
-
- [Manual operator guide](./
|
|
76
|
-
- [Agent and Codex guide](./
|
|
77
|
-
- [MCP guide](./
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
80
|
-
- [
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
83
|
-
- [Exercise
|
|
76
|
+
- [Manual operator guide](./docs/manual.md)
|
|
77
|
+
- [Agent and Codex guide](./docs/agents.md)
|
|
78
|
+
- [MCP guide](./docs/mcp.md)
|
|
79
|
+
- [Content operations and saved plans](./docs/content-operations.md)
|
|
80
|
+
- [0.4.0 migration guide](./docs/migration-0.4.md)
|
|
81
|
+
- [Manifest reference](./docs/manifest.md)
|
|
82
|
+
- [Exit codes and JSON errors](./docs/exit-codes.md)
|
|
83
|
+
- [Sheet import schema](./schemas/sheet-import-manifest.schema.json)
|
|
84
|
+
- [Exercise import schema](./schemas/exercise-import-manifest.schema.json)
|
|
85
|
+
- [Exercise solution import schema](./schemas/exercise-solution-import-manifest.schema.json)
|
|
86
|
+
- [Exercise sheet solution import schema](./schemas/exercise-sheet-solution-import-manifest.schema.json)
|
|
87
|
+
- [Exercise sheet translation import schema](./schemas/exercise-sheet-translation-import-manifest.schema.json)
|
|
84
88
|
|
|
85
89
|
## Local And Staging Testing
|
|
86
90
|
|