Reusable CLI toolkit for Slidev-based lecture repositories.
pnpm add -D github:obcode/lecture-toolkit-cli#v0.1.0via GitHub Packages (npm registry):
pnpm add -D @obcode/lecture-toolkit-clior run on demand:
pnpm dlx lecture-toolkit-cli --helplecture-toolkit export-notes <deck>
lecture-toolkit watch-notes <deck>
lecture-toolkit dev-deck <deck>
lecture-toolkit build-deck <deck>
lecture-toolkit build-all
lecture-toolkit build-index
lecture-toolkit export-pdf-deck <deck>
lecture-toolkit export-pdfs
lecture-toolkit render-dot
lecture-toolkit render-tikz
lecture-toolkit generate-changelogs
lecture-toolkit strip-presenter-notes <slides.md>dev-deck starts watch-notes automatically so notes.md is generated and updated while developing slides.
Create lecture-toolkit.config.json in your lecture repository root to customize shared behavior.
Example:
{
"index": {
"eyebrow": "Vorlesungsfolien",
"courseTitle": "Moderne Programmierkonzepte und Datenstrukturen",
"subtitle": "Prof. Dr. Oliver Braun",
"siteTitle": "Moderne Programmierkonzepte und Datenstrukturen - Prof. Dr. Oliver Braun",
"locale": "de-DE",
"timezone": "Europe/Berlin"
},
"changelog": {
"globalResetDefault": "2026-05-18"
}
}build-index also supports CLI overrides such as:
pnpm exec lecture-toolkit build-index --course-title "Algorithms" --subtitle "Prof. Ada" --site-title "Algorithms - Prof. Ada"<deck> supports:
- Prefix lookup like
09-DFS-BFS decks/<deck>decks/<deck>/slides.md
The command must run inside a repository that contains a decks/ directory.
Existing local shell scripts can stay as thin wrappers, for example:
#!/usr/bin/env bash
set -e
pnpm exec lecture-toolkit dev-deck "$@"build-all:
image: node:20
script:
- pnpm install --frozen-lockfile
- pnpm exec lecture-toolkit build-allThis repository is configured for Semantic Release via GitHub Actions.
- Workflow:
.github/workflows/release.yml - Config:
.releaserc.json - Trigger: push to
main
The release workflow publishes:
- Git tag + GitHub Release
- npm package to GitHub Packages (
npm.pkg.github.com)
Required repository secret:
GH_PACKAGES_TOKEN: classic PAT (or fine-grained token) withwrite:packages(andread:packages) for ownerobcode.
The workflow maps NPM_TOKEN and NODE_AUTH_TOKEN to GH_PACKAGES_TOKEN and also uses GITHUB_TOKEN for release/tag operations.
To consume the package from GitHub Packages, configure .npmrc in the consuming repo or user profile:
@obcode:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}Use Conventional Commits for release versioning, for example:
fix: ...-> patch releasefeat: ...-> minor releasefeat!: ...orBREAKING CHANGE:-> major release
export-notes writes:
- Header callout with export timestamp in
dd.mm.yy, HH:MM Uhr - Source and notes links in GitLab blob format
- Bear tag footer
#hm/lectures/<lecture>/notes
<lecture> is derived from repository name prefix, for example mpd-lectures -> mpd.