# Syncjar

Edit, preview and sync [Skilljar](https://www.skilljar.com/) course content
from your own machine, and manage the students and groups around it from the
command line.

[Get started](https://westerling.nu/syncjar/getting-started.md)
[View on GitHub](https://github.com/kallewesterling/syncjar)

---

Syncjar mirrors a Skilljar organisation's courses, lessons, quizzes and
learning paths into plain files. You edit them in any editor, keep them in
git, preview them with your own theme, and push the changes back, seeing a
diff of each one first.

It also covers the work around the content: putting students in groups,
enrolling them, exporting rosters and analytics, and checking who can see
which course.

This documentation covers **Syncjar 2.1.1**.

## What it does

| | |
|---|---|
| **[Pull](https://westerling.nu/syncjar/content/pulling.md)** | Every course, lesson, content item, quiz and learning path, as HTML and JSON files. |
| **[Preview](https://westerling.nu/syncjar/content/previewing.md)** | A local site that renders each lesson with your Skilljar theme. |
| **[Push](https://westerling.nu/syncjar/content/pushing.md)** | Your edits back to Skilljar, with a word-level diff and a prompt for each change. |
| **[Quizzes](https://westerling.nu/syncjar/content/quizzes.md)** | Write a quiz as a JSON file and create it, or edit a pulled one. |
| **[Settings](https://westerling.nu/syncjar/content/settings.md)** | Course, lesson, path and visibility settings, kept in files and pushed like content. |
| **[Checks](https://westerling.nu/syncjar/checks/index.md)** | Dashboard edits made since your last pull, who can see what, odd settings, broken links. |
| **[Students](https://westerling.nu/syncjar/students/index.md)** | Group membership, enrollments, and CSV exports of students, enrollments and analytics. |

## Built to be hard to misuse

Syncjar writes to a live learning platform, so it is cautious by default:

- Commands that change student records are **dry runs** unless you pass
  `--confirm`, and then ask you to type what they are about to do.
- Every write is **read back** and checked, so a request that Skilljar
  accepts but ignores is reported as a failure.
- Runs that change students write an **audit CSV** with each record's state
  before and after.
- `push` refuses to run from a feature branch of your content repo, and shows
  every change before making it.
- API credentials are **never printed**, not even in a crash.

[Safety and data handling](https://westerling.nu/syncjar/safety.md) covers the rest.

## Requirements

- Node.js 20.19 or later.
- A Skilljar organisation with API access: a v1 API key, a v2 API client, or
  both, depending on the commands you use. See
  [Credentials](https://westerling.nu/syncjar/configuration.md#credentials).
