{"id":27007279,"url":"https://github.com/kallewesterling/syncjar","last_synced_at":"2025-06-13T11:08:19.575Z","repository":{"id":285551752,"uuid":"958531139","full_name":"kallewesterling/syncjar","owner":"kallewesterling","description":"Edit, preview, and sync Skilljar course content from your local dev environment.","archived":false,"fork":false,"pushed_at":"2025-04-15T16:58:00.000Z","size":1413,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T11:08:00.997Z","etag":null,"topics":["courses","customer-education","developer-education","devrel","devrel-community","skilljar"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kallewesterling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-01T10:54:00.000Z","updated_at":"2025-05-21T15:39:04.000Z","dependencies_parsed_at":"2025-06-13T11:08:02.236Z","dependency_job_id":null,"html_url":"https://github.com/kallewesterling/syncjar","commit_stats":null,"previous_names":["kallewesterling/syncjar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kallewesterling/syncjar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallewesterling%2Fsyncjar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallewesterling%2Fsyncjar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallewesterling%2Fsyncjar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallewesterling%2Fsyncjar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kallewesterling","download_url":"https://codeload.github.com/kallewesterling/syncjar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallewesterling%2Fsyncjar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259634373,"owners_count":22887698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["courses","customer-education","developer-education","devrel","devrel-community","skilljar"],"created_at":"2025-04-04T08:19:35.926Z","updated_at":"2025-06-13T11:08:19.552Z","avatar_url":"https://github.com/kallewesterling.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003cimg src=\"./img/logo.png\" height=\"50\" width=\"auto\" valign=\"middle\" /\u003eSyncjar\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eEdit, preview, and sync Skilljar course content locally.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  The local-first Skilljar workflow tool for developers, course authors, and content pros.\n\u003c/p\u003e\n\n---\n\n**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.\n\nIt's your local **Skilljar workspace**: Write content, test changes, see diffs, and push updates upstream.\n\n---\n\n## ✨ Key Features\n\n- 🔁 **Two-way sync** between Skilljar and local files\n- ✍️ **Edit each Skilljar content-item** as a standalone HTML file\n- 🔍 **Visual diffs** before syncing changes\n- 🧪 **Local preview** mode for testing courses offline\n- 💾 Uses the Skilljar API with simple setup\n\n---\n\n## 🗂 Folder Structure\n\n```bash\n.\n├── local-skilljar/\n│   └── \u003ccourse-slug\u003e/\n│       ├── details.json\n│       ├── lessons-meta.json\n│       └── lessons/\n│           └── \u003clesson-slug\u003e/\n│               └── content-\u003ccontent_item_id\u003e.html\n│\n├── public/\n│   ├── courses/                     # Local preview output\n│   └── data/\n│       └── courses.json             # Course structure for preview UI\n│\n├── scripts/\n│   ├── sync-skilljar-to-local.mjs   # Pull from Skilljar\n│   ├── sync-local-to-skilljar.mjs   # Push to Skilljar (with diffing)\n│   ├── generate-courses-json.mjs    # Create preview course index\n│\n├── .env                             # API key\n└── README.md\n```\n\n## 🚀 Setup\n\nClone the repo and install dependencies:\n\n```bash\ngit clone https://github.com/\u003cyour-org\u003e/syncjar.git\ncd syncjar\nnpm install\n```\n\n2. Add your Skilljar API key to a .env file:\n\n```env\nSKILLJAR_API_KEY=sk-live-abc123\n```\n\n3. Pull your Skilljar content and generate the local preview index:\n\n```bash\nnpm run build:preview\n```\n\n## 🔁 Sync Local Edits Back to Skilljar\n\nAfter editing any content file in `local-skilljar/\u003ccourse\u003e/lessons/\u003clesson\u003e/content-\u003ccontent_item_id\u003e.html`, run:\n\n```bash\nnpm run sync:push\n```\n\nThis will show diffs and prompt before updating content upstream.\n\n## 🛠️ Example Workflows\n\n### 🔄 Pull and refresh everything (Skilljar → local)\n\n```bash\nnpm run build:preview\n```\n\nRuns:\n\n```\nnpm run pull:skilljar\nnpm run generate:courses\n```\n\n### 📝 Edit content locally and preview it\n\nAfter these scripts have run, you can edit the .html files in `local-skilljar/\u003ccourse\u003e/lessons/\u003clesson\u003e/`.\n\nAfter you make changes, you need to rebuild the local preview index:\n\n```bash\nnpm run generate:courses\n```\n\nThen you can preview the content:\n\n```bash\nnpx serve public\n```\n\n### 📤 Push changes upstream (local → Skilljar)\n\n```bash\nnpm run sync:push\n```\n\nWith options:\n\n```bash\n# Dry run with diffs\nnpm run sync:push -- --dry-run\n\n# Push a specific lesson\nnpm run sync:push -- --course This-Is-My-Course-Title --lesson 03-wrap-up\n\n# Show diffs only (no syncing)\nnpm run sync:push -- --diff-only\n\n# Push everything without prompting\nnpm run sync:push -- --force\n\n# Push without showing diffs\nnpm run sync:push -- --no-diff\n```\n\n## 🔒 Connect to Your Course Content\n\nThis repo does **not** track course content directly. To use it:\n\n1. Clone your private course content repo:\n\n   ```bash\n   git clone git@github.com:\u003cYOUR-ORG\u003e/\u003cYOUR-COURSE-CONTENT-REPO\u003e.git ~/courses\n   ```\n\n2. Add to the `.env` file in this repo:\n\n   ```\n   COURSE_CONTENT_PATH=../courses\n   ```\n\n3. Then run:\n\n   ```bash\n   npm run build:preview\n   ```\n\nThis keeps your course content private and portable across environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkallewesterling%2Fsyncjar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkallewesterling%2Fsyncjar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkallewesterling%2Fsyncjar/lists"}