JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57
  • Score
    100M100P100Q76782F
  • License MIT

CLI for validating, previewing, inspecting, and rendering ui2v video projects

Package Exports

  • @ui2v/cli

Readme

@ui2v/cli

Chinese

Command-line interface for validating, previewing, inspecting, and rendering ui2v animation JSON projects.

Most users should install the short package name:

npm install -g @ui2v/cli
# or: bun install -g ui2v
ui2v --version

This implementation package can also be installed directly:

npm install -g @ui2v/cli

First Render

ui2v doctor
ui2v validate examples/library-timeline/animation.json --verbose
ui2v preview examples/library-timeline/animation.json --pixel-ratio 2
ui2v render examples/library-timeline/animation.json -o .tmp/examples/library-timeline.mp4 --quality high

Run without a global install:

npx @ui2v/cli --version
npx @ui2v/cli render examples/library-timeline/animation.json -o library-timeline.mp4 --quality high

Commands

The preview command opens ui2v Studio: project list, timeline editing, ripple segment packing, runtime inspect, CodeMirror JSON editor, beat template strip, split-at-playhead, and Export MP4.

ui2v doctor
ui2v init my-video
ui2v validate animation.json --verbose
ui2v preview animation.json --pixel-ratio 2
ui2v inspect-runtime animation.json --time 0 --time 1
ui2v list-beats
ui2v insert-beat animation.json beat-gsap --time 2
ui2v lint-timeline animation.json
ui2v render animation.json -o output.mp4
ui2v info

Beat templates

ui2v list-beats
ui2v list-beats --schema template --json
ui2v insert-beat animation.json beat-d3 --time 4
ui2v insert-beat animation.json runtime-gsap-beat --time 9.5 --json
ui2v insert-beat animation.json --list

list-beats and insert-beat share the same maintained catalog as Studio beat chips. Template projects use beat-* layers; runtime projects use runtime-* segments.

Render Options

ui2v render animation.json -o output.mp4 --quality high --fps 60
ui2v render animation.json -o output.mp4 --width 1280 --height 720 --render-scale 2
ui2v render animation.json -o output.mp4 --codec avc --bitrate 8000000
ui2v render animation.json -o output.mp4 --timeout 300 --no-headless

render currently targets MP4. AVC/H.264 is the default codec. HEVC can be requested only when the local browser supports it.

Local Development

bun install
bun run build
node packages/cli/dist/cli.js doctor

If no browser is found, install Chrome, Edge, or Chromium locally. If auto-detection fails, set one of these environment variables:

PUPPETEER_EXECUTABLE_PATH=/path/to/chrome node packages/cli/dist/cli.js doctor
CHROME_PATH=/path/to/chrome node packages/cli/dist/cli.js doctor

License

MIT