DocsShip

CLI

tools/envy.mjs is a single Node.js file (Node 20.12 or newer). It ships in every AI handoff package, so agents and CI can use it without the editor.

$ node tools/envy.mjs validate the-last-hunt-v2.envy.json
0 error(s), 0 warning(s) · 20 screens (+4 component sheets), 43 components (180 variants), 6087 layers

Commands

Command Does
envy validate <file> [--json] Checks references and contracts. Exits with 1 on errors, so it can gate CI. --json prints the issues as JSON
envy describe <file> [--screen "Name"] Markdown outline of screens: text, bindings, actions. --screen takes a name or an id
envy contract <file> Events, data paths, screens and animations as JSON
envy prompt <file> [--engine godot|web] A prompt for an AI coding assistant, for Godot unless you pass --engine web
envy handoff <file> <out-dir> Writes AGENTS.md, PROMPT.md, SCREENS.md, contract.json, ui/<name>.envy.json, schema/envy.schema.json, the code stubs godot/<name>_ui.gd and web/<name>-ui.ts, and a copy of the CLI (tools/envy.mjs), plus FONTS-NOTICE.md when fonts are embedded. The runtimes, screenshots, CLAUDE.md, the MCP server and MANIFEST.json come with the editor’s AI handoff package
envy schema The JSON Schema of the document format
envy pack <file> <out.envy> Writes a project zip: the document plus its images, fonts and sounds in assets/
envy unpack <project.envy> <out-dir> Writes the document and its asset files into a folder
envy inline <project.envy> <out.envy.json> Writes one document with every asset embedded
envy --version Prints the version, like envy 0.2.0
envy help Prints the commands. --help and -h do the same

Flags can go anywhere after the command. Exit codes: 0 when it worked, 1 when validate finds errors, 2 for a wrong command or a file it can’t read or write.

In CI

- run: node tools/envy.mjs validate ui/my_ui.envy.json

A failing check stops the build before a broken UI reaches players.

What validate checks

validate runs the same document checks as the editor. Errors break the UI in a game; warnings are worth a look.

  • Structure: missing children, parents, components, assets, tokens, screens and animations; duplicate ids and parent cycles; unknown layer types and fields of the wrong type.
  • Values: invalid colors, borders, paths, guides, layout grids, fonts, transitions, overlay and scroll settings, image crops, statuses and groups.
  • Behavior: empty event names, payload templates that won’t be filled, focus targets that aren’t buttons or sit on another screen, list settings, scenarios, and screens that share a name.
  • Components: properties with the wrong type, a missing target or an unknown value, and overrides of layers that no longer exist.
  • Text: missing text styles, and translation keys that are invalid, missing or unused.
  • Data: data paths with no sample value.
  • Assets: images with no asset, sources that aren’t project paths, embedded images over the size budget and, in the CLI only, asset files the document names that the project or its folder doesn’t contain.
Updated View as Markdown