Scaffold a Reveal.js or Slidev presentation with live audience quizzes, powered by slide-quiz and AnyCable.
npx create-slide-quizRun this inside your existing Reveal.js or Slidev project directory.
The CLI auto-detects your framework (Reveal.js or Slidev) and walks you through the setup:
- AnyCable Plus — guides you through creating a free AnyCable Plus app (up to 2,000 concurrent connections)
- Install — adds
slide-quiz(for Reveal.js) orslidev-addon-slide-quiz(for Slidev) - Configure — injects plugin config and sample quiz slides into your deck
- Serverless functions — copies the answer/sync functions for Netlify or Vercel
- Deploy — optionally deploys via Netlify or Vercel CLI
For Reveal.js projects, the CLI:
- Detects your HTML file and JS entry point
- Adds
slide-quizimports and plugin config - Creates
quiz.htmlandquiz.js(the audience voting page) - Inserts sample quiz slides into your deck
For Slidev projects, the CLI:
- Adds
slidev-addon-slide-quizto your dependencies - Configures
slides.mdfrontmatter with the addon and WebSocket settings - Copies
quiz.htmlto yourpublic/directory - Appends sample quiz slides using the
quizandquiz-resultslayouts
Every prompt has a flag. With --yes and both AnyCable URLs the CLI runs to completion without input:
npx create-slide-quiz --yes --platform vercel --no-deploy \
--ws-url wss://my-cable.fly.dev/cable \
--broadcast-url https://my-cable.fly.dev/_broadcast| Flag | Meaning |
|---|---|
--platform <netlify|vercel> |
Deploy target. Default: detected from netlify.toml / vercel.json, else Netlify |
--framework <slidev|revealjs> |
Only needed when auto-detection fails |
--ws-url, --broadcast-url |
AnyCable URLs. The broadcast URL goes to .env and the host, never into code |
--no-deploy |
Skip the deploy step |
--skills / --no-skills |
Copy the slide-quiz agent skills into .claude/skills/. Default: ask; --yes implies yes |
-y, --yes |
Skip the review prompt, accept defaults, and skip the deploy step (it prints the deploy command instead) |
npx create-slide-quiz --help lists them.
The package also ships verify-slide-quiz, which checks a deployed site without a browser: the audience page is served, both serverless functions answer, and a POST to each one produces a broadcast that arrives back over the AnyCable WebSocket.
npx -p create-slide-quiz verify-slide-quiz --site https://my-talk.vercel.app --platform vercel \
--ws-url wss://my-cable.fly.dev/cableEach failure prints the likely cause (functions missing, ANYCABLE_BROADCAST_URL unset, cable has a secret set, and so on). Needs Node 22 for the WebSocket part; without --ws-url it runs the HTTP checks only.
- Node.js 18+ (Node 22 for
verify-slide-quiz) - An existing Reveal.js or Slidev project (or the CLI will help you set one up)
- Netlify CLI or Vercel CLI for deployment (optional)
Bugs in the scaffolding go in this repo's issues. Problems with the running quiz (audience cannot join, votes do not appear) belong to slide-quiz. See CONTRIBUTING.md for how the repo works and how to test against a real deck.
MIT