Skip to content

About

An AI skill that turns books into animated, narrated, interactive web experiences

Topics

Resources

Stars

1.2k stars

Watchers

4 watching

Forks

Latest commit

 

History

489 Commits

Folders and files

Repository files navigation

The Papermorph bookshelf: lessons, picture books, documentaries and interactive pages on a birch shelf

An agent skill that turns textbooks into narrated, interactive web lessons,
stories into paper-puppet films, and books into documentaries, upright shorts and pages you explore.

Open the live bookshelf → · Read the Skill → · Work with us

1,000 stars. Thank you to everyone who starred Papermorph, tried the Skill, filed issues and sent pull requests. The first roadmap is done; the next is below.

Everything is a static web page: no server, no database, no account. A book is a folder you can host anywhere.

On the shelf

Lessons, from a textbook PDF

Formulas, diagrams and scenes change step by step as the narration explains, with quick checks and chapter practice that grade the maths, not the string. Elementary Algebra (68 chapters) · Linear Algebra (40, planes you can drag in 3D) · Elementary Mathematics (23) · Elementary Physics (9)

Linear Algebra: three equations become three planes in 3D, drawn in one by one Elementary Physics: one fixed pulley changes the direction of the pull; two pulleys halve the force

Picture books, from a story, a joke or a fairy tale

Paper puppets in front of sets drawn in code or painted by an image model, with acted voices, subtitles, sound effects, music and camera work. For children who can't read yet, the film stops for a game: a character asks for one thing at a time, the child touches it in the picture, and nothing is ever called wrong. The Little Horse Crosses the River (小马过河) · Little Red Riding Hood · Joke Collection (7 episodes)

The Little Horse Crosses the River: by the river the foal asks for the bird; a tap on the ox says 'ox', a tap on the bird finds it Little Red Riding Hood: the wolf in Grandma's cap and glasses, closer with every question, then the lunge

Documentaries and upright shorts, from a book or an idea

Public-domain engravings, paintings, maps and charts, moved in step with the voice, with music. A documentary can be recut as a series of upright shorts for a phone feed. Madness and Civilization (10 minutes, and 4 shorts) · The Pandemic (7 minutes, 6 shorts and a scroll story)

The Pandemic: a world map and charts of cases and deaths as the Delta wave rises The Pandemic as a short: Wuhan closes at 10:00 while a clock and a counter run

Pages you play

A film can stop and hand the reader the next move, and a map can be walked a year at a time. Shooting an Elephant (Orwell's essay; you hold the rifle) · Time of the Magicians (Europe 1919–1929, four philosophers on the map)

Shooting an Elephant: where to aim, then the view through the rifle sight, click to fire Time of the Magicians: a map of Europe in 1919, the four philosophers walking their routes

Get started

Install the Skill in your project, for Claude Code or OpenCode:

npx skills add DozenTwelve/Papermorph --skill papermorph --agent claude-code   # or --agent opencode

Then type /papermorph. It finds the PDF in your project (or asks for your story), tells you what kind of book it is, suggests a chapter to try first and how much animation it needs, and offers a recommended option at every step. Your choices are saved in style.json, so every later chapter is made to the same style.

In OpenCode, a clone of this repository already has the command (.opencode/commands/papermorph.md) and the Skill; with a global install, copy that file to ~/.config/opencode/commands/.

You need uv, ffmpeg, and Playwright's browsers (uv run --with playwright playwright install chromium firefox). Narration uses Edge TTS (online) or Kokoro (local), free. A few steps are paid, optional and need an API key: acted ElevenLabs voices for picture books and documentaries, clips made from a still (OpenRouter), and painted sets for picture books (OpenRouter or OpenAI). The two newest picture books cost under $0.35 each in voices.

How it works

A book is planned before it is drawn: chapters or scenes, then a script, then a storyboard. The narration is voiced and every word gets a time, and the picture is animated to those times. The model then watches its own output (contact sheets, overlap and blank-frame checks, end-to-end tests, a director's review against approved books) and fixes what it sees. Large chapters are made by a team of subagents, each step on the model you choose (core/team.md). The books on the shelf were made with Opus 5.5, GPT-6.1-Sol and Sonnet 5.5; an illustrated physics chapter costs about $10–18 of model usage.

Every book plays in the same player: pause anywhere, step back and forth, speed, captions, keyboard shortcuts, and progress saved per book, with the interface in English, Russian, Chinese, Japanese or Arabic (right to left). The player lives in engine/ and every book keeps its own copy, so a book never breaks when the engine changes; scripts/engine.py site updates them from the latest release (--from you/your-fork@main from your own).

Any chapter or episode also renders to a 1080p MP4 with an .srt, frame by frame from the lesson clock (scripts/export.py), and a book can be packaged for an LMS as SCORM (scripts/scorm.py, courses.md).

Roadmap

The first roadmap is done: maths books, science books, picture books, a model of your choice for every step, documentaries, and upright shorts. So are picture books for children who can't read yet: layered paper sets, four-legged puppets and listen-and-find games, in The Little Horse and the second Little Red Riding Hood. A rifle, a map and a scroll story came along the way. Next:

  • Picture books from a PDF of pictures. Bring an illustrated book and make its pages move: tap to hear names over the painting, layers that drift in parallax, characters cut into paper puppets, the printed text read aloud. For your own books or a publisher's; our own examples will use public-domain books or pictures we draw.
  • Lessons with their own examples. The textbook sets what is taught, in what order and how hard; the Skill writes new worked examples and exercises, with answers computed in code, so nothing is copied from the book.
  • One source, every shape. A single Wikipedia article made into a documentary, shorts, an interactive page and a scroll story, side by side.
  • Elementary Physics, remade with what the newer books can do.

Working with us

The shelf is a set of examples: the shapes that suit a maths book, a language course, a picture book or a documentary, and one source can take several of them (The Pandemic is a film, six shorts and a scroll story). For publishers, schools and studios we build the pipeline around your own titles and your own style. See the work page, or write to a972848363@gmail.com with what the titles are, who they are for, and how many you have in mind.

FAQ

How is this different from Claude Motion? Claude Motion makes animated explainers. Papermorph makes whole books: many chapters in one consistent style, quizzes that are graded, progress that is saved, and a static site you own and can host anywhere.

Can I make a book from any PDF? Yes, for your own use. The finished book contains new explanations and drawings, not the PDF's pages, but publishing a book based on someone else's textbook is your call to check.

Contributing

Fixes to the Skill and the player are welcome. Please don't open pull requests that add a copyrighted book, its PDF, or lessons made from one. Agents and people changing the repository: start with AGENTS.md.

To try the examples locally:

git clone --depth 1 https://github.com/DozenTwelve/Papermorph.git
cd Papermorph
python3 .claude/skills/papermorph/scripts/serve.py 8765 site   # then open http://localhost:8765/

License

MIT. The bundled MathJax (engine/vendor/mathjax) is under the Apache License 2.0. The MIT licence covers the code. Pictures, recordings and data under site/ keep their own licences, listed beside them (for example site/pandemic/img/SOURCES.md); toned copies of CC BY-SA pictures stay CC BY-SA.

About

An AI skill that turns books into animated, narrated, interactive web experiences

Topics

Resources

Stars

1.2k stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages