https://github.com/kallewesterling/syncjar
Edit, preview, and sync Skilljar course content from your local dev environment.
https://github.com/kallewesterling/syncjar
courses customer-education developer-education devrel devrel-community skilljar
Last synced: about 2 months ago
JSON representation
Edit, preview, and sync Skilljar course content from your local dev environment.
- Host: GitHub
- URL: https://github.com/kallewesterling/syncjar
- Owner: kallewesterling
- License: mit
- Created: 2025-04-01T10:54:00.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-01T11:31:10.000Z (about 2 months ago)
- Last Synced: 2025-04-01T11:35:04.295Z (about 2 months ago)
- Topics: courses, customer-education, developer-education, devrel, devrel-community, skilljar
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Syncjar
Edit, preview, and sync Skilljar course content locally.
The local-first Skilljar workflow tool for developers, course authors, and content pros.---
**Syncjar** is a command-line tool that lets you pull, edit, preview, and sync course content from [Skilljar](https://www.skilljar.com/) โ all from your local development environment.
It's your local **Skilljar workspace**: Write content, test changes, see diffs, and push updates upstream.
---
## โจ Key Features
- ๐ **Two-way sync** between Skilljar and local files
- โ๏ธ **Edit each Skilljar content-item** as a standalone HTML file
- ๐ **Visual diffs** before syncing changes
- ๐งช **Local preview** mode for testing courses offline
- ๐พ Uses the Skilljar API with simple setup---
## ๐ Folder Structure
```bash
.
โโโ local-skilljar/
โ โโโ /
โ โโโ details.json
โ โโโ lessons-meta.json
โ โโโ lessons/
โ โโโ /
โ โโโ content-.html
โ
โโโ public/
โ โโโ courses/ # Local preview output
โ โโโ data/
โ โโโ courses.json # Course structure for preview UI
โ
โโโ scripts/
โ โโโ sync-skilljar-to-local.mjs # Pull from Skilljar
โ โโโ sync-local-to-skilljar.mjs # Push to Skilljar (with diffing)
โ โโโ generate-courses-json.mjs # Create preview course index
โ
โโโ .env # API key
โโโ README.md
```## ๐ Setup
Clone the repo and install dependencies:
```bash
git clone https://github.com//syncjar.git
cd syncjar
npm install
```2. Add your Skilljar API key to a .env file:
```env
SKILLJAR_API_KEY=sk-live-abc123
```3. Pull your Skilljar content and generate the local preview index:
```bash
npm run build:preview
```## ๐ Sync Local Edits Back to Skilljar
After editing any content file in `local-skilljar//lessons//content-.html`, run:
```bash
npm run sync:push
```This will show diffs and prompt before updating content upstream.
## ๐ ๏ธ Example Workflows
### ๐ Pull and refresh everything (Skilljar โ local)
```bash
npm run build:preview
```Runs:
```
npm run pull:skilljar
npm run generate:courses
```### ๐ Edit content locally and preview it
After these scripts have run, you can edit the .html files in `local-skilljar//lessons//`.
After you make changes, you need to rebuild the local preview index:
```bash
npm run generate:courses
```Then you can preview the content:
```bash
npx serve public
```### ๐ค Push changes upstream (local โ Skilljar)
```bash
npm run sync:push
```With options:
```bash
# Dry run with diffs
npm run sync:push -- --dry-run# Push a specific lesson
npm run sync:push -- --course This-Is-My-Course-Title --lesson 03-wrap-up# Show diffs only (no syncing)
npm run sync:push -- --diff-only# Push everything without prompting
npm run sync:push -- --force# Push without showing diffs
npm run sync:push -- --no-diff
```## ๐ Connect to Your Course Content
This repo does **not** track course content directly. To use it:
1. Clone your private course content repo:
```bash
git clone [email protected]:/.git ~/courses
```2. Add to the `.env` file in this repo:
```
COURSE_CONTENT_PATH=../courses
```3. Then run:
```bash
npm run build:preview
```This keeps your course content private and portable across environments.