DocsShip

Handoff and export

Export your UI for a game, a programmer or a coding agent. Every export checks the document first and tells you what’s wrong before you send anything.

On Hand off, open the document checks, then Export on the AI handoff package to see the files it writes; Esc leaves without exporting.

Exporting

Open the Hand off menu above the canvas, or the Handoff page (Ctrl E, or G H), which shows a card for each export, the document checks, the agent prompt and your recent exports.

Export What you get
AI handoff package… <name>_handoff.zip: everything a programmer or a coding agent needs to wire the UI into a game (below)
Godot 4 package… <name>_godot.zip: the envy_ui addon, your document and a demo scene
Unity package… <name>_unity.zip: the Envy UI package for UI Toolkit, your document and a demo script
Web HTML… <name>.html: one playable file with the runtime and your document. Anyone can click through it in a browser
Document (.envy.json)… The .envy.json file with its images embedded. Every runtime loads it as it is
Copy agent prompt A prompt for a coding agent, on the clipboard
Selection or screen as PNG The selected layer, or the open screen, as an image
All screens as PNG Every screen at 1× and 2×, zipped

Each export opens a dialog that lists the files it will write. Document errors block the AI, Godot, Unity and web exports, so a broken UI doesn’t reach a game; warnings don’t, and the Document export is never blocked. The web dialog also has envy-runtime.js only, for the runtime on its own.

To repeat an export with the same settings, press Save as preset… in the dialog and give it a name. The Preset list then fills the dialog in one step. Presets belong to the project and stay in this browser, and the document doesn’t change (see Export presets).

In the desktop app, the message after an export names the saved file and has Show in folder. To save a .envy project with its images and fonts as separate files, use File › Save a copy (.envy)… (see Projects and saving).

The AI handoff package

<name>_handoff.zip holds one <name>_handoff/ folder:

File Purpose
AGENTS.md Instructions for coding agents: rules, files, integration steps for Godot, Unity and the web, the full event and data contract, and an acceptance checklist
CLAUDE.md A short file that points Claude Code at AGENTS.md
PROMPT.md Ready-to-paste prompts for Godot, Unity and the web
SCREENS.md, screens/ A layer outline of every screen (text, bindings, actions, notes) and reference renders. Each scenario has a folder with the screens it changes
contract.json Events (with the layers that emit them), data paths (type, sample, where they’re used, and whether the UI writes them), screens, animations, scenarios, sounds (format and who plays each) and the layers that shrink to fit
ui/<name>.envy.json The document
godot/<name>_ui.gd, godot/addons/envy_ui/ A generated controller with typed setters and an event match, and the runtime with its license
unity/<Name>UI.cs, unity/Packages/com.mythicbrain.envy-ui/ A generated C# controller with typed setters and an event switch, and the Unity package
web/<name>-ui.ts, web/envy-runtime.js, web/LICENSE A typed wrapper (unions of events, screens and paths), the runtime and its license
schema/envy.schema.json, tools/envy.mjs So agents can edit the document safely and validate it
mcp.json, tools/envy-mcp.mjs An MCP server, so a coding agent can read and edit the document through tools. See For AI coding agents
FONTS-NOTICE.md The license notice for embedded fonts, when the document embeds any
MANIFEST.json Every file the package should hold, and any that are missing

Include screenshots of every screen is on by default, at ½ size or Full. If a screenshot fails to render, nothing is saved and the dialog names the screens. Choose Export without screenshots or fix the screen and try again.

The rule the package teaches: load the document with the runtime and never rebuild screens by hand. Game code only connects data and events.

What the generated code looks like

For The Last Hunt · UI kit v2, the Godot controller has a setter per data path and a case per event. Each setter has a doc comment that says where the path is shown, such as boss.hp: shown in 09 HUD · Boss fight › Boss › bar › Boss health (value):

func set_boss_hp(value: float) -> void:
	ui.set_data("boss.hp", value)

func _on_ui_event(event: String, payload: String) -> void:
	ui_action.emit(event, payload)
	match event:
		"new_hunt":
			# From: 02 Main menu › Main menu › Items › New hunt
			pass  # TODO
		_:
			push_warning("Unhandled UI event: %s" % event)

The TypeScript wrapper turns the same contract into types, so a typo in an event name is a compile error.

The Godot package

<name>_godot.zip holds addons/envy_ui/, ui/<name>.envy.json, a demo scene (envy_demo.tscn and envy_demo.gd), ENVY_README.txt and, when fonts are embedded, FONTS-NOTICE.md.

  1. Unzip it into the root of your Godot 4.6+ project.
  2. Enable Envy UI in Project › Project Settings › Plugins.
  3. Open envy_demo.tscn and press F6.

See Godot runtime.

The Unity package

<name>_unity.zip holds Packages/com.mythicbrain.envy-ui/ (the runtime, with its license), Assets/UI/<name>.envy.json, a demo script (Assets/EnvyDemo.cs), ENVY_README.txt and, when fonts are embedded, FONTS-NOTICE.md.

  1. Unzip it into the root of your Unity 6.3+ project, next to Assets/.
  2. Add the EnvyDemo component to an empty GameObject and press Play.

See Unity runtime.

Without the editor

The CLI writes the same text files from a document: node tools/envy.mjs handoff ui.envy.json out/.

Developer notes

Any layer can carry notes for implementers: what it’s for, how it should behave, edge cases. Write them in the Developer notes section of the inspector’s Interact tab. They’re included in SCREENS.md and AGENTS.md.

Updated View as Markdown