CineCode
Reference

CLI

Every cinecode subcommand and flag.

The cinecode binary has a small set of subcommands. Run cinecode --help or cinecode <command> --help for the built-in usage.

cinecode new

Scaffold a new project.

cinecode new <name>
ArgumentDescription
<name>Directory to create, containing codescene.toml, scenes/, and src/.

The scaffold also creates assets/ and shaders/, then prints the check, preview, and render commands to run next.

cinecode add scene

Create a scene file and append it to an existing project's manifest.

cinecode add scene <name> [--project <path>] [--template <template>]
OptionDescription
<name>Display name; converted to a safe lowercase file slug.
-p, --project <path>Project directory or codescene.toml (default .).
--template <template>blank, code-walkthrough, or before-after-diff.

The update is atomic and validated. Existing files, duplicate manifest entries, unsafe names, or a template that cannot build cause an error with no partial manifest change.

cinecode render

Render a project to a video (or image sequence).

cinecode render <project> -o <output> [flags]
FlagDescription
<project>Path to the project folder (containing codescene.toml).
-o, --output <path>Output file (.mp4) or directory (with --format png).
-s, --scene <name|index>Render only this scene. Index is 1-based.
--from <frame>First output frame to render (0-based, inclusive; default 0).
--to <frame>Stop before this output frame (exclusive; defaults to the end).
--gpuUse the GPU backend (required for shaders/bloom).
--bloom <n>Bloom intensity for the GPU backend.
--crf <18โ€“28>H.264 quality; lower is better/larger.
--preset <p>ffmpeg speed preset (ultrafast โ€ฆ veryslow).
--ssaa <1โ€“4>CPU supersampling (anti-aliasing). Default 2.
--format pngExport numbered PNG frames instead of a video.
-q, --quietMinimal output.
-v, --verboseDetailed output.

Scene selection is 1-based. -s 1 is the first scene; -s 0 errors.

Supersampling

The CPU backend renders each frame at ssaaร— the output resolution and box- averages it down, which smooths every edge โ€” strokes, glyphs, and rounded panels โ€” and keeps camera zooms from shimmering or "crawling".

ValueUse
1Native resolution, fastest. Edges may alias under zoom.
2Default. The sweet spot โ€” smooth, modest cost.
3โ€“4Final/hero exports. Sharper still, but 4ร— renders 16ร— the pixels.

--ssaa applies to the CPU backend. The default of 2 is why fresh renders already look anti-aliased โ€” pass --ssaa 1 to opt out, or --ssaa 4 for a final pass.

Quick previews with frame ranges

--from and --to slice the assembled output timeline by frame number. They do not select scene names; use --scene for that. The start is inclusive and the end is exclusive, so this renders frames 90 through 149:

cinecode render my-video --from 90 --to 150 -o preview.mp4

Examples

cinecode render my-video -o out.mp4
cinecode render my-video -s intro -o intro.mp4
cinecode render my-video -s 3 -o scene3.mp4
cinecode render my-video --from 90 --to 180 -o preview.mp4
cinecode render my-video -o final.mp4 --crf 18 --preset slow
cinecode render my-video -o effects.mp4 --gpu --bloom 0.8
cinecode render my-video -o hero.mp4 --ssaa 4 --crf 18 --preset slow
cinecode render my-video --format png -o frames/

cinecode check

Parse the manifest and all scene scripts and report errors without rendering. Beyond load errors (missing scene/source files, bad .ccs syntax, missing fonts), it reports per-scene warnings (zero-frame or empty scenes, mismatched dimensions, duplicate node ids) and whether ffmpeg is on your PATH.

cinecode check <project>

cinecode dump-ir

Build the project and print its Scene Document (the engine IR) as JSON โ€” useful for debugging what the scripts produced, or for caching a built document.

cinecode dump-ir <project> [--scene <name|index>] [--output ir.json]
FlagDescription
-s, --scene <name|index>Limit to one scene.
-o, --output <path>Write to a file instead of stdout.

cinecode explain-frame

Evaluate a single frame of a scene and print each node's resolved animation state (opacity, offset, scale, focus line, dim, highlight bar, typewriter / reveal progress, blur) plus the camera framing โ€” a fast way to see exactly what the renderer "sees" at a moment, without producing pixels.

cinecode explain-frame <project> [--scene <name|index>] --frame <n>

Example output:

Scene "Run" (id scene_0) @ frame 80/210 (2.67s @ 30fps), 1280x720
Camera: none (identity framing, zoom 1.0)
Nodes (5):
  [code_2] code        op 1.00 focus L1.0 dim 0.55 bar 1.00 type 100%
  [var_3] text        op 0.00 scale 0.70  (hidden)

cinecode preview

Open an interactive window playing a scene, re-rendered on the CPU in real time (no SSAA, no MP4 encode) โ€” the fast iteration loop.

cinecode preview <project> [--scene <name|index>]
KeyAction
SpacePlay / pause
โ† / โ†’Step one frame back / forward (pauses)
RReload โ€” re-run the scripts to pick up .ccs edits
SSave the current frame as preview_<scene>_<frame>.png
EscQuit

Preview needs a display (it won't run headless). It previews one scene at a time โ€” pass --scene to pick which. Saving a PNG uses ffmpeg.

cinecode themes

List available project and code highlight themes.

cinecode themes

cinecode languages

List the languages available for syntax highlighting.

cinecode languages

On this page