Beatoven
Compose hierarchical animation & simulation plans, generate full library-backed code, play it back, and inline-edit with .edit.
Beatoven turns a prompt into a playable AnimationObject:
- Imports full capability surfaces for GSAP, Anime.js, Motion, Theatre.js, Typed.js, Three.js, Lottie, Manim, MoviePy, Textual, Bevy, Unity, libGDX, and more
- SLM / cloud guided compose binds real library APIs (not a tiny subset) via heuristic, local Qwen, or OpenAI/Claude/Grok
- Builds a hierarchy plan: scene → acts → shots → layers → tracks → keyframes
- Supports draft → finalize and Deep Mode cinematic enhancement
- Returns runnable code (not stubs) plus a built-in web player
anim.edit(...)/anim.deep(...)for inline revisions and capability-max enhancements- Optional Hugging Face SLM (hardware-sized Qwen) or cloud providers when API keys are set
Install
From PyPI (recommended)
pip install beatoven pulls the full dependency stack — play (Pillow), video (MoviePy / imageio-ffmpeg), cloud clients (OpenAI + Anthropic), and local SLM (torch / transformers / accelerate / huggingface_hub):
pip install beatoven
pip install -U beatoven
beatoven --help
python -c "from beatoven import compose; print(compose('Type Hi', provider='heuristic').summary())"
pip install "beatoven[dev]" # pytest, ruff, build, twine
Package: https://pypi.org/project/beatoven/
From source (development)
git clone https://github.com/ehallford11714/beatoven.git
cd beatoven
python -m venv .venv
.\.venv\Scripts\pip install -e ".[dev]"
python -m pytest -q
Quick start
from beatoven import compose
anim = compose(
"Type 'Beatoven' letter-by-letter, then drop a rubber ball in a Three.js room",
languages=["javascript", "python"],
provider="heuristic", # or auto / local / openai / claude / grok
)
print(anim.plan.summary())
print(anim.code["javascript"][:400])
anim.play() # opens browser player
anim.edit("make the title blue and stagger faster")
anim.edit(path="scene/act1/shot1/title", props={"text": "Beatoven Live"})
anim.export("out/index.html")
Draft + edit
anim = compose("Type 'Draft Scene' + bouncing ball", draft=True)
anim.edit("use Typed.js style typing; title color cyan")
anim.finalize()
anim.play()
Grounded iterative satisfaction
Compose now verifies the plan/code against the prompt using a documentation contract (libraries, physics, engines, typing) and iteratively repairs gaps until the threshold is met (default on):
anim = compose(
"Type 'Nova' then drop a rubber ball in a Babylon physics room",
provider="heuristic",
grounded=True, # default
max_ground_iters=3,
satisfaction_threshold=0.85,
)
print(anim.verify().summary()) # [PASS] score=...
anim.ground(max_iters=2) # force another grounded repair loop
Direct object playback (showWhenDone)
Playback is no longer HTML-only. You get a live Python / JS / IR player object:
anim = compose("Type 'Beatoven' then bounce a ball", provider="heuristic")
# Python player object — samples IR, shows native window when done
player = anim.play(runtime="python", show_when_done=True)
print(player.sample(1.0))
# JavaScript-facing object (dict) for hosts / notebooks
js = anim.to_js_object(show_when_done=True)
print(js["type"], js["duration"])
# Force classic HTML file preview
anim.play(runtime="web", object_playback=False, show_when_done=True)
Deep Mode + multicascade
Deep Mode expands capability coverage. Cascade runs multi-pass SLM/heuristic refinement (structure → physics → cinematography → detail → engine bind) for Babylon / Unity / Bevy / Three complex scenes:
anim = compose(
"Babylon physics room with stacked boxes and a bouncing ball",
provider="auto",
cascade=True,
cascade_passes=4,
)
print(anim.plan.enhancements["cascade"])
anim.play(runtime="python", show_when_done=True)
anim.deep("more cinematic camera and bloom")
anim.cascade("richer multi-body physics", passes=3)
CLI
python -m beatoven compose --prompt "Type 'Hello' then bounce a ball" --lang javascript,python --play
python -m beatoven compose --prompt "..." --deep --play
python -m beatoven compose --prompt "Babylon physics stack" --cascade --cascade-passes 4 --play
python -m beatoven compose --prompt "..." --draft --out out
python -m beatoven edit out/beat.json --instruction "make the title blue and stagger faster"
python -m beatoven deep out/beat.json --instruction "cinematic bloom + dolly" --play
python -m beatoven cascade out/beat.json --passes 4 --play
python -m beatoven play out/beat.json --runtime python
python -m beatoven play out/beat.json --runtime web --html
python -m beatoven export out/beat.json --out out/clip.html
python -m beatoven catalog --domain text_ui
python -m beatoven probe
Providers
| Value | Behavior |
|---|---|
auto |
Cloud if API key present → else local Qwen when configured → else heuristic |
openai / claude / grok |
Cloud APIs |
openai_compatible |
BEATOVEN_LLM_BASE_URL + key + model |
local |
On-device Qwen/HF sized via hardware probe |
heuristic |
Offline catalog + hierarchy planner |
Environment: OPENAI_API_KEY, ANTHROPIC_API_KEY, XAI_API_KEY / GROK_API_KEY, BEATOVEN_LLM_API_KEY, BEATOVEN_LLM_BASE_URL, BEATOVEN_LLM_MODEL, BEATOVEN_PROVIDER, BEATOVEN_LOCAL_MODEL.
Documentation
| Doc | Description |
|---|---|
| docs/INDEX.md | Docs home |
| docs/TUTORIAL.md | Step-by-step tutorial |
| docs/API.md | Public API reference |
| docs/COMPONENTS.md | Every module explained |
| docs/CLI.md | CLI reference |
| docs/LIBRARIES.md | Capability pack catalog |
| docs/ARCHITECTURE.md | Pipeline & Deep Mode |
Example prompts
See examples/prompts.md. Runnable scripts:
examples/text_typing_web.pyexamples/draft_and_edit.pyexamples/threejs_physics_scene.pyexamples/deep_mode_demo.py
Layout
src/beatoven/ # library
capabilities/ # full API surfaces per library
generators/ # JS / Python / Rust / C# / Java
runtime/ # play + export
providers/ # heuristic / local / cloud
tests/
examples/
docs/ # tutorial, API, components, CLI, libraries
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beatoven-0.5.0.tar.gz.
File metadata
- Download URL: beatoven-0.5.0.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f62a02ca0245500d447a6c3a6e3d4bce7dfaa822ba96e5a71c7b5d5c26cea814
|
|
| MD5 |
6ffa065d7f7b0df817cbda36353f7ae2
|
|
| BLAKE2b-256 |
29134d4a4c34fbf79082794d570bb98d02d0b28b083d013dabef38af39a6a95e
|
File details
Details for the file beatoven-0.5.0-py3-none-any.whl.
File metadata
- Download URL: beatoven-0.5.0-py3-none-any.whl
- Upload date:
- Size: 77.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8a1b07117a2652c25dc993e604dd6a6184cf1e7bee756e480f4125af6d4808b
|
|
| MD5 |
2e69824619ebb879417e51b1ea9ec3bf
|
|
| BLAKE2b-256 |
7a637645dc8b3ce0d302011b07f1c16d803d8a9c0a76c8d789804f687f852a6d
|