A 7-stage trigger script with a TV-news look: Claude writes, Codex draws, HeyGen speaks and the engine syncs everything to the voice.

r7ex is INEMA's production line for vertical (9:16) reels. You hand it a strong idea, the thesis, and it builds a 30 to 40 second video with Nei's avatar speaking, images generated by Codex and a TV-news finish: a title in the opening, panels that come in on the right word, a counter and captions that light up along with the speech. The script follows 7 trigger stages, from a hook with a number to the request for a comment, always leading the viewer to inema.club. To use it you need Python, Node, Codex and the HeyGen subscription, running on the INEMA machine.
r7ex = r7e + x. r7e (reel7etapas) provides the 7-stage script; the x comes from eventosextremospub, the TV-news finish that went the most viral. The repo works on its own, with its own copy of everything.
Audience, what the person wants, hook with a number and source, potential score (below 7, change the angle) and the inema.club page that solves it.
Title drawn in the opening, black and yellow, a banner with a red badge, panels and counters timed to the speech, and karaoke captions.
Render engine, HeyGen studio, transcription, music track, bot delivery and queue copied into the repo. Changing things here doesn't affect the other projects.
parts in the script, from the hook to the comment
of duration (always under 60 s)
characters of speech per reel
of the speech matching the avatar (retiming gate)
The order of stages 2 to 6 can adapt to the topic (in the reel "Who makes money in 2027" stage 3 became proof), but there are always 7 parts.
| Stage | Speech | Screen |
|---|---|---|
| 1. Hook (fear) | "Hackers broke into OpenCode… US$ 1,700 in one night" | opening with the drawn title + counter 0 → 1,700 |
| 2. Fear | "The key is the password the AI uses… yours could be next" | hooded figure pulling out the key + red panel |
| 3. Desire | "Imagine sleeping knowing that… the damage has a ceiling" | man sleeping + "damage with a ceiling" |
| 4. Ease | "You don't need to be an expert, or a programmer" | limit panel + "no expert needed" |
| 5. Discovery | "It's three tweaks: a limit, one key per use, an alarm…" | padlock, keys and bell + the 3 tweaks coming in |
| 6. Benefit | "The scare turns into a notification on your phone…" | torn bill + "no limit × with limit" |
| 7. Comment | "It's all on inema.club. Or ask me for the link…" | inema.club screenshot + red CTA as a question |
The engine is a web page (motor/mapa.html) filmed at 30 frames per second. It receives the avatar, the timing of each word, the images and the scene generated from the sheet.
Black background, the current image with a light zoom, top banner with badge, panel with items and counter, karaoke captions and the CTA as a question.
motor/render.mjs records the page in a hidden Chrome (display :99), without opening anything on the screen of whoever is working.
motor/compor_avatar.sh puts the face in the corner box, the voice at −14 LUFS and the low music track that ducks when the voice comes in.
r7ex was built for the INEMA server. Copies on another machine need the same pieces.
Python 3 for the scripts and local Whisper; Node for the render engine and the HeyGen studio.
npm install # engine dependencies
Draws the opening with the title and one image per part, through the subscription.
codex --versionNei's avatar through the subscription, in the hidden browser. Generate only with the OK for that production.
# Nei's OK for this reel echo 'Nei, <data>: "ok"' > avatar/APROVADO_HEYGEN
A one-line request is enough: "r7ex: <your thesis> · destination: <course/page> · channel: lives3 · you may generate the avatar". After that, these are the commands.
Copies the template into a new folder with the sheet to fill in: plan, opening, the 7 parts (speech + image or screenshot + panel), CTA and destination.
python3 r7ex.py novo hacker # creates edicoes/<data>-hacker/ficha.yaml
Checks 7 parts, speech between 550 and 700 characters, and that every panel word exists in the speech of that part.
python3 r7ex.py checar edicoes/2026-10-18-hacker
Images + avatar → word timing → scene → render → 12-frame sheet. With --de it reuses a ready-made avatar.
python3 r7ex.py fazer edicoes/2026-10-18-hacker python3 r7ex.py fazer edicoes/2026-10-18-hacker --de avatar.mp4 # avatar already exists
Read the opening (title spelling) and the review sheet: nothing covering anything, legible screenshots.
# open and check
edicoes/<pasta>/capa/abertura.png
edicoes/<pasta>/build/folha.jpg
Sends the video to bot v3 and puts it at the end of the channel queue (default lives7). The queue publishes 1 every 2 h, from 9 am to 9 pm. Never a direct upload.
python3 r7ex.py enviar edicoes/<pasta> # bot v3 python3 r7ex.py fila edicoes/<pasta> # end of the channel queue python3 fila/fila.py --status # view the queue
Separate steps: avatar, imagens, cena, render, revisar (run python3 r7ex.py to see them all).
Frames from the final reels: opening with the drawn title, one image per stage, panel timed to the speech and the close with inema.club.


The content got it right in batch 3 (strong theses, trigger, plan) and the form got it right in batch 4 (TV-news engine).