How Hearth works
Hearth is a 2D game engine you can drive by hand or hand to a coding agent. Both go through the same commands, so anything you can do in the editor, your agent can do from a terminal.
Point your agent at your project
Register the MCP server, or skip MCP and use the CLI. Both land on the same commands and the same project folder.
Have it call get_agent_instructions first for the house
rules and active modes.
MCP guide CLI guide
Everything goes through one command list
71 engine commands, each validated against a schema before it runs. If it is not a registered command, nothing can do it, your agent included.
get_project_infoinspect_sceneinspect_entitylist_componentsinspect_apiinspect_pathvalidate_projectcreate_entityadd_componentset_component_propertyset_propertiesupdate_settingscreate_scriptattach_scriptedit_scriptcheck_scriptformat_scriptsearch_scriptsreplace_in_scriptscreate_sprite_assetcreate_soundimport_assetspaint_tilesset_tile_autotilecreate_prefabinstantiate_prefabsync_prefab_instancessnapshot_projectget_diffrevert_projectundoredolist_historylist_journalcreate_playtestrun_playtestrun_sceneexport_webexport_desktopget_agent_instructions+ 30 more
Where those 71 live:
- Build the world 26
- Review & undo 12
- Inspect 11
- Assets 10
- Script 9
- Ship 3
Your agent gets a real answer back
Every call returns the same JSON shape, so your agent reads fields instead of scraping your terminal.
follows suggestions[0], and the loop closes without any screen-scraping
Error codes are fixed strings, never sentences:
NOT_FOUNDINVALID_PARAMSSCHEMA_ERRORPERMISSION_DENIEDCONFLICTUNKNOWN_COMMANDINTERNAL_ERROR
Nothing it does is hidden or permanent
The journal, the diff, and the playtests work the same whether a command came from you or from an agent.
Command journal
Every mutating command from every session, kept separate from undo.
Structural diff
What actually changed, with one-click revert in the editor's review panel.
Headless playtests
Scripted input, then assertions, at a fixed timestep. hearth test exits 1 on failure.
You decide what it is allowed to touch
Sessions carry a grant, commands declare what they need. The engine enforces it, not the prompt.
read-only safe-edit code-edit asset-edit build
A denied call returns PERMISSION_DENIED naming the mode
it was missing.
From an empty folder to a game you can ship
About ten minutes, and the steps are the same whether you type them or your agent does.
- 01
Create
hearth init - 02
Behave
hearth create script - 03
Check
hearth test - 04
Ship
hearth export web
The export is a static build ready for itch.io, booting straight into your own first scene with no engine branding. Quickstart Export guide Download Hearth