@chalksurf/cli 0.2.2 → 0.2.4
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 +21 -8
- package/dist/bin/chalksurf.js +6336 -158
- package/docs/agents.md +123 -3
- package/docs/examples/sheet-import-manifest.json +24 -0
- package/docs/manifest.md +24 -1
- package/docs/manual.md +43 -0
- package/docs/mcp.md +88 -0
- package/package.json +3 -2
- package/schemas/sheet-import-manifest.schema.json +78 -22
- package/dist/commands/auth.js +0 -174
- package/dist/commands/exercise.js +0 -600
- package/dist/commands/job.js +0 -172
- package/dist/commands/org.js +0 -115
- package/dist/commands/profile.js +0 -97
- package/dist/commands/sheet.js +0 -729
- package/dist/lib/api-client.js +0 -86
- package/dist/lib/cli-error.js +0 -46
- package/dist/lib/command-options.js +0 -61
- package/dist/lib/config-store.js +0 -354
- package/dist/lib/import-files.js +0 -120
- package/dist/lib/import-output.js +0 -81
- package/dist/lib/manifest.js +0 -295
- package/dist/lib/output.js +0 -57
- package/dist/lib/prompt-secret.js +0 -32
- package/dist/lib/session.js +0 -72
- package/dist/lib/source-resolver.js +0 -272
- package/dist/lib/translation-languages.js +0 -16
- package/dist/lib/user-jobs.js +0 -99
package/README.md
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
# `@chalksurf/cli`
|
|
2
2
|
|
|
3
|
-
Publishable ChalkSurf CLI package.
|
|
4
|
-
|
|
5
|
-
Current internal release line: `0.2.2`. Expect breaking changes while the CLI is still only used internally.
|
|
3
|
+
Publishable ChalkSurf CLI package. Expect breaking changes while the CLI is still only used internally.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
7
|
Run the published CLI without a global install:
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
|
-
npx @chalksurf/cli@
|
|
10
|
+
npx @chalksurf/cli@ --help
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
Install it globally when you want a persistent local binary:
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
|
-
npm install -g @chalksurf/cli
|
|
16
|
+
npm install -g @chalksurf/cli
|
|
19
17
|
chalksurf --version
|
|
20
18
|
```
|
|
21
19
|
|
|
@@ -34,12 +32,26 @@ Headless or agent flow:
|
|
|
34
32
|
|
|
35
33
|
```bash
|
|
36
34
|
CHALKSURF_TOKEN=cs_cli_... \
|
|
37
|
-
printf '%s' "$CHALKSURF_TOKEN" | npx @chalksurf/cli
|
|
35
|
+
printf '%s' "$CHALKSURF_TOKEN" | npx @chalksurf/cli auth login \
|
|
38
36
|
--profile prod-codex \
|
|
39
37
|
--base-url https://chalksurf-api.fly.dev \
|
|
40
38
|
--with-token
|
|
41
39
|
|
|
42
|
-
npx @chalksurf/cli
|
|
40
|
+
npx @chalksurf/cli --profile prod-codex sheet import --manifest - --wait --json < import.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Agentic edit flow:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @chalksurf/cli --profile prod-codex sheet issues SHEET_ID --json
|
|
47
|
+
npx @chalksurf/cli --profile prod-codex sheet copy SHEET_ID "Easier variant" \
|
|
48
|
+
--exercise-copy-mode copy_all_exercises \
|
|
49
|
+
--json
|
|
50
|
+
npx @chalksurf/cli --profile prod-codex exercise update EXERCISE_ID \
|
|
51
|
+
--target-sheet-id COPIED_SHEET_ID \
|
|
52
|
+
--expected-updated-at 2026-01-01T00:00:00.000Z \
|
|
53
|
+
--patch-json '{"translations":{"english":{"exercise_text":"Find $x^2$."}}}' \
|
|
54
|
+
--json
|
|
43
55
|
```
|
|
44
56
|
|
|
45
57
|
Sheet import manifests use top-level `sheets[]`, where each sheet has one `targetFolderPath` and one or more ordered `sources[]`. See [the canonical example](./packages/cli/docs/examples/sheet-import-manifest.json).
|
|
@@ -48,6 +60,7 @@ Sheet import manifests use top-level `sheets[]`, where each sheet has one `targe
|
|
|
48
60
|
|
|
49
61
|
- [Manual operator guide](./packages/cli/docs/manual.md)
|
|
50
62
|
- [Agent and Codex guide](./packages/cli/docs/agents.md)
|
|
63
|
+
- [MCP guide](./packages/cli/docs/mcp.md)
|
|
51
64
|
- [Manifest reference](./packages/cli/docs/manifest.md)
|
|
52
65
|
- [Exit codes and JSON errors](./packages/cli/docs/exit-codes.md)
|
|
53
66
|
- [Sheet import schema](./packages/cli/schemas/sheet-import-manifest.schema.json)
|
|
@@ -60,7 +73,7 @@ Sheet import manifests use top-level `sheets[]`, where each sheet has one `targe
|
|
|
60
73
|
Use separate profiles so local, staging, production, human, and agent tokens do not overwrite each other:
|
|
61
74
|
|
|
62
75
|
```bash
|
|
63
|
-
npm run cli-dev -- auth login --profile dev-cztamas --base-url http://localhost:
|
|
76
|
+
npm run cli-dev -- auth login --profile dev-cztamas --base-url http://localhost:3101
|
|
64
77
|
npm run cli-dev -- profile use dev-cztamas
|
|
65
78
|
npm run cli-dev -- auth status --json
|
|
66
79
|
npm run cli-dev -- sheet import ./fixtures/algebra.pdf --wait --json
|