Skip to content

CLI reference

Two binaries ship from the vyasa workspace:

BinaryRole
vyasacCompile, pack, check, and publish workspaces
vyasavInspect packed .vyview files and weave URNs with the viewer runtime

Build them with cargo build -p vyasac --release and cargo build -p vyasav --release (vyasav’s cli feature is on by default). The WASM library used by web apps is a separate wasm-pack artifact; native cargo test does not refresh it.

Publisher walkthrough: Packing and publishing.

vyasac <COMMAND>

Pack the workspace into PATH/build/<id>.<ext> (PATH defaults to .).

FlagDefaultMeaning
--profile <NAME>default[build.<NAME>] in vyasac.toml
--strictoffFail on verification warnings (including bloat hard-gates)

Filename is <workspace.id or name>.<ext>, or <id>-<profile>.<ext> when the profile is not default. Extension follows [build.<profile>] target:

targetFileTypical use
view (default).vyviewReader apps
sqlite.sqliteTooling database
zip.zipSource-exchange archive
vyir.vyirIntermediate representation

Load the workspace and validate source without writing a package. --strict fails on warnings.

Copy build/<id>.vyview into [publish] publisher_dir and update that publisher’s catalog.json. Requires publisher.toml.

Compile to files under --output (default build/) for template debugging. Reader apps do not load this tree.

FlagMeaning
-o, --output <DIR>Output directory
--target <json|html|…>File format
--template <NAME>HTML shell / template name
--collection <NAME>Collection (e.g. toc)
--view <NAME>Shorthand for template + collection
--projection <NAME>Projection profile (html, voice, …)
--strictFail on warnings

Parse one .vy file and print the AST (debug).

vyasav <COMMAND>

Native-only (not compiled into the WASM library). JSON is the default when stdout is not a TTY.

Inspect a packed .vyview without sqlite3.

Terminal window
vyasav inspect dist/pub.vyview
vyasav inspect --table html_templates dist/pub.vyview
vyasav inspect --table html_blocks --urn 1:1 dist/pub.vyview
vyasav inspect --table manifest dist/pub.vyview
vyasav inspect --check dist/pub.vyview
vyasav inspect --analyze dist/pub.vyview
FlagMeaning
--table <NAME>Dump one table (html_templates, html_blocks, streams, manifest, …)
--urn <REL>Filter block/graph rows to a relative URN (e.g. 1:1)
--format json|textOverride TTY detection
--limit <N>Row cap; omit for per-table defaults; 0 = all rows
--checkLogical checks: streams, layout {{ body }}, truncated CSS, leading newlines in packed HTML
--analyzedbstat table-size analysis

With no --table / --urn, prints a summary (tables, views, next commands).

Weave one URN with the same runtime the browser uses. Prints vyasa.weave_diagnostics.v1 JSON (counts and events), not the HTML.

Terminal window
vyasav weave --urn 1:1 --view reading dist/pub.vyview
vyasav weave --urn 1:1 --layout '{"rows":[[{"block":"mula"}]]}' dist/pub.vyview
FlagMeaning
--urn <REL>Relative or full URN (leaf address that has a block)
--view <NAME>Packed view name (default reading)
--layout <JSON>Layout spec for weave_layout; overrides --view

--layout block values are packed stream names (folder ids), not the Toml key primary. See Streams and the URN spine.