Faster, safer Godot scene edits for agents
godot-cli gives a coding agent one command for a whole scene change, from a terminal or over MCP. Every edit is checked against Godot's own class reference, and the .tscn, .tres and project.godot files it writes match the editor's saves byte for byte.
$ curl -fsSL https://raw.githubusercontent.com/unabated-games/godot-cli/main/install.sh | bash
$ godot-cli scene instance add main.tscn \ --parent /root/Main --name HUD --catalog-id ui/hud [node name="HUD" parent="." unique_id=1886270267 instance=ExtResource("4_7dm0k")]
- v0.29.0, released 19 November 2026
- Compared with Godot's own saves on every push
- Type-checked against Godot's class reference
- Works in Claude Code, Cursor and OpenCode
Ask an agent for a HUD and look at the scene tree
Scene text is hard to write blind, so an agent left alone builds the HUD in GDScript. The game runs and the scene stays empty. godot-cli gives it a safe way to put the nodes where the editor expects them.
func _ready() -> void: var bar = load("res://ui/health_bar/health_bar.tscn").instantiate() add_child(bar)
- HUD
- Nothing else here. The layout exists only while the game is playing.
$ godot-cli scene instance add hud.tscn \ --parent /root/HUD --name PlayerHealth \ --catalog-id ui/health_bar --project-root .
- HUD
- PlayerHealth instance of ui/health_bar
- Score
- PauseButton
This game was built from a terminal
Gem Grove is one shell script of godot-cli commands plus six short GDScript files. Nobody opened the editor and nobody typed a line of scene text. Play it here, then read how each stage went in.
- 8scenes, every one passing scene validate
- 13signal connections, all in the scene files
- 319lines of GDScript, for the rules and the animation
- 0lines of hand-written scene text
Four stages, and the frame godot-cli captured after each
-
Stage 1 A project and a level A new project.godot, WASD and arrow keys in the input map, and a level scene with its background.project new --name "Gem Grove" project input apply
-
Stage 2 Actors from the catalog The robot, a gem and a slime are each their own scene. One patch places six gems and three slimes by catalog id.catalog add actors/gem.tscn scene apply main.tscn --patch
-
Stage 3 A HUD you can open in the editor Hearts, score, a touch joystick, title card and game over card: 23 nodes, fonts and style boxes in a single write.scene apply ui/hud.tscn --patch scene instance add --catalog-id
-
Stage 4 Rules, then a test drive The run clicks Play and steers the robot into two gems. The score reads 2, and the log has no errors.project run --click PlayButton@10 --press move_right@20..55
Why you can trust what it writes
Writing a scene Godot can open is a low bar. The bar here is writing the scene Godot itself would have saved, then proving the change works before anyone reviews it.
It writes what the editor writes
On every push, Godot saves a fixture scene headless, godot-cli writes the same scene, and cmp compares the two files. The test runs against the current stable Godot releases and the newest prerelease. When it fails, the tool is wrong and the editor is right.
No reformatted-by-tool noise in your diffs, and opening the project in the editor changes nothing.
Stay byte-compatible with Godot[gd_scene format=3 uid=…] [node name="Fixture" type="Node2D" unique_id=…]
[gd_scene format=3 uid=…] [node name="Fixture" type="Node2D" unique_id=…]
It catches the typo before the run
scene validate checks every value, signal and method against a table generated from Godot's own class reference. It reads your scripts too, so a connection to a method that does not exist fails here, not in the running game.
[err] property_type_mismatch:
Control.visible is bool, and this
value is vector2
One document, one write
A player is a node, a collision shape, a sprite and a texture reference. Send the whole change as one JSON document. If any step fails, the file on disk is untouched, and --dry-run shows the tree you would end up with.
{ "recipe": "player_2d",
"parent": "/root/Main",
"name": "Player",
"texture": "res://art/player.png" }
"ok": true, "error_count": 0
Then it runs the game and looks
project run imports the project, runs it, keeps the last frame and reads the log. It exits 1 on any ERROR line. It can click a button on a chosen frame or hold an input action, so an agent proves the wiring without test code in your game. Over MCP the frame comes back as an image.
It knows what you have already built
An agent starts each session knowing none of your parts, so it rebuilds your health bar out of raw nodes. A catalog manifest beside a scene says what it is for, and the agent instances it by id.
- actors/gem
- A gem that emits
collectedwhen the player touches it - When to use Anything the player picks up for score
- Signals collected
Built for agents, usable by hand
godot-cli mcp serves every command as a tool for Claude Code, Cursor and OpenCode. In a shell, --json on any command returns one envelope with a stable exit code. For people there is help on everything, a man page, and completions for bash, zsh and fish.
$ godot-cli scene validate main.tscn --project-root . --json { "ok": true, "data": { … }, "messages": [], "failure": null }Set up an agent
What it is not
- It is not a game engine. Running the game is handed to the Godot you already have installed.
- It does not read binary
.scnor.resfiles. - It will not replace the editor when you are nudging a sprite two pixels to the left by eye.
- Godot prereleases are tested on every push, as a check that does not block. A format change there shows up in our CI before it shows up in your project.
Install it and author a first scene
Two lines, then the getting started page walks you through a first scene.
$ curl -fsSL https://raw.githubusercontent.com/unabated-games/godot-cli/main/install.sh | bash $ source "$HOME/.godot-cli/env.sh"
- Getting startedInstall, author a first scene, and learn when --project-root matters.
- Build the demo gameGem Grove's build script, stage by stage, with the frame captured after each.
- Set up an agentInstall the skill, write the project rules, and spot when an agent drifts back to building nodes in code.
- Teach an agent your sub-scenesFrom a scene on disk to an agent instancing it by id, every command shown with its output.
- Refactor an existing projectExtract a subtree, move files without stale paths, and check what your scripts still reach.
- Command referenceEvery command and option, generated from the binary's own command tree.
