Getting started
Install pro-visu, scaffold a config, and generate your first assets.
Install
Two ways, same CLI and generators:
| Dev dependency (recommended) | npx / global (no install) | |
|---|---|---|
| Install | pnpm add -D pro-visu | npx pro-visu … (or npm i -g pro-visu) |
| Config | TS (defineConfig) or JSON | JSON |
| Version | pinned in your lockfile | floating (pin with pro-visu@x.y.z) |
A TS config needs the dev dependency — its defineConfig import must resolve from node_modules.
JSON works either way, with autocomplete + validation from a generated pro-visu.schema.json.
Unreleased builds: build the package from a clone, then use a
pnpm linkor afile:path. A plaingithub:pro-laico/pro-visuinstall has no binary, since the package lives in thepackages/pro-visusubdir of the monorepo. See the README.
Initialise
npx pro-visu initIdempotent. Detects package manager, framework, and dev port → writes pro-visu/pro-visu.config.ts;
gitignores pro-visu/output/; adds a "pro-visu" package script; downloads the managed Chromium +
ffmpeg (one-time, shared). Leaves an existing config alone. --json for a dependency-free JSON
config; all flags.
Configure
Edit pro-visu/pro-visu.config.ts — point an asset at your site by setting URL to whatever
you'll run (dev / prod build / deployed):
import { defineConfig } from "pro-visu";
const URL = "http://localhost:3000";
export default defineConfig({
settings: { outDir: "output" }, // → pro-visu/output/
assets: [
{
name: "home-reel",
url: URL,
generator: "scroll-reel",
},
],
});Full shape (settings, defaults, splitting into modules): Configuration. Every asset type + its options: Generators.
Generate
Start your site (or use a deployed URL), then:
npx pro-visu generateAssets → outDir + manifest.json; review with npx pro-visu list. generate probes the URLs
up front and fails fast when nothing's listening — so if the port doesn't match your dev server,
fix URL.
Don't want to start the site yourself? A managed server builds → starts → captures → stops it, so
generateis the only command you run.