@numericoach/gskills-admin-cli
v0.1.15
Published
Admin-only CLI for GSkills super-admin operations.
Downloads
977
Readme
GSkills Admin CLI
Admin-only package for GSkills super-admin operations.
Super admin CLI for GSkills operations through authenticated app API routes.
The CLI opens GSkills in the browser, uses the normal GSkills login, then stores an opaque CLI token locally. Every API request re-checks User.adminState = SUPER_ADMIN in GSkills before touching data.
Local usage
bun run gskills-admin auth login --base-url https://g-skills.fr
bun run gskills-admin auth whoami
bun run gskills-admin schema --output json
bun run gskills-admin pages list
bun run gskills-admin sync run --target <instanceId> --only pages,quizzes --yesContent-like resources default to instanceId = "global" when --instance is omitted.
Delete commands are soft-only. They disable or deactivate rows when the resource supports it, and refuse resources that cannot be safely disabled.
CLI writes are logged in the GSkills admin logs with the authenticated user and CLI metadata.
Sync dry-runs use the shared GSkills diff preview system:
gskills-admin sync presets --output json
gskills-admin sync logs --target <instanceId> --take 10 --output json
gskills-admin sync diff --target <instanceId> --only pages,menus --pages <pageId,pageId> --languages fr,en --output json
gskills-admin sync diff --target <instanceId> --preset client-content --output json
gskills-admin sync run --targets <instanceId,instanceId> --only pages,quizzes --dry-run --output jsonLanguage-limited menu sync writes are blocked from the CLI. Run the diff first, sync the language-limited content without menus, or sync menus without --languages after the backend non-destructive sync patch is deployed.
Deploy cache can be invalidated at the same scopes as the super-admin content settings screen:
gskills-admin cache scopes --output json
gskills-admin cache invalidate --instance <instanceId> --scope pages --languages fr,en --dry-run --output json
gskills-admin cache invalidate --instance <instanceId> --scope menu-bundle --yes --output jsonCRUD help includes cache hints for resources that can leave deploy views stale after a raw write:
gskills-admin pages help --output json
gskills-admin topics help --output jsonUse 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.
AI translation is available for content that has native AI translation in the editor:
gskills-admin translate pages <pageId> --to en,es --dry-run --output json
gskills-admin translate pages --ids <pageId,pageId> --from fr --to en --dry-run --output json
gskills-admin translate pages --all --instance global --from fr --to en --take 100 --dry-run --output json
gskills-admin translate quizzes <quizId> --to en --yes --output json
gskills-admin translate knowledge-video <knowledgeId> --from en --to es --yes --output jsonSupported kinds are pages, quizzes, topics, badges, menus, menu-sections, internal-knowledge, knowledge-video, learning-paths, and chromebook-exercises.
Operational helpers are available for the admin-only flows agents should not improvise:
gskills-admin feedback send-reply <feedbackId> --subject "GSkills - ..." --body-file ./reply.txt --dry-run --output json
gskills-admin access grant --user <userId> --type DEFAULT --dry-run --output json
gskills-admin instances create-plan --output json
gskills-admin instances create --data '{"name":"Client","URL":"client","licenceType":"STARTER","tokensAllowed":50}' --dry-run --output json
gskills-admin entities list --instance <instanceId> --output json
gskills-admin entities set-page-visibility --instance <instanceId> --page <pageId> --entity-ids google-group:[email protected] --dry-run --output json
gskills-admin org-units-sync google --instance <instanceId> --yes --output json
gskills-admin ambassadors label --instance <instanceId> --language fr --output jsonFeedback reply bodies are file-based on purpose. Production replies are multi-line, and send-reply rejects inline body text to avoid shell parsing surprises.
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.
Agent skill
Install the bundled skills so AI agents know the auth model, resource map, output modes, sync workflow, content-authoring standards, recurring DB-backed ops runbooks, GSkills vocabulary, and recurring customer playbooks.
gskills-admin skills install --target ~/.codex/skills
gskills-admin skills install --name gskills-vocabulary --target ~/.codex/skills
gskills-admin skills install --name gskills-customer-playbooks --target ~/.codex/skills
gskills-admin skills install --name gskills-feedback-db-ops --target ~/.codex/skillsOutput
Use --output json, --output jsonl, --output table, or --output markdown.
Piped output defaults to JSON so agents and scripts can consume it safely.
