Command reference

Every command, what it needs, and where it’s documented. Run syncjar <command> --help for its full list of options. From a clone, the same command is npm run <command> -- <options>.

Credentials: v1 is SKILLJAR_API_KEY, v2 a v2 client with the scopes on Configuration, and none runs locally.

  1. Content
  2. Preview (from a clone only)
  3. Checks
  4. Students
  5. Exports
  6. The syncjar command itself

Content

Command Does Writes to Skilljar Credentials
pull Courses, lessons, content items and quizzes to files no v1
pull:slugs Per-domain slugs and visibility flags to published.json no v1
pull:paths Learning paths to files no v1
push Course titles, lesson titles and HTML content items yes, with prompts v1
push:quizzes New quizzes, and edits to pulled ones yes, with prompts v1
push:course-settings Course settings from details.json yes, one prompt v1
push:paths Path details from details.json yes, one prompt v1
push:lesson-settings Lesson settings from lessons-meta.json yes, one prompt v1
push:published-settings hidden and strict enforcement from published.json yes, one prompt v1

Preview (from a clone only)

Command Does Credentials
build:preview pull, then generate:courses v1
generate:courses Rebuilds the preview index from the content files none
serve Serves the preview at http://localhost:3000 none
export:plaintext One Markdown file per course none

export:plaintext also runs from the global command.

Checks

All read-only.

Command Does Credentials
check:drift Dashboard edits since the last pull; exits 2 if any v2
check:visibility Who can see each published course and path, and likely mistakes v2
check:settings Settings that differ from the rest of the catalog v1
check:links Broken links in the preview’s content; clone only none
check:membership Whether people are in a group, and active on a domain v1

Students

Command Does Writes to Skilljar Credentials
group:add Adds students to a group, by email with --confirm v2
group:remove Removes students from a group, by email with --confirm v2
group:domains Lists or changes a group’s auto-add email domains with --confirm v2
group:audit Group members who aren’t on a roster no v1
group:revoke Removes reviewed users from a group, or deactivates them on a domain with --confirm v1
enroll:add Enrolls students in a course, by email with --confirm v2
enroll:remove Deactivates students’ enrollments in a course with --confirm v2

Exports

All read-only, writing to public/data/ by default.

Command Does Credentials
export:students The student list v1
export:enrollments One row per enrollment v2
export:analytics Per-course totals, optionally per domain v2
sync:users Caches every student’s progress locally v1
export:users Students with activity, from the cache none
export:metrics Monthly registrations and completions, from the cache none

The syncjar command itself

Command Does
syncjar help Lists commands, the installed version and commit, and where credentials are read from
syncjar --version Prints the version
syncjar update Installs the latest release, or --ref <ref>, unless that commit is already installed
syncjar whoami Shows the v2 client’s scopes and which commands it can run