Skip to content

About

Anime video maker in code: no AI images, no Blender. Claude Code skill, Tamil/Hindi/English voices, lip-sync, GPU.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

code-drawn-anime: anime reels drawn 100% in code

code-drawn-anime: make anime Reels drawn 100% in code, no AI images, with Tamil, Hindi and English voices

code-drawn-anime is an open-source Claude Code skill and Node.js engine that draws a voiced, lip-synced 1080x1920 anime Reel entirely in code: every frame, every character and even the music are generated by scripts, with no AI images and no Blender. A JSON script goes in, an MP4 comes out, and each episode teaches one real AI skill.

License: MIT Node 20+ Canvas 2D Tamil Hindi English Claude Code skill

Three clips from the episodes: a phone buzzing with 47 messages, Selvi akka and Sujal, and a Hindi hook

Watch the full episodes (about a minute each, with voices, generated music and sound effects, under 5 MB each):

What you get

  • A three-quarter anime character rig (face, hair, eyes, brows, mouth shapes, hands, outfits) drawn with Canvas 2D, plus the cast: Navratan, Sujal and Selvi akka. Add your own characters in one file.
  • Sets and UI screens drawn in code: a tailor's shop, a night street, WhatsApp chats, code editors, phone apps, step cards, maps, QR codes.
  • An anime editing engine: camera pushes, speed lines, impact stamps, split-screen, wipes and glitch cuts, picked automatically per shot.
  • Voices from Sarvam AI in Tamil, Hindi and English (and other Indian languages), with a speech-to-text read-back so you catch mispronounced lines before rendering.
  • Lip-sync from the audio itself (offline, no model download).
  • Music and sound effects synthesised in code from the shot list, mixed under the voice with ducking and normalised to about -14 LUFS.
  • A GPU render through headless Chrome and h264_nvenc (a CPU libx264 fallback is built in).
  • Seven finished scripts (Ep2-Ep8) in Tamil, Hindi and English to copy from, and a Claude Code skill that writes new episodes for you.

Install in 1 minute

You need Node 20+, ffmpeg on your PATH, and Google Chrome or Microsoft Edge. The first run needs no API key.

git clone https://github.com/2boysfromtown/code-drawn-anime
cd code-drawn-anime
node tools/build.mjs ep7_en --silent        # renders the English Ep7, picture only, to out/ep7_en.mp4

That draws all 1,927 frames of a 64-second episode (about 2 minutes on an RTX 5070 Ti) with no voice, music or key. No NVIDIA GPU? Set VIDEO_CODEC=libx264 first. Want to see the characters? npm run characters writes a character sheet to out/chartest/.

Make an episode with voices

Voicing uses Sarvam AI, a paid API. Create your own key at dashboard.sarvam.ai and put it in an environment variable. The repo never contains a key and never reads one from a file.

pip install -r requirements.txt
read -rs SARVAM_API_KEY && export SARVAM_API_KEY   # paste your key (hidden)   |   Windows PowerShell: $env:SARVAM_API_KEY = "<your key>"

node tools/voice.mjs ep7_en       # Sarvam voices every line, then prints what speech-to-text heard back
node tools/timeline.mjs ep7_en    # places lines, caption times, lip-sync
node tools/review.mjs ep7_en      # contact sheet with one frame per shot (open the PNG it prints)
node tools/build.mjs ep7_en       # music + effects + render + phone copy in deliver/ + loudness report

For a brand-new episode, copy the closest app/anime/eps/epN.json, change the lines and the shot list, and run the same five commands. skills/anime-episodes/references/ lists every scene, character expression and the mistakes to watch for.

Use it from Claude Code

npx skills add 2boysfromtown/code-drawn-anime --global --agent claude-code

Or as a Claude Code plugin:

claude plugin marketplace add 2boysfromtown/code-drawn-anime
claude plugin install 2bft-code-drawn-anime@2bft

Then ask: "make an episode about WhatsApp automation for small shops, in Tamil and Hindi." The skill plans the AIDA script (Attention, Interest, Desire, Action), writes the JSON, voices it, checks the frames and renders it.

Examples

All made by this repo. The pictures are drawn by app/anime/engine.js, the voices by Sarvam AI, the music and effects by tools/sound_ep.mjs.

Episode Language What it teaches Contact sheet (one frame per shot)
Ep6 Tamil The C-T-F-C prompt formula: Context, Task, Format, Constraints examples/ep6_shots.jpg
Ep7 English Build a WhatsApp reply bot: FAQ, AI brain, connect examples/ep7_en_shots.jpg
Ep8 Hindi Build a small mobile app by describing it: screens, code, test examples/ep8_hi_shots.jpg

The cast, drawn by rig34.js and rendered with npm run characters (four poses and a face close-up each: Navratan, Sujal, Selvi akka): examples/characters.jpg.

Each MP4 in media/ is the real episode re-encoded to under 5 MB (x264 CRF 28). The Hindi and English versions are dubs of the Tamil originals made with tools/make_lang.mjs and the translations in tools/i18n/.

How it works

app/anime/eps/ep7.json      lines + captions + shot list
        │
        ├─ tools/voice.mjs ──► Sarvam TTS (+ STT read-back) ─► audio/ep7/L01.wav ...
        ├─ tools/timeline.mjs ─► line timing, caption chunks, lip-sync mouth track
        │
        ├─ tools/sound_ep.mjs ─► music + sound effects synthesised from the shot list
        │                         + voice, sidechain-ducked ─► mix.wav
        │
        └─ render/render.mjs ──► headless Chrome runs app/anime/engine.js (Canvas 2D),
                                  frames piped to ffmpeg (h264_nvenc or libx264) ─► out/ep7.mp4

How it compares

code-drawn-anime AI video generators (e.g. Runway, Veo, Kling) Blender or After Effects by hand
Same face and outfit in every shot Yes, it is one rig Can vary between clips Yes, if you rig it
Cost to render an episode Your own PC; paid only for the Sarvam voices (or bring your own WAVs) Credits per clip or per second Your own PC
Lip-sync to a voice track Built in, from the audio, offline Varies by tool Manual or a plugin
Visual range Limited to the rig, sets and scenes in this repo Open-ended, photoreal possible Open-ended
A script becomes a video with few manual steps Yes (5 commands) Prompt, regenerate, edit No, it is manual craft
Open source, you can change the rig and the edit rules Yes (MIT) No Blender yes, After Effects no

As of Nov 2026. This is a code-drawn cartoon look, not a photoreal or free-form generator.

FAQ

How do I make an anime video without AI image generation? Write the episode as a JSON script (lines, captions, shot list), voice it, and run node tools/build.mjs <episode>. The characters, sets, UI screens, transitions, music and sound effects are all drawn or synthesised by the scripts in this repo.

How much does an episode cost? Rendering runs on your own PC. The only paid part is the voices, which come from the Sarvam AI API (check their current pricing); you can skip it and render picture-only with --silent, or drop in your own voice WAVs.

Can I use my own voice or a free text-to-speech instead of Sarvam? The timeline step reads one WAV per script line, named audio/<episode>/L01.wav, L02.wav and so on, so any voice that produces those files can drive it (for example lines made with indic-voice-clone). We have only run it with Sarvam voices; other sources are untested.

Do I need an NVIDIA GPU? Not required. The default encoder is h264_nvenc; set VIDEO_CODEC=libx264 to encode on the CPU. A full episode took about 80-125 s to render on an RTX 5070 Ti; CPU times were not measured.

Which languages does it support? The bundled scripts exist in Tamil, Hindi and English. Sarvam covers other Indian languages too, but we have not tried them here.

Can I add my own characters and brand? Yes. Characters live in app/anime/rig34.js, and the closing call to action is in each episode's ui block. The bundled cast and the 2bft.in ending are ours; change them for your own brand.

How do I use it from Claude Code? npx skills add 2boysfromtown/code-drawn-anime --global --agent claude-code, then ask for an episode: "make an episode about WhatsApp automation for small shops, in Tamil and Hindi". The skill plans the script, writes the JSON, voices it, checks the frames and renders.

Requirements

  • Node 20+ and ffmpeg (with h264_nvenc for the GPU path; libx264 works everywhere).
  • Google Chrome or Microsoft Edge. The render harness finds it on Windows, macOS and Linux (CHROME=<path> to override).
  • Python 3 with sarvamai, and your own SARVAM_API_KEY, only for voicing new or changed lines.
  • Tested on Windows 11 with an RTX 5070 Ti. A full render took about 80-125 s per episode there.

Limits

  • Only the cover art (media/cover.png, media/social.png) is AI-generated; every frame of the episodes is drawn by code.
  • Voices are Sarvam's stock speakers, not cloned. They are good, not perfect: always read the speech-to-text check.
  • Lip-sync follows the loudness and sound of the audio, not exact phonemes. It looks right for cartoon mouths, not for close-ups of a single syllable.
  • Only the bundled Ep2-Ep8 scripts are tested. The Windows paths and the Chrome and ffmpeg flags were tuned on one machine; Linux and macOS are expected to work but are untested here.
  • The characters and the 2bft.in call to action are 2BFT's. Change the cast in app/anime/rig34.js and the closing words in each episode's ui block for your own brand.

Credits

  • Voices by Sarvam AI (Bulbul text-to-speech, Saarika speech-to-text).
  • Characters, engine, music and effects: 2BFT, original work, MIT licensed. No third-party songs, samples, fonts or images are included.

More from 2BFT

Free, open-source tools from the same two boys, all built and tested on our own PC:

Course, workshops and the full project files: 2bft.in.


Built by 2BFT, Two Boys From Town, a free AI school from Vaniyambadi, Tamil Nadu. Follow @navaratan.ai.

About

Anime video maker in code: no AI images, no Blender. Claude Code skill, Tamil/Hindi/English voices, lip-sync, GPU.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages