How ravindusohan/the-sherlock-dsl works
Sherlock is a declarative DSL and toolchain for creating STEM animations. The documented authoring workflow starts with a .sherlock scene, parses it into a scene representation, previews it, and exports video; the CLI also supports project setup, scene creation, guidance, examples, and diagnostics. This checkout exposes CLI modules and a Next.js scene/compiler interface, but the README says the parser, rendering runtime, and export pipeline are private, and their implementation is not in the supplied tree. The source excerpts show scene-file reads and API parsing calls, but do not establish CLI dispatch or preview-to-render wiring.
Main entry points: parse-scene/route.ts Scene parsing API · latex/route.ts LaTeX API · sherlock.js Sherlock CLI · layout.tsx Web application
Components 24
Authoring tools
- Sherlock CLI
bin/sherlock.js - Project setup
lib/commands/init.js - Scene creation
lib/commands/create.js - Live preview
lib/commands/preview.js - Video export
lib/commands/render.js - Live coding
lib/commands/code.js - Guided workflow
lib/commands/interactive.js - DSL guide
lib/commands/guide.js - Scene examples
lib/commands/examples.js - Project config
lib/commands/config.js - Environment check
lib/commands/doctor.js - Workspace state
lib/workspace/project-manager.js
Web interface
- Web application
app/layout.tsx - Compiler page
app/compiler/page.tsx - Scene player
components/SherlockPlayer.tsx - Scene parsing API
app/api/compiler/parse-scene/route.ts - LaTeX API
app/api/compiler/latex/route.ts - KaTeX renderer
app/api/compiler/latex/route.ts
Animation pipeline
- Scene files
- DSL parser
- Animation runtime
- MP4 exporter
Other components
- Scene author
- MP4 video
Connections 5
- Scene author → Sherlock CLI: uses
- Scene author → Web application: uses
- Scene parsing API → Scene files: reads
- Scene parsing API → DSL parser: parses with
- LaTeX API → KaTeX renderer: renders with