@numericoach/gskills-admin-cli 0.1.26 → 0.1.28
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 +57 -3
- package/dist/gskills-admin.js +1342 -22
- package/package.json +1 -1
- package/skills/gskills-admin-cli/SKILL.md +45 -4
- package/skills/gskills-page-content-blocks/SKILL.md +107 -0
package/README.md
CHANGED
|
@@ -48,8 +48,46 @@ gskills-admin pages help --output json
|
|
|
48
48
|
gskills-admin topics help --output json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
Generic `create` and `update` require `--dry-run` or `--yes`. Use `--data-file` for large JSON payloads instead of shell-escaped blobs:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
gskills-admin pages create --data-file ./page.json --dry-run --output json
|
|
55
|
+
gskills-admin pages update <pageId> --data-file ./page-fields.json --yes --output json
|
|
56
|
+
```
|
|
57
|
+
|
|
51
58
|
Use the listed `cache.scopes` with `gskills-admin cache invalidate` after create, update, or soft-delete when the end-user view must reflect the change immediately.
|
|
52
59
|
|
|
60
|
+
For page body edits, prefer the granular block helpers when a stable block id exists. Dry-run first, then write:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
gskills-admin pages content-schema --output json
|
|
64
|
+
gskills-admin pages get <pageId> --fields id,name,language,currentVersion,updatedAt,content --output json
|
|
65
|
+
gskills-admin pages block list <pageId> --output json
|
|
66
|
+
gskills-admin pages block replace-text <pageId> --block-id <blockId> --text-file ./block.txt --dry-run --output json
|
|
67
|
+
gskills-admin pages block insert-before <pageId> --block-id <anchorBlockId> --block-file ./block.json --dry-run --output json
|
|
68
|
+
gskills-admin pages block replace-text <pageId> --block-id <blockId> --text-file ./block.txt --reason "Fix wording" --yes --output json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use raw RFC 6902 JSON Patch when the edit needs multiple JSON paths:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
gskills-admin pages patch-content <pageId> --patch-file ./page.patch.json --dry-run --output json
|
|
75
|
+
gskills-admin pages patch-content <pageId> --patch-file ./page.patch.json --expect-version 7 --expect-content-sha1 <sha1> --reason "Fix wording" --yes --output json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Patch files are JSON Patch arrays:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
[
|
|
82
|
+
{ "op": "test", "path": "/blocks/0/type", "value": "paragraph" },
|
|
83
|
+
{ "op": "replace", "path": "/blocks/0/data/text", "value": "Updated paragraph text" }
|
|
84
|
+
]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Block helpers read the full page content, find nested blocks by id, generate guarded JSON Patch, validate the predicted full content against `pages content-schema`, call `pages patch-content`, then reread and validate the page after real writes. The patch route previews block/text deltas, stores page history, refreshes the page vector, invalidates `pages` and `pages-knowledge`, logs the write, and rejects stale `updatedAt`, version, or content SHA guards. Keep full-content `pages update --data '{"content": ...}'` for expert migrations only.
|
|
88
|
+
|
|
89
|
+
`pages content-schema` is the machine-readable source of truth for supported EditorJS/GSkills blocks, nested child-block paths, immutable reference fields and examples. Agents should call it before generating or patching page content.
|
|
90
|
+
|
|
53
91
|
Large local videos can be uploaded directly to GSkills storage before creating or updating internal knowledge and resources. The CLI asks the app for a signed upload URL, streams the local file directly to GCS, then writes the normal row with the returned URL. Use `--instance` for client-specific content.
|
|
54
92
|
|
|
55
93
|
```bash
|
|
@@ -74,10 +112,19 @@ gskills-admin translate pages --ids <pageId,pageId> --from fr --to en --dry-run
|
|
|
74
112
|
gskills-admin translate pages --all --instance global --from fr --to en --take 100 --dry-run --output json
|
|
75
113
|
gskills-admin translate quizzes <quizId> --to en --yes --output json
|
|
76
114
|
gskills-admin translate knowledge-video <knowledgeId> --from en --to es --yes --output json
|
|
115
|
+
gskills-admin translate changelogs <changelogId> --to all --concurrency 8 --dry-run --output json
|
|
77
116
|
```
|
|
78
117
|
|
|
79
|
-
Supported kinds are `pages`, `quizzes`, `topics`, `badges`, `menus`, `menu-sections`, `internal-knowledge`, `knowledge-video`, `learning-paths`,
|
|
80
|
-
|
|
118
|
+
Supported kinds are `pages`, `quizzes`, `topics`, `badges`, `menus`, `menu-sections`, `internal-knowledge`, `knowledge-video`, `learning-paths`, `chromebook-exercises`, and `changelogs`.
|
|
119
|
+
Use `--to all` to expand to every supported locale. Changelog translation supports `--concurrency 1-20` for faster backfills.
|
|
120
|
+
|
|
121
|
+
Changelog CRUD is available through `changelogs` and `changelog-groups`:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
gskills-admin changelog-groups create --data '{"name":"...","releaseDate":"2026-06-08T10:00:00.000Z"}' --dry-run --output json
|
|
125
|
+
gskills-admin changelogs create --data-file ./changelog-entry.json --dry-run --output json
|
|
126
|
+
gskills-admin changelogs update <changelogId> --data '{"status":"PUBLISHED"}' --yes --output json
|
|
127
|
+
```
|
|
81
128
|
|
|
82
129
|
Imported Google Sheets have their own command family:
|
|
83
130
|
|
|
@@ -127,6 +174,10 @@ gskills-admin access diagnose --email user@example.com --instance <instanceId> -
|
|
|
127
174
|
gskills-admin access grant --user <userId> --type DEFAULT --dry-run --output json
|
|
128
175
|
gskills-admin internal-knowledge sync-media --source global --since today --languages fr --all-targets --dry-run --output json
|
|
129
176
|
gskills-admin pages backfill-field --field headerColor --all-targets --dry-run --output json
|
|
177
|
+
gskills-admin pages content-schema --output json
|
|
178
|
+
gskills-admin pages block replace-text <pageId> --block-id <blockId> --text-file ./block.txt --dry-run --output json
|
|
179
|
+
gskills-admin pages block insert-before <pageId> --block-id <anchorBlockId> --block-file ./block.json --dry-run --output json
|
|
180
|
+
gskills-admin pages patch-content <pageId> --patch-file ./page.patch.json --dry-run --output json
|
|
130
181
|
gskills-admin progress learning-path-quiz-mismatches --instance <instanceId> --output json
|
|
131
182
|
gskills-admin progress repair-learning-path-quiz-mismatches --instance <instanceId> --dry-run --output json
|
|
132
183
|
gskills-admin progress embedded-course --user <userId> --quiz <quizId> --page <pageId> --dry-run --output json
|
|
@@ -152,7 +203,9 @@ The direct-DB replacement commands cover the recurring historical gaps: email-to
|
|
|
152
203
|
|
|
153
204
|
Agents can combine the CLI with local code. Use CLI JSON output inside shell loops, `jq`, Bun, Node, or TypeScript helpers for batching, joins, comparisons, retries, and reports. If a small local tool is missing, install or invoke it when useful. Keep production access through the authenticated CLI, not direct DB URLs.
|
|
154
205
|
|
|
155
|
-
Raw project and analytics data can be read or adjusted through resources such as `project-data`, `ticket-sla-rules`, `learning-path-items`, `learning-path-groups`, `quiz-questions`, `quiz-options`, `analytics`, `quiz-attempts`, `user-paths`, `chromebook-progress`, `user-badges`, `user-learning-paths`, and `user-learning-path-item-completions`.
|
|
206
|
+
Raw project, skill, workflow, and analytics data can be read or adjusted through resources such as `project-data`, `ticket-sla-rules`, `learning-path-items`, `learning-path-groups`, `quiz-questions`, `quiz-options`, `workflow-actions`, `skill-applications`, `skill-capabilities`, `skill-clusters`, `skills`, `skill-content-links`, `skill-sets`, `analytics`, `quiz-attempts`, `user-paths`, `chromebook-progress`, `user-badges`, `user-learning-paths`, and `user-learning-path-item-completions`.
|
|
207
|
+
|
|
208
|
+
`gskills-admin skills install`, `skills path`, and `skills help` are for bundled Codex skills. `skills list`, `skills get`, `skills create`, `skills update`, and `skills delete` operate on the app skill catalog. Use `skill-content-links` when associating pages, quizzes, parcours items, knowledge, or resources to skills.
|
|
156
209
|
|
|
157
210
|
## Agent skill
|
|
158
211
|
|
|
@@ -166,6 +219,7 @@ gskills-admin skills install --name gskills-feedback-db-ops --target ~/.codex/sk
|
|
|
166
219
|
gskills-admin skills install --name gskills-source-id-repair --target ~/.codex/skills
|
|
167
220
|
gskills-admin skills install --name gskills-user-session-invalidation --target ~/.codex/skills
|
|
168
221
|
gskills-admin skills install --name gskills-admin-cli-publishing --target ~/.codex/skills
|
|
222
|
+
gskills-admin skills install --name gskills-page-content-blocks --target ~/.codex/skills
|
|
169
223
|
```
|
|
170
224
|
|
|
171
225
|
## Output
|