module

Vow::CLI::Gen

vow gen — turn a Vow manifest into a typed client.

Two ways to supply the manifest: --manifest <file.json> read a manifest JSON file directly (pure, no compile) --entry <app.cr> compile+run a Crystal file that requires Vow and annotates methods with @[Vow::Export]; Vow emits the manifest itself — no dump code to write

With --check, nothing is written: Vow regenerates in memory and compares against the files already at --out, exiting non-zero if they differ. Commit the generated client, then run vow gen … --out client --check in CI to fail the build when a service change left the checked-in client stale.

Constants

ROLE_EXT = {"ts" => ".ts", "js" => ".js", "dts" => ".d.ts"}

The extension for each artifact role. --target already names the language, so --out is a stem (public/vowClient), not a filename with an extension to repeat — Vow appends the right one(s): .ts for the ts module, .js + .d.ts for the js runtime and its types.

STEM_EXTS = [".d.ts", ".mjs", ".js", ".ts"]

A trailing client extension on --out is tolerated (and stripped) so an explicit --out client.js still does the sensible thing; longest first so .d.ts isn't mistaken for .ts.

Class methods

command
Source
run(cmd : Argy::Command) : Nil

Writes through the command's stdout/stderr (argy 0.4+) rather than the global streams: the generated client goes to stdout, the "wrote …" status to stderr, so callers (and specs) can redirect or capture output instead of polluting the real terminal.

Source