Command reference
This page is generated from the CommandSpec tree inside godot-cli by zig build docs, and CI fails if it drifts from the binary. The same content is available offline as man godot-cli, and as data through godot-cli reference --format json.
godot-cli — Create, edit, and manipulate Godot scenes and resource files
Every command accepts the global options, and with --json
returns the envelope described in
development principles.
godot-cli [global options] <command> [command options] [args...]
Global options
| Option | Value | Description |
|---|---|---|
-h, --help |
— | Show help and exit |
--version |
— | Show version and exit |
--json |
— | Emit machine-readable JSON output |
-v, --verbose |
— | Enable verbose logging on stderr |
--request |
<value> |
Run using a JSON command descriptor |
--request-file |
<path> |
Read JSON command descriptor from a file |
--request-stdin |
— | Read JSON command descriptor from stdin |
Command index
| Command | Summary |
|---|---|
godot-cli help |
Show help for a command |
godot-cli ping |
Framework health check |
godot-cli uid |
Godot-compatible resource and scene ID helpers |
godot-cli uid encode |
Encode a numeric Resource UID to uid:// text |
godot-cli uid decode |
Decode uid:// text to a numeric Resource UID |
godot-cli uid create-for-path |
The UID Godot would assign a new file (to read a file's existing UID, use uid read) |
godot-cli uid read |
Read the UID a file records, from the file itself |
godot-cli uid scene-id |
Scene-local 5-character unique id helpers |
godot-cli uid scene-id generate |
Generate scene unique ids with a deterministic seed |
godot-cli uid cache |
Inspect project uid_cache.bin |
godot-cli uid cache list |
List all UID cache entries |
godot-cli uid cache lookup |
Resolve uid:// text to path or path to uid:// text |
godot-cli uid session |
Persistent ext_resource id session cache |
godot-cli uid session import |
Import ext_resource ids from a Godot-saved scene |
godot-cli scene |
Inspect and edit Godot scene files |
godot-cli scene new |
Create a new empty scene file |
godot-cli scene describe |
Everything about a scene in one call: nodes with properties, connections, references, scripts |
godot-cli scene refs |
List ext_resource references in a scene |
godot-cli scene ext |
Add or remove external resources |
godot-cli scene ext add |
Add an ext_resource section |
godot-cli scene ext remove |
Remove an ext_resource by id |
godot-cli scene sub |
Add or remove sub-resources |
godot-cli scene sub add |
Add a sub_resource section |
godot-cli scene sub remove |
Remove a sub_resource by id |
godot-cli scene inspect |
Parse a .tscn file and report structure and ID issues |
godot-cli scene node |
List and query scene node tree |
godot-cli scene node list |
List all nodes in a scene with paths and section lines |
godot-cli scene node get |
Get one node by viewport path or by name |
godot-cli scene node add |
Add a child node under a parent path |
godot-cli scene node remove |
Remove a node by viewport path |
godot-cli scene node rename |
Rename a node and rewrite descendant parent attributes |
godot-cli scene node reparent |
Move a node under a new parent path |
godot-cli scene node move |
Reorder a node among its siblings |
godot-cli scene connection |
Signal connections stored in the scene ([connection] sections) |
godot-cli scene connection list |
List signal connections with from/to as viewport paths |
godot-cli scene connection add |
Connect a signal from one node to a method on another |
godot-cli scene connection remove |
Remove a signal connection |
godot-cli scene extract |
Move a subtree into its own scene and instance it back in place |
godot-cli scene instance |
Add instanced PackedScene nodes |
godot-cli scene instance add |
Instance a PackedScene under a parent node |
godot-cli scene template |
Built-in scene templates for scaffolding |
godot-cli scene template list |
List built-in scene templates |
godot-cli scene template show |
Show template metadata, node tree, and sections |
godot-cli scene template copy |
Copy a template to a new scene file |
godot-cli scene recipes |
List the intent recipes and the fields each takes |
godot-cli scene plan |
Expand intent JSON to a patch and preview (no write) |
godot-cli scene apply |
Apply a declarative JSON patch to a scene |
godot-cli scene diff |
Compare node trees between two scenes |
godot-cli scene restore |
Restore a scene from a snapshot file |
godot-cli scene validate |
Validate scene IDs and references (fails on errors) |
godot-cli scene validate-batch |
Validate multiple scene files (aggregated JSON, exit 1 on any error) |
godot-cli scene set-property |
Set a property on a node section and save the scene |
godot-cli scene normalize |
Repair scene-local IDs and sort ext_resource sections for save |
godot-cli scene retarget-ext |
Replace ext_resource paths across one or more files |
godot-cli scene round-trip |
Parse and rewrite a scene; fail if structure is not preserved |
godot-cli scene compare-godot |
Compare a scene to a Godot headless save (semantic match) |
godot-cli resource |
Inspect and edit Godot resource files |
godot-cli resource new |
Create a new .tres resource file |
godot-cli resource sub |
Sub-resources embedded in a .tres |
godot-cli resource sub add |
Add a sub_resource; reference it as SubResource("<id>") |
godot-cli resource sub remove |
Remove a sub_resource by id |
godot-cli resource ext |
External resource references in a .tres |
godot-cli resource ext add |
Register an external file; reference it as ExtResource("<id>") |
godot-cli resource ext remove |
Remove an ext_resource by id |
godot-cli resource inspect |
Parse a .tres file and report structure and ID issues |
godot-cli resource validate |
Validate resource IDs and references (fails on errors) |
godot-cli resource validate-batch |
Validate multiple resource files (aggregated JSON, exit 1 on any error) |
godot-cli resource set-property |
Set a property on a resource section and save |
godot-cli resource normalize |
Repair scene-local IDs and sort ext_resource sections for save |
godot-cli resource retarget-ext |
Replace ext_resource paths across one or more files |
godot-cli resource round-trip |
Parse and rewrite a resource file; fail if structure is not preserved |
godot-cli resource compare-godot |
Compare a resource to a Godot headless save (semantic match) |
godot-cli catalog |
Project component catalog |
godot-cli catalog add |
Create or update a JSON catalog manifest for a scene |
godot-cli catalog relink |
Repoint manifests whose scene has moved |
godot-cli catalog scan |
Scan project for catalog manifests |
godot-cli catalog list |
List valid catalog entries |
godot-cli catalog show |
Show merged catalog entry by id |
godot-cli catalog validate |
Validate catalog manifests in a project |
godot-cli catalog search |
Search project catalog entries and builtins |
godot-cli catalog export |
Export agent digest markdown |
godot-cli batch |
Run multiple CLI commands in one invocation |
godot-cli project |
Read and write Godot project.godot settings |
godot-cli project new |
Create a project.godot in a new or empty folder |
godot-cli project import |
Run Godot's headless import so new files get UIDs and .import data |
godot-cli project resave |
Have Godot save a copy of a scene the way the editor would, the reference for compare-godot |
godot-cli project run |
Run the game for a few frames and capture the last frame and the log |
godot-cli project show |
Summarize key project.godot configuration |
godot-cli project move |
Move or rename a file and repoint every reference to it |
godot-cli project apply |
Apply unified project intent JSON (input, settings, autoload, plugins, rendering, physics) |
godot-cli project input |
Input Map actions in project.godot |
godot-cli project input list |
List input actions |
godot-cli project input apply |
Apply input map intent JSON (merge/replace per action) |
godot-cli project input validate |
Validate [input] section event objects |
godot-cli project settings |
Scalar project settings (application, display, layer_names, …) |
godot-cli project settings list |
List settings (optional --section filter) |
godot-cli project settings get |
Get one setting value |
godot-cli project settings set |
Set one setting value |
godot-cli project settings apply |
Apply settings intent JSON (per-key merge) |
godot-cli project settings validate |
Validate res:// paths in settings |
godot-cli project autoload |
Autoload singletons in project.godot |
godot-cli project autoload list |
List autoload entries |
godot-cli project autoload apply |
Apply autoload intent JSON (merge by name; optional replace_all) |
godot-cli project autoload validate |
Validate autoload paths and names |
godot-cli project plugins |
Editor plugins enable/disable in project.godot |
godot-cli project plugins list |
List addons and enabled state |
godot-cli project plugins enable |
Enable one plugin |
godot-cli project plugins disable |
Disable one plugin |
godot-cli project plugins apply |
Apply plugin intent JSON (enable/disable lists) |
godot-cli project plugins validate |
Validate enabled plugin paths exist |
godot-cli project rendering |
Rendering method and graphics driver settings |
godot-cli project rendering list |
List [rendering] section settings |
godot-cli project rendering apply |
Apply rendering intent JSON (friendly aliases) |
godot-cli project rendering validate |
Validate known rendering method/driver values |
godot-cli project physics |
Physics engine and gravity settings |
godot-cli project physics list |
List [physics] section settings |
godot-cli project physics apply |
Apply physics intent JSON (friendly aliases) |
godot-cli project physics validate |
Validate known physics engine and scalar values |
godot-cli project export |
Export presets in export_presets.cfg, and the export itself |
godot-cli project export list |
List export presets |
godot-cli project export show |
Show one export preset |
godot-cli project export options |
List the export options a platform has |
godot-cli project export apply |
Create, update, rename, or remove export presets |
godot-cli project export validate |
Check export_presets.cfg for what Godot would drop or reject |
godot-cli project export build |
Export the project with a preset (runs Godot) |
godot-cli completions |
Print shell completions (bash, zsh, fish) |
godot-cli man |
Print the godot-cli(1) man page in roff format |
godot-cli reference |
Print the command reference as Markdown or JSON |
godot-cli mcp |
Serve the commands as MCP tools over stdio |
Commands
godot-cli help
Show help for a command
godot-cli help
godot-cli ping
Framework health check
Returns a trivial response so callers can verify JSON and CLI wiring.
godot-cli ping
godot-cli uid
Godot-compatible resource and scene ID helpers
godot-cli uid [options]
Subcommands
| Subcommand | Summary |
|---|---|
encode |
Encode a numeric Resource UID to uid:// text |
decode |
Decode uid:// text to a numeric Resource UID |
create-for-path |
The UID Godot would assign a new file (to read a file's existing UID, use uid read) |
read |
Read the UID a file records, from the file itself |
scene-id |
Scene-local 5-character unique id helpers |
cache |
Inspect project uid_cache.bin |
session |
Persistent ext_resource id session cache |
godot-cli uid encode
Encode a numeric Resource UID to uid:// text
Converts a 63-bit integer to Godot's uid:// representation.
godot-cli uid encode <id>
Arguments
| Argument | Description |
|---|---|
<id> |
Numeric UID to encode |
godot-cli uid decode
Decode uid:// text to a numeric Resource UID
The number comes back as a decimal string, not a JSON number: a UID is 63 bits, far past the 53 a JSON parser that reads numbers as doubles can hold, JavaScript's included, so such a parser would round it. Store it as a signed 64-bit integer or as text.
godot-cli uid decode <uid>
Arguments
| Argument | Description |
|---|---|
<uid> |
uid:// text to decode |
godot-cli uid create-for-path
The UID Godot would assign a new file (to read a file's existing UID, use uid read)
Matches ResourceUID.create_id_for_path using project name, Godot resource path, and file bytes: the UID Godot would assign a file that has none. To find the UID a file already has, use uid read; a binary resource's never equals this. Result data: uid, and id as a decimal string, since a 63-bit number does not survive a JSON parser that reads numbers as doubles.
godot-cli uid create-for-path [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-name |
<value> |
Project application/config/name | — |
--resource-path |
<value> |
Godot path e.g. res://main.tscn | — |
godot-cli uid read
Read the UID a file records, from the file itself
Needs no uid_cache.bin, so it works on a fresh clone. A scene or resource keeps its UID in its own header, binary (.res, .scn) or text (.tscn, .tres); a script keeps it in a .uid sidecar and an imported asset in its .import file. Fails with no_uid_recorded when the file records none. Result data: path, uid, source (text_header, binary_header, uid_sidecar or import_file), and for a binary resource its class, compressed, godot_version and format_version.
godot-cli uid read <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Project file: a scene or resource (.tscn, .tres, .scn, .res), a script, or an imported asset |
godot-cli uid scene-id
Scene-local 5-character unique id helpers
godot-cli uid scene-id [options]
Subcommands
| Subcommand | Summary |
|---|---|
generate |
Generate scene unique ids with a deterministic seed |
godot-cli uid scene-id generate
Generate scene unique ids with a deterministic seed
godot-cli uid scene-id generate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--seed |
<value> |
32-bit seed (e.g. path.hash() from Godot) | — |
--count |
<value> |
Number of ids to generate (default 1) | — |
godot-cli uid cache
Inspect project uid_cache.bin
godot-cli uid cache [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List all UID cache entries |
lookup |
Resolve uid:// text to path or path to uid:// text |
godot-cli uid cache list
List all UID cache entries
godot-cli uid cache list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli uid cache lookup
Resolve uid:// text to path or path to uid:// text
godot-cli uid cache lookup [options] <query>
Arguments
| Argument | Description |
|---|---|
<query> |
res:// path or uid:// text to look up |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli uid session
Persistent ext_resource id session cache
godot-cli uid session [options]
Subcommands
| Subcommand | Summary |
|---|---|
import |
Import ext_resource ids from a Godot-saved scene |
godot-cli uid session import
Import ext_resource ids from a Godot-saved scene
Updates scene_id_cache.json so future saves reuse Godot-assigned ext_resource ids.
godot-cli uid session import [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--referrer |
<value> |
Referrer res:// path (scene being saved) | — |
--from |
<path> |
Godot-saved scene to import ids from | — |
--id-session |
<path> |
Session cache JSON path | — |
--project-root |
<path> |
Godot project root (default session path under .godot/) | — |
godot-cli scene
Inspect and edit Godot scene files
godot-cli scene [options]
Subcommands
| Subcommand | Summary |
|---|---|
new |
Create a new empty scene file |
describe |
Everything about a scene in one call: nodes with properties, connections, references, scripts |
refs |
List ext_resource references in a scene |
ext |
Add or remove external resources |
sub |
Add or remove sub-resources |
inspect |
Parse a .tscn file and report structure and ID issues |
node |
List and query scene node tree |
connection |
Signal connections stored in the scene ([connection] sections) |
extract |
Move a subtree into its own scene and instance it back in place |
instance |
Add instanced PackedScene nodes |
template |
Built-in scene templates for scaffolding |
recipes |
List the intent recipes and the fields each takes |
plan |
Expand intent JSON to a patch and preview (no write) |
apply |
Apply a declarative JSON patch to a scene |
diff |
Compare node trees between two scenes |
restore |
Restore a scene from a snapshot file |
validate |
Validate scene IDs and references (fails on errors) |
validate-batch |
Validate multiple scene files (aggregated JSON, exit 1 on any error) |
set-property |
Set a property on a node section and save the scene |
normalize |
Repair scene-local IDs and sort ext_resource sections for save |
retarget-ext |
Replace ext_resource paths across one or more files |
round-trip |
Parse and rewrite a scene; fail if structure is not preserved |
compare-godot |
Compare a scene to a Godot headless save (semantic match) |
godot-cli scene new
Create a new empty scene file
Writes a minimal gd_scene with a single root node, and with --script a script attached to that root. Use scene node add to build the tree. Result data: path, uid, root_name, root_type, root_path, script and script_ext_id when a script was given, dry_run, summary.
godot-cli scene new [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Output .tscn path (required) (required) | — |
--root-name |
<value> |
Scene root node name (default: Root) | — |
--root-type |
<value> |
Scene root node type (default: Node) | — |
--no-uid |
— | Do not stamp a uid="uid://..." on the header | — |
--script |
<value> |
Attach this script to the root: res://scripts/main.gd (or a path relative to the project root). Adds the ext_resource, with its uid when --project-root finds one, and sets script on the root | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene describe
Everything about a scene in one call: nodes with properties, connections, references, scripts
The tree with each node's properties, instanced nodes resolved to the class they really are (with --project-root), the [connection] sections, every external reference with whether it resolves, and the scripts attached to nodes. Replaces the node list, inspect, connection list, refs and node get calls a caller would otherwise make to learn one scene before changing it.
godot-cli scene describe [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (optional): resolves an instanced node to its scene's root class; the file is read either way | — |
godot-cli scene refs
List ext_resource references in a scene
With a project root, resolves res:// paths to filesystem paths and reports whether each file exists.
godot-cli scene refs [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli scene ext
Add or remove external resources
godot-cli scene ext [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Add an ext_resource section |
remove |
Remove an ext_resource by id |
godot-cli scene ext add
Add an ext_resource section
Inserts before node sections and assigns a Godot-style id (e.g. 1_ab12c).
godot-cli scene ext add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--type |
<value> |
Godot resource type (e.g. Script, PackedScene) (required) | — |
--path |
<value> |
Godot res:// path for the external resource (required) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene ext remove
Remove an ext_resource by id
Takes the scene path and the resource id (e.g. 1_abc12). Fails with referrer list if the id is still referenced in property text.
godot-cli scene ext remove [options] <file> <id>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<id> |
Resource id as written in the file, e.g. CapsuleShape2D_abc12 |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene sub
Add or remove sub-resources
godot-cli scene sub [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Add a sub_resource section |
remove |
Remove a sub_resource by id |
godot-cli scene sub add
Add a sub_resource section
Inserts before node sections and assigns a Godot-style id (e.g. CapsuleShape3D_ab12c).
godot-cli scene sub add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--type |
<value> |
Godot resource class (e.g. RectangleShape2D) (required) | — |
--property |
<value> |
Property to set on the new resource; repeat with --value for several | — |
--value |
<value> |
Property value (Variant text), one per --property | — |
--properties |
<value> |
JSON object of property name to value, instead of or as well as --property/--value; where both set one property, this object wins. Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--raw-value |
— | Write property value verbatim | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene sub remove
Remove a sub_resource by id
Takes the scene path and the resource id (e.g. 1_abc12). Fails with referrer list if the id is still referenced in property text.
godot-cli scene sub remove [options] <file> <id>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<id> |
Resource id as written in the file, e.g. CapsuleShape2D_abc12 |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene inspect
Parse a .tscn file and report structure and ID issues
Reads section headers, parsed properties (with --json), and runs ID validation. With a project root, uids are checked against uid_cache.bin.
godot-cli scene inspect [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
--no-validate |
— | Skip ID validation | — |
--parse-properties |
— | Include parsed property values in JSON output | — |
--no-parse-properties |
— | Omit parsed properties (faster for large files) | — |
godot-cli scene node
List and query scene node tree
godot-cli scene node [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List all nodes in a scene with paths and section lines |
get |
Get one node by viewport path or by name |
add |
Add a child node under a parent path |
remove |
Remove a node by viewport path |
rename |
Rename a node and rewrite descendant parent attributes |
reparent |
Move a node under a new parent path |
move |
Reorder a node among its siblings |
godot-cli scene node list
List all nodes in a scene with paths and section lines
godot-cli scene node list [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (optional): resolves an instanced node to its scene's root class; the file is read either way | — |
godot-cli scene node get
Get one node by viewport path or by name
Pass file and node path (e.g. /root/Root/Player), or use --node-name with optional --parent.
godot-cli scene node get [options] <file> [node]
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
[node] |
Node by viewport path; omit when using --node-name (optional) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--node-name |
<value> |
Node name to look up (alternative to node path positional) | — |
--parent |
<value> |
Parent attribute filter when using --node-name (e.g. "." or "Root") | — |
--project-root |
<path> |
Godot project root (optional; ignored for file-only reads) | — |
godot-cli scene node add
Add a child node under a parent path
Requires --parent, --name, and --type. The node is added as the parent's last child, or where --index puts it. Assigns unique_id on save via save preparation. With --dry-run, section_text is the exact section a write would add. The unique_id in it is the one the write assigns, because it is seeded from the scene's path, so a write straight after gives the same text.
godot-cli scene node add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--parent |
<value> |
Viewport parent path (e.g. /root/Main) (required) | — |
--name |
<value> |
Node name (required) | — |
--type |
<value> |
Godot node class name (e.g. CharacterBody2D) (required) | — |
--property |
<value> |
Property to set on the new node; repeat with --value for several | — |
--value |
<value> |
Property value (Variant text), one per --property | — |
--properties |
<value> |
JSON object of property name to value, instead of or as well as --property/--value; where both set one property, this object wins. Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--raw-value |
— | Write property value verbatim | — |
--unique-name |
— | Set unique_name_in_owner on the new node (Access as Unique Name / %Name) | — |
--index |
<n> |
Position among the parent's children, as Godot's move_child counts it: 0 is first, -1 is last; without it the node is added last | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene node remove
Remove a node by viewport path
Takes the scene path and the node's viewport path (e.g. /root/Main/Player). Fails if the node has children unless --recursive is set.
godot-cli scene node remove [options] <file> <node>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<node> |
Node by viewport path, e.g. /root/Main/Player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--recursive |
— | Remove descendant nodes as well | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene node rename
Rename a node and rewrite descendant parent attributes
Takes the scene path and the node's viewport path: scene node rename main.tscn /root/Main/Player --name Hero. Connections from or to the node follow the rename.
godot-cli scene node rename [options] <file> <node>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<node> |
Node by viewport path, e.g. /root/Main/Player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--name |
<value> |
New node name (required) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene node reparent
Move a node under a new parent path
Takes the scene path and the node's viewport path: scene node reparent main.tscn /root/Main/Player/Camera --parent /root/Main. The node becomes the new parent's last child, as in the editor, or the one --index names. With --project-root, script lines that reach the node by a path ($Player/Camera, get_node("Player/Camera")) are listed, since those break; %Name references resolve through the owner and keep working.
godot-cli scene node reparent [options] <file> <node>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<node> |
Node by viewport path, e.g. /root/Main/Player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--parent |
<value> |
New parent, viewport path (e.g. /root/Main) (required) | — |
--index |
<n> |
Position among the parent's children, as Godot's move_child counts it: 0 is first, -1 is last; without it the node goes last | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene node move
Reorder a node among its siblings
Takes the scene path and the node's viewport path: scene node move hud.tscn /root/HUD/Bar/Leave --index -1. Child order is draw order in 2D, and layout order in a container. --index counts as Godot's move_child does: 0 is first, -1 is last. The node's children move with it, and its path does not change, so nothing that names it breaks; only a script that picks children by position, with get_child(), sees a different node.
godot-cli scene node move [options] <file> <node>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<node> |
Node by viewport path, e.g. /root/Main/Player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--index |
<n> |
Position among the parent's children, as Godot's move_child counts it: 0 is first, -1 is last (required) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene connection
Signal connections stored in the scene ([connection] sections)
The editor's Node dock writes a [connection] section per connected signal. These commands read and write the same sections, so a button wired here shows connected in the editor and needs no _ready() code.
godot-cli scene connection [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List signal connections with from/to as viewport paths |
add |
Connect a signal from one node to a method on another |
remove |
Remove a signal connection |
godot-cli scene connection list
List signal connections with from/to as viewport paths
godot-cli scene connection list [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (optional): resolves an instanced node to its scene's root class; the file is read either way | — |
godot-cli scene connection add
Connect a signal from one node to a method on another
Both nodes must exist. Fails with DuplicateConnection if the same signal, nodes, and method are already connected.
godot-cli scene connection add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--from |
<value> |
Emitting node, viewport path (e.g. /root/Main/Menu/Resume) (required) | — |
--signal |
<value> |
Signal name (e.g. pressed) (required) | — |
--to |
<value> |
Receiving node, viewport path (required) | — |
--method |
<value> |
Method on the receiving node's script (e.g. _on_resume_pressed) (required) | — |
--deferred |
— | CONNECT_DEFERRED: call at idle time | — |
--one-shot |
— | CONNECT_ONE_SHOT: disconnect after the first emission | — |
--binds |
<value> |
Extra arguments as Godot array text, e.g. '["quit"]' | — |
--unbinds |
<n> |
Number of trailing signal arguments to drop | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene connection remove
Remove a signal connection
godot-cli scene connection remove [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--from |
<value> |
Emitting node, viewport path (required) | — |
--signal |
<value> |
Signal name (required) | — |
--to |
<value> |
Receiving node, viewport path (required) | — |
--method |
<value> |
Method name; omit to remove every connection of that signal between the two nodes | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene extract
Move a subtree into its own scene and instance it back in place
The editor's Save Branch as Scene. The node and its descendants move to --output with their properties and unique ids; resources they use are copied across and pruned from the source when nothing else needs them; connections and editable-children sections inside the subtree move with paths rewritten; a connection that crosses the boundary is dropped and listed in messages, since the parent scene must connect to the instance instead. The source gets an instance of the new scene at the same place. With --catalog-id the new scene is registered as a catalog entry.
godot-cli scene extract [options] <file> <node>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<node> |
Node by viewport path, e.g. /root/Main/Player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--editable |
— | Mark the instance left behind as editable, so a connection to a node inside it can be written without re-adding the instance | — |
--retarget-dropped-connections |
— | Re-point a connection whose emitter moved at the new scene's root instead of dropping it; the method it names is then the new root's to implement, and is listed in messages | — |
--tags |
<value> |
Comma-separated tags for the catalog entry (with --catalog-id) | — |
--when-to-use |
<value> |
When an agent should reach for the new component (with --catalog-id) | — |
--when-not-to-use |
<value> |
When an agent should use something else (with --catalog-id) | — |
--output |
<path> |
Path of the new scene, relative to the project root (becomes res://<output>) (required) | — |
--catalog-id |
<value> |
Also register the new scene in the project catalog under this id (needs the project root) | — |
--summary |
<value> |
Catalog summary for the new entry | — |
--no-uid |
— | Do not stamp a uid="uid://..." on the new scene's header | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene instance
Add instanced PackedScene nodes
godot-cli scene instance [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Instance a PackedScene under a parent node |
godot-cli scene instance add
Instance a PackedScene under a parent node
Adds ext_resource type=PackedScene and a node with instance=ExtResource(...). Use --scene or --catalog-id (project entries only). With --dry-run, section_text is the exact section a write would add. The unique_id in it is the one the write assigns, because it is seeded from the scene's path, so a write straight after gives the same text.
godot-cli scene instance add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--parent |
<value> |
Viewport parent path (e.g. /root/Main) (required) | — |
--name |
<value> |
Node name for the new instance (required) | — |
--scene |
<value> |
PackedScene res:// path to instance | — |
--catalog-id |
<value> |
Project catalog id (resolves the scene path; needs the project root) | — |
--editable |
— | Mark the instance editable in the parent scene ([editable path=...]) | — |
--unique-name |
— | Set unique_name_in_owner on the instance root (%Name from owner scripts) | — |
--properties |
<value> |
JSON object of property name to value to set on the instance root (anchors, offsets, overrides). Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene template
Built-in scene templates for scaffolding
godot-cli scene template [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List built-in scene templates |
show |
Show template metadata, node tree, and sections |
copy |
Copy a template to a new scene file |
godot-cli scene template list
List built-in scene templates
godot-cli scene template list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--templates-root |
<path> |
Directory containing built-in templates (default: compile-time templates/) | — |
--content |
— | Include raw .tscn source in template show output | — |
--no-parse-properties |
— | Omit parsed properties from template show sections | — |
godot-cli scene template show
Show template metadata, node tree, and sections
Like scene inspect + node list for a built-in template. Use --content for raw .tscn text.
godot-cli scene template show [options] <template>
Arguments
| Argument | Description |
|---|---|
<template> |
Template id, e.g. 2d/top_down_player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--templates-root |
<path> |
Directory containing built-in templates (default: compile-time templates/) | — |
--content |
— | Include raw .tscn source in template show output | — |
--no-parse-properties |
— | Omit parsed properties from template show sections | — |
godot-cli scene template copy
Copy a template to a new scene file
Requires --output. Optional --rename-node and --set-property apply edits before save preparation.
godot-cli scene template copy [options] <template>
Arguments
| Argument | Description |
|---|---|
<template> |
Template id, e.g. 2d/top_down_player |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--templates-root |
<path> |
Directory containing built-in templates (default: compile-time templates/) | — |
--rename-node |
<value> |
Rename node(s) after copy: Old:New pairs, comma-separated | — |
--set-property |
<value> |
Set properties after copy: path/prop=value or path|prop|value, comma-separated | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (required) (required) | — |
--dry-run |
— | Report copy without writing | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene recipes
List the intent recipes and the fields each takes
The same table scene plan and scene apply expand from, as JSON: name, summary, required and optional fields. Served over MCP as the resource godot-cli://docs/recipes.
godot-cli scene recipes
godot-cli scene plan
Expand intent JSON to a patch and preview (no write)
Expands an intent into patch ops and previews them; with a scene path, dry-runs the patch against that scene. Give the document as a file (--intent, --patch) or inline (--intent-json, --patch-json).
An intent is {"steps": [{"recipe": "player_2d", "parent": "/root/Main", "name": "Player"}]}. Recipes: add_node, node_set, assign_ext, connect, instance_catalog, instance_scene, instance_override, catalog_button, player_2d, static_body_2d, camera_2d, camera_3d, place_3d, ui_panel, tilemap_layer, audio_player. Every recipe takes "parent" and "name" except node_set, assign_ext, instance_override, and connect, which address existing nodes by "path" (or "from"/"to"). The fields of each recipe: scene recipes (MCP resource godot-cli://docs/recipes).
A patch is {"ops": [{"op": "node_add", "parent": "/root/Main", "name": "HUD", "type": "CanvasLayer", "properties": {"visible": false}}]}. In a properties object, numbers and booleans are JSON and a string carries its own quotes: "text": "\"Score\"". Full reference: agent_scene_authoring.md, served over MCP as godot-cli://docs/scene-authoring.
godot-cli scene plan [options] [file]
Arguments
| Argument | Description |
|---|---|
[file] |
Scene file to dry-run the expanded patch against (optional) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--intent |
<path> |
Intent JSON with steps/recipes (expands to patch ops) | — |
--patch |
<path> |
Existing patch JSON to validate and preview | — |
--intent-json |
<value> |
The intent itself, instead of a file: {"steps": [{"recipe": "player_2d", "parent": "/root/Main", "name": "Player"}]}; recipe fields: scene recipes | — |
--patch-json |
<value> |
The patch itself, instead of a file: {"ops": [{"op": "node_add", "parent": "/root/Main", "name": "HUD", "type": "CanvasLayer"}]} | — |
--write-patch |
<path> |
Write expanded patch JSON to this path | — |
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli scene apply
Apply a declarative JSON patch to a scene
Applies a patch, or an intent expanded to one, as a single write; if any op fails the file is untouched. Give the document as a file (--intent, --patch) or inline (--intent-json, --patch-json); preview first with --dry-run, whose preview_sections holds the exact text of every section a write would add or change, in file order and with the unique_ids a write assigns, and preview_diff the change node by node.
An intent is {"steps": [{"recipe": "player_2d", "parent": "/root/Main", "name": "Player"}]}. Recipes: add_node, node_set, assign_ext, connect, instance_catalog, instance_scene, instance_override, catalog_button, player_2d, static_body_2d, camera_2d, camera_3d, place_3d, ui_panel, tilemap_layer, audio_player; their fields: scene recipes (MCP resource godot-cli://docs/recipes). A patch is {"ops": [{"op": "node_add", "parent": "/root/Main", "name": "HUD", "type": "CanvasLayer", "properties": {"visible": false}}]}. In a properties object a string carries its own quotes: "text": "\"Score\"". Full reference: agent_scene_authoring.md, served over MCP as godot-cli://docs/scene-authoring.
godot-cli scene apply [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--patch |
<path> |
JSON patch file with | — |
--intent-json |
<value> |
The intent itself, instead of a file: {"steps": [{"recipe": "player_2d", "parent": "/root/Main", "name": "Player"}]}; recipe fields: scene recipes | — |
--patch-json |
<value> |
The patch itself, instead of a file: {"ops": [{"op": "node_add", "parent": "/root/Main", "name": "HUD", "type": "CanvasLayer"}]} | — |
--intent |
<path> |
Intent JSON (expands to patch ops via scene plan) | — |
--auto-snapshot |
— | Snapshot the scene before applying, to .godot/godot-cli/snapshots/<its res:// path> under --project-root (beside the scene without one); the result names it | — |
--record-undo |
— | Record undo patch ops in JSON output | — |
--write-undo-patch |
<path> |
Write undo patch JSON to this path (implies --record-undo) | — |
--no-strict |
— | Continue applying ops after a failure (default: stop on first error) | — |
--preview-properties |
— | With --dry-run, include property-level changes in preview_diff | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene diff
Compare node trees between two scenes
Compares <before> with <after> (a and b, their old names, still work over MCP); added means in after and not before, and in the result _a is before and _b is after. Reports added, removed, type-changed and unique_id-changed nodes; connections; and ext_resources (keyed by path) and sub_resources (keyed by id) that were added, removed, or changed type or uid. Use --properties for property-level diff: changed properties on nodes in both scenes, every property of a node that was added or removed, and changed properties of a sub_resource, addressed as SubResource("id"). An instanced node's type is its scene's root class when --project-root says where that scene lives, and instance_of then reads PackedScene; without a root its type reads PackedScene. instance_path_a or instance_path_b names the scene.
godot-cli scene diff [options] <before> <after>
Arguments
| Argument | Description |
|---|---|
<before> |
The scene as it was; an added node is one in after and not here |
<after> |
The scene as it is now |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--properties |
— | Include node property diffs (added/removed/changed) | — |
--project-root |
<path> |
Godot project root (optional): resolves an instanced node to its scene's root class; the file is read either way | — |
godot-cli scene restore
Restore a scene from a snapshot file
Copies --from snapshot over the target scene (full file restore).
godot-cli scene restore [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--from |
<path> |
Snapshot file to restore from | — |
--snapshot |
<path> |
Alias for --from | — |
--dry-run |
— | Report restore without writing | — |
godot-cli scene validate
Validate scene IDs and references (fails on errors)
godot-cli scene validate [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli scene validate-batch
Validate multiple scene files (aggregated JSON, exit 1 on any error)
godot-cli scene validate-batch [options] <files>...
Arguments
| Argument | Description |
|---|---|
<files>... |
One or more scene or resource files |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli scene set-property
Set a property on a node section and save the scene
Target a node with --node (viewport path) or --node-name, or a section with --section-line. The value is Variant text, normalised the way the editor writes it unless --raw-value.
godot-cli scene set-property [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--property |
<value> |
Property name to set; repeat with --value for several | — |
--value |
<value> |
Property value (normalized unless --raw-value), one per --property | — |
--properties |
<value> |
JSON object of property name to value, instead of or as well as --property/--value; where both set one property, this object wins. Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--raw-value |
— | Write value verbatim without Variant normalization | — |
--node |
<value> |
Target node by viewport path (e.g. /root/Main/Player) | — |
--node-name |
<value> |
Target node section by name attribute | — |
--section-id |
<value> |
Target an ext_resource or sub_resource by its id (e.g. CapsuleShape2D_abc12) | — |
--section-line |
<n> |
Target section by header line number | — |
--section |
<value> |
Target section by tag name (e.g. resource) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene normalize
Repair scene-local IDs and sort ext_resource sections for save
Runs Godot-compatible save preparation without editing properties. changed says whether the save changes the file, so --dry-run answers "is this file already written the way a save writes it?"; a dry run also returns preview_sections, the exact text of each section a save would change or add.
godot-cli scene normalize [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene retarget-ext
Replace ext_resource paths across one or more files
godot-cli scene retarget-ext [options] <files>...
Arguments
| Argument | Description |
|---|---|
<files>... |
One or more scene or resource files |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--from |
<value> |
Current ext_resource path (res://…) (required) | — |
--to |
<value> |
New ext_resource path (res://…) (required) | — |
--project-root |
<path> |
Godot project root for res:// seed path | — |
--resource-path |
<value> |
Godot res:// path for ID seeding | — |
--no-prepare-save |
— | Skip Godot save preparation on write | — |
--output |
<path> |
Output path when processing a single file | — |
--dry-run |
— | Report changes without writing | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli scene round-trip
Parse and rewrite a scene; fail if structure is not preserved
godot-cli scene round-trip [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Check structure preservation without writing | — |
godot-cli scene compare-godot
Compare a scene to a Godot headless save (semantic match)
Compares the node tree (order, headers, unique_id), each node's properties and their values (ext_resource ids read as the paths they name; not their order), the ext_resource paths, and the scene's and each ext_resource's uid wherever both files carry one. On a mismatch, difference names the first one: properties only one side has, or the first value that differs. skipped lists every difference in the parts not compared: an ext_resource id, a uid only one side has, load_steps, a sub_resource's fields, sub_resources in another order (Godot writes each after what it refers to), a node's properties in another order (the editor writes its class order, as godot-cli now does; a file written elsewhere may not), a connection or other section on one side only. A match with an empty skipped means the files agree everywhere; the ids and missing uids are expected against a project resave copy. The Godot save is --reference, or the second positional on the command line; over MCP it is the reference field (saved, its old name, still works). project resave makes one the way the editor saves, so a match also means the editor would store these properties: position on a 3D node fails it, as the editor writes transform.
godot-cli scene compare-godot [options] <file> [reference]
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
[reference] |
Godot-saved file to compare against (project resave makes one); or pass --reference (optional) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--reference |
<path> |
Godot-saved reference file (default: second positional) | — |
godot-cli resource
Inspect and edit Godot resource files
godot-cli resource [options]
Subcommands
| Subcommand | Summary |
|---|---|
new |
Create a new .tres resource file |
sub |
Sub-resources embedded in a .tres |
ext |
External resource references in a .tres |
inspect |
Parse a .tres file and report structure and ID issues |
validate |
Validate resource IDs and references (fails on errors) |
validate-batch |
Validate multiple resource files (aggregated JSON, exit 1 on any error) |
set-property |
Set a property on a resource section and save |
normalize |
Repair scene-local IDs and sort ext_resource sections for save |
retarget-ext |
Replace ext_resource paths across one or more files |
round-trip |
Parse and rewrite a resource file; fail if structure is not preserved |
compare-godot |
Compare a resource to a Godot headless save (semantic match) |
godot-cli resource new
Create a new .tres resource file
Writes a gd_resource header and a [resource] section. Repeat --property/--value for several properties. Add sub-resources with resource sub add and external files with resource ext add.
godot-cli resource new [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Output .tres path (required) (required) | — |
--type |
<value> |
Resource class (e.g. StandardMaterial3D, Theme, RectangleShape2D) (required) | — |
--property |
<value> |
Property to set on the resource; repeat with --value for several | — |
--value |
<value> |
Property value (Variant text), one per --property | — |
--properties |
<value> |
JSON object of property name to value, instead of or as well as --property/--value; where both set one property, this object wins. Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--raw-value |
— | Write property values verbatim | — |
--no-uid |
— | Do not stamp a uid="uid://..." on the header | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource sub
Sub-resources embedded in a .tres
godot-cli resource sub [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Add a sub_resource; reference it as SubResource("<id>") |
remove |
Remove a sub_resource by id |
godot-cli resource sub add
Add a sub_resource; reference it as SubResource("<id>")
godot-cli resource sub add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--type |
<value> |
Godot resource class (e.g. StyleBoxFlat) (required) | — |
--property |
<value> |
Property to set on the new sub-resource; repeat with --value for several | — |
--value |
<value> |
Property value (Variant text), one per --property | — |
--properties |
<value> |
JSON object of property name to value, instead of or as well as --property/--value; where both set one property, this object wins. Numbers and booleans are JSON; a string is Variant text and carries its own quotes ("text": "\"Score\""), and a constructor is its text with no extra quotes ("position": "Vector2(3, 0)", "mesh": "ExtResource(\"2_rock\")") | — |
--raw-value |
— | Write property values verbatim | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource sub remove
Remove a sub_resource by id
Takes the file path and the resource id. Fails with referrer list if the id is still referenced.
godot-cli resource sub remove [options] <file> <id>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<id> |
Resource id as written in the file, e.g. CapsuleShape2D_abc12 |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource ext
External resource references in a .tres
godot-cli resource ext [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Register an external file; reference it as ExtResource("<id>") |
remove |
Remove an ext_resource by id |
godot-cli resource ext add
Register an external file; reference it as ExtResource("<id>")
godot-cli resource ext add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--type |
<value> |
Resource type of the external file (e.g. Texture2D, Script) (required) | — |
--path |
<value> |
res:// path of the external file (required) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource ext remove
Remove an ext_resource by id
Takes the file path and the resource id. Fails with referrer list if the id is still referenced.
godot-cli resource ext remove [options] <file> <id>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
<id> |
Resource id as written in the file, e.g. CapsuleShape2D_abc12 |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource inspect
Parse a .tres file and report structure and ID issues
Reads section headers, parsed properties (with --json), and runs ID validation.
godot-cli resource inspect [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
--no-validate |
— | Skip ID validation | — |
--parse-properties |
— | Include parsed property values in JSON output | — |
--no-parse-properties |
— | Omit parsed properties (faster for large files) | — |
godot-cli resource validate
Validate resource IDs and references (fails on errors)
godot-cli resource validate [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli resource validate-batch
Validate multiple resource files (aggregated JSON, exit 1 on any error)
godot-cli resource validate-batch [options] <files>...
Arguments
| Argument | Description |
|---|---|
<files>... |
One or more scene or resource files |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for uid_cache lookup and res:// seed path | — |
godot-cli resource set-property
Set a property on a resource section and save
godot-cli resource set-property [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--property |
<value> |
Property name to set | — |
--value |
<value> |
Property value (normalized unless --raw-value) | — |
--raw-value |
— | Write value verbatim without Variant normalization | — |
--section-line |
<n> |
Target section by header line number | — |
--section |
<value> |
Target section by tag name (default: resource) | — |
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource normalize
Repair scene-local IDs and sort ext_resource sections for save
Runs Godot-compatible save preparation without editing properties. changed says whether the save changes the file, so --dry-run answers "is this file already written the way a save writes it?"; a dry run also returns preview_sections, the exact text of each section a save would change or add.
godot-cli resource normalize [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root for res:// seed path and id session cache | — |
--resource-path |
<value> |
Godot res:// path for ID seeding (overrides the project root) | — |
--no-prepare-save |
— | Skip Godot save preparation (ID repair/sort) | — |
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Parse and validate edit without writing | — |
--snapshot |
<path> |
Before writing, copy the file as it is now to this path, for scene diff or scene restore later. Put it under .godot/: a copy Godot can see carries the scene's uid, and Godot then reports a duplicate and may point uid:// references at the copy. Nothing under .godot/ is imported, and it is normally gitignored. Without it, a session still keeps one: the MCP server, or a shell with GODOT_CLI_SESSION set, copies each scene to .godot/godot-cli/session/<its path> before the session's first write to it, and says so. A scene the session created is kept as scene new wrote it | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource retarget-ext
Replace ext_resource paths across one or more files
godot-cli resource retarget-ext [options] <files>...
Arguments
| Argument | Description |
|---|---|
<files>... |
One or more scene or resource files |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--from |
<value> |
Current ext_resource path (res://…) | — |
--to |
<value> |
New ext_resource path (res://…) | — |
--project-root |
<path> |
Godot project root for res:// seed path | — |
--resource-path |
<value> |
Godot res:// path for ID seeding | — |
--no-prepare-save |
— | Skip Godot save preparation on write | — |
--output |
<path> |
Output path when processing a single file | — |
--dry-run |
— | Report changes without writing | — |
--id-session |
<path> |
Path to ext_resource id session cache JSON | — |
--no-id-session |
— | Do not load or update ext_resource id session cache | — |
--godot-save-format |
— | Strip Godot-omitted header fields and default sub_resource properties | — |
--normalize-properties |
— | Rewrite property values through Variant parse/format | — |
godot-cli resource round-trip
Parse and rewrite a resource file; fail if structure is not preserved
godot-cli resource round-trip [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Output path (default: overwrite input) | — |
--dry-run |
— | Check structure preservation without writing | — |
godot-cli resource compare-godot
Compare a resource to a Godot headless save (semantic match)
A resource has no node tree, so this compares only its ext_resource paths and the uids both files carry; the [resource] and sub_resource sections are not compared. On a mismatch, difference names it. The Godot save is --reference, or the second positional on the command line; over MCP it is the reference field (saved, its old name, still works).
godot-cli resource compare-godot [options] <file> [reference]
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
[reference] |
Godot-saved file to compare against (project resave makes one); or pass --reference (optional) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--reference |
<path> |
Godot-saved reference file (default: second positional) | — |
godot-cli catalog
Project component catalog
Create, scan, list, show, validate, search, and export catalog manifests describing project components for LLM agents.
godot-cli catalog [options]
Subcommands
| Subcommand | Summary |
|---|---|
add |
Create or update a JSON catalog manifest for a scene |
relink |
Repoint manifests whose scene has moved |
scan |
Scan project for catalog manifests |
list |
List valid catalog entries |
show |
Show merged catalog entry by id |
validate |
Validate catalog manifests in a project |
search |
Search project catalog entries and builtins |
export |
Export agent digest markdown |
godot-cli catalog add
Create or update a JSON catalog manifest for a scene
Writes <scene>.manifest.json beside the scene, filling scene_uid from the scene header and scaffolding a row for each signal declared by the root script. With --update, prose already written is preserved.
godot-cli catalog add [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene file (.tscn) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--id |
<value> |
Catalog id (default: scene path without res:// and extension) | — |
--summary |
<value> |
One-line description of the component | — |
--when-to-use |
<value> |
When an agent should reach for this component | — |
--when-not-to-use |
<value> |
When an agent should use something else | — |
--notes |
<value> |
Edge cases and variant notes | — |
--tags |
<value> |
Comma-separated tags | — |
--signal-doc |
<value> |
Document a signal the root script declares: <signal>=<what it means>; repeatable, and fills the row catalog add scaffolds | — |
--export-doc |
<value> |
Document an @export the root script declares: <property>=<what setting it does>; repeatable, and fills the row catalog add scaffolds | — |
--function-doc |
<value> |
Document a method callers are meant to use: <function>=<what it does>; repeatable. Not scaffolded, since the script parse reads exports and signals but not functions | — |
--related-ids |
<value> |
Comma-separated related catalog ids | — |
--prefer-over-ids |
<value> |
Comma-separated catalog ids this component should be chosen over | — |
--export-root-script |
<value> |
res:// script to read exports and signals from, when they are not on the root node's own script | — |
--update |
— | Update an existing manifest, keeping prose already written | — |
--output |
<path> |
Manifest path (default: <scene>.manifest.json beside the scene) | — |
--dry-run |
— | Render the manifest without writing it | — |
godot-cli catalog relink
Repoint manifests whose scene has moved
For every manifest whose scene file is missing, resolves its scene_uid through .godot/uid_cache.bin and rewrites the scene path. Requires the project to have been opened in Godot since the move, since the editor is what refreshes that cache. Exits 1 if any manifest is still unrepaired.
godot-cli catalog relink [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--dry-run |
— | Report which manifests would be repointed without writing them | — |
godot-cli catalog scan
Scan project for catalog manifests
Walks the project for *.manifest.json, parses fields, and validates catalog entries.
godot-cli catalog scan [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli catalog list
List valid catalog entries
Runs catalog scan and returns valid entries only (id, scene, summary, tags).
godot-cli catalog list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli catalog show
Show merged catalog entry by id
Returns manifest fields merged with scene nodes and GDScript exports/signals. Builtin ids use the godot/ namespace.
godot-cli catalog show [options] <id>
Arguments
| Argument | Description |
|---|---|
<id> |
Catalog entry id, e.g. ui/button |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli catalog validate
Validate catalog manifests in a project
Runs catalog scan and fails when any manifest has validation errors.
godot-cli catalog validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli catalog search
Search project catalog entries and builtins
Filter by tags and/or free-text query across summaries and documentation fields.
godot-cli catalog search [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--tags |
<value> |
Comma-separated tag filter (all tags must match) | — |
--query |
<value> |
Free-text search across summaries and docs | — |
godot-cli catalog export
Export agent digest markdown
Writes a markdown catalog digest for LLM agents (default: AGENTS.md in the project root).
godot-cli catalog export [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--output |
<path> |
Output markdown path relative to project root (default: AGENTS.md) | — |
--dry-run |
— | Generate markdown without writing the output file | — |
godot-cli batch
Run multiple CLI commands in one invocation
Each step is a full argv array. Modes: stop (default), continue, atomic. See docs/agent_batch_commands.md.
godot-cli batch [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--file |
<path> |
Batch JSON file with mode, rollback, and steps | — |
--json-body |
<value> |
Batch JSON inline (use --file if your shell conflicts with global --request) | — |
godot-cli project
Read and write Godot project.godot settings
Project-level configuration: input, autoloads, plugins, rendering, physics, display, layer names.
godot-cli project [options]
Subcommands
| Subcommand | Summary |
|---|---|
new |
Create a project.godot in a new or empty folder |
import |
Run Godot's headless import so new files get UIDs and .import data |
resave |
Have Godot save a copy of a scene the way the editor would, the reference for compare-godot |
run |
Run the game for a few frames and capture the last frame and the log |
show |
Summarize key project.godot configuration |
move |
Move or rename a file and repoint every reference to it |
apply |
Apply unified project intent JSON (input, settings, autoload, plugins, rendering, physics) |
input |
Input Map actions in project.godot |
settings |
Scalar project settings (application, display, layer_names, …) |
autoload |
Autoload singletons in project.godot |
plugins |
Editor plugins enable/disable in project.godot |
rendering |
Rendering method and graphics driver settings |
physics |
Physics engine and gravity settings |
export |
Export presets in export_presets.cfg, and the export itself |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project new
Create a project.godot in a new or empty folder
Writes the header the project manager writes, config_version=5, and [application] config/name, config/features (the Godot version, from --godot-version or the Godot on the path, and the renderer) and config/icon, plus the main scene and window size when given. Like the project manager, it also writes icon.svg, a .gitignore holding .godot/ and /android/ (.godot/ is Godot's cache, and where export secrets go), and a .gitattributes normalizing line endings, keeping any that already exist (--no-icon, --no-vcs to skip them). Refuses to overwrite an existing project.godot; change that with project settings set or project apply. Result data: path, name, main_scene, icon_written, godot_version, renderer, vcs_files_written, dry_run, summary.
godot-cli project new [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Folder to create the project in (default: current directory) | — |
--name |
<value> |
Project name (application/config/name) (required) | — |
--main-scene |
<value> |
Main scene as a res:// path (application/run/main_scene) | — |
--width |
<n> |
Viewport width in pixels (display/window/size/viewport_width) | — |
--height |
<n> |
Viewport height in pixels (display/window/size/viewport_height) | — |
--dry-run |
— | Report what would be written without creating the file | — |
--no-icon |
— | Do not write the default icon.svg beside project.godot | — |
--godot-version |
<value> |
The Godot version the project is for (4.8, 4.7), written into config/features; default the version of the Godot on the path | — |
--renderer |
<value> |
forward_plus (the default), mobile or gl_compatibility, as the project manager offers | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
--no-vcs |
— | Do not write the .gitignore (ignoring .godot/ and /android/) and .gitattributes the project manager writes | — |
godot-cli project import
Run Godot's headless import so new files get UIDs and .import data
godot --headless --path . --import --quit, from the project root. Run it once after adding scenes, scripts, or textures, before running the game or filling catalog scene_uid fields. Godot writes into the project as it imports: a .import file beside each asset, a .uid file beside each script, and the .godot/ folder, which holds the uid cache. Commit the .import and .uid files: a UID is assigned once and kept there, and if the file changes later, a checkout without them would be assigned a different one.
godot-cli project import [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
godot-cli project resave
Have Godot save a copy of a scene the way the editor would, the reference for compare-godot
Imports (unless --no-import), then has Godot save a copy to --output, by default .godot/godot-cli/resave/<its path>, where Godot imports nothing. Never over the file itself. A scene is built first, as the editor builds the scene it saves: Godot runs headless with the editor hint, instantiates the scene in edit state as the edited scene, in a viewport the project's size, lets a few frames run, sends the pre-save notification, packs it and saves it with the editor's flags. So the copy holds what the editor would store: a 3D node's position comes back as transform, properties in the editor's order, editor-only lines such as anchors_preset kept. An AnimationPlayer or AnimationTree with reset_on_save has its RESET animation applied first, as the editor does. --no-build loads and saves the file as it is instead. scene compare-godot <file> <copy> checks the file against the copy. That check is semantic, not byte for byte: saved to a new path, the copy's ext_resource ids are renumbered and its uids left out, so compare-godot leaves those out and lists them in skipped. Nothing outside .godot/ is written. The driver script it runs is .godot/godot-cli/resave.gd. Result data: file, output, output_path, built, exit, summary.
godot-cli project resave [options] <file>
Arguments
| Argument | Description |
|---|---|
<file> |
Scene or resource file (.tscn or .tres) |
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
--output |
<value> |
Where the copy goes, res:// or project-relative; default .godot/godot-cli/resave/<the file's path>, where Godot imports nothing | — |
--no-import |
— | Skip the import that runs first; a project never imported cannot load its textures | — |
--no-build |
— | Load and save the file as it is, without building the scene first: what Godot writes for the file's own content, not what the editor would store | — |
godot-cli project run
Run the game for a few frames and capture the last frame and the log
Imports (unless --no-import; the import writes .import and .uid files into the project, as project import says), then runs the main scene or --scene with --write-movie into the capture folder (--capture-dir, under .godot/ by default, which Godot never imports), quits after --frames, and reads the log. The result names the last frame, the log and its last 40 lines, and every ERROR or SCRIPT ERROR line with its backtrace; it fails (exit 1) when Godot did not exit cleanly or the log holds an error, so the change is not done until this passes. A run can pass with a wrong layout, so read the frame as well as the log. --press move_right@10..40 holds an input action over a frame range and --click /root/Main/HUD/PauseButton@20 clicks a node, so movement and buttons can be exercised; the frame then shows the result. The cursor moves off the node after a click, so the last frame shows its normal style; --keep-cursor leaves it there for the hover style, and --hover <node>@<frame> shows it with no click at all. --key enter@20 presses a real key, which a Button's shortcut sees and an action from --press does not. Only the game's own cursor moves: the desktop pointer is never moved, and the run's window ignores it. Result data: frame (path of the last PNG), log, log_tail (last 40 lines), errors and error_count, exit and import_exit, stderr_tail, frames_written, frames_per_second (the project's physics tick rate), presses, clicks, keys, hovers, stray_keys (keys that reached the game without the run sending them, such as typing into another app while the run's window has focus), duration_ms, summary. Frames other than the last, and the .wav Godot writes, are deleted unless --keep-frames. Over MCP the frame is also returned as an image.
godot-cli project run [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
--scene |
<value> |
Scene to run (res:// or project-relative); the main scene when omitted | — |
--frames |
<n> |
Frames to run before quitting, one per physics tick: 60 is one second at Godot's default rate, and frames_per_second in the result gives the project's; 5 is enough for a static screen | 60 |
--resolution |
<value> |
Window size as WIDTHxHEIGHT; default is the project's display/window/size, else Godot's own 1152x648 | — |
--capture-dir |
<path> |
Folder under the project for the frame and log; the default is under .godot/, which Godot never imports | .godot/godot-cli |
--no-import |
— | Skip the headless import pass that assigns UIDs to new files | — |
--keep-frames |
— | Keep every frame and the .wav; the default keeps only the last frame | — |
--headless |
— | No window and no frames, only the log; for machines without a display. --press and --click both work: the run puts the project's viewport size back, which the headless display server does not report. What you lose is the frame | — |
--user-arg |
<value> |
Argument passed after --, readable with OS.get_cmdline_user_args(); repeatable | — |
--press |
<value> |
Hold an input action over a frame range, e.g. move_right@10..40 or ui_accept@5; repeatable. Sent as a real InputEventAction and as polled action state, so a focused Control and Input.get_vector both see it. It is the action itself, not a key or button bound to it, so it proves code reacting to the action, not the bindings; project input list reports those. A Button's shortcut never sees an action, since Godot passes only key, joypad-button and shortcut events to shortcut_input: press its key with --key instead | — |
--key |
<value> |
Press a real key over a frame range: <key>@<frame> or <key>@<first>..<last>, with ctrl+, shift+, alt+ or meta+ before it, e.g. enter@20, ctrl+s@10, space@5..30; repeatable. An InputEventKey, so a Button's shortcut sees it and the input map turns it into whatever actions bind it: this proves the binding as well as the code. Keys: a letter or digit, space, escape, tab, backtab, backspace, enter/return, kp_enter, insert, delete, pause, print, home, end, left, up, right, down, pageup, pagedown, shift, ctrl, meta/cmd, alt, capslock, numlock, scrolllock, f1-f12; or a Godot keycode number. Names are matched without case, and KEY_<letter> is accepted | — |
--hover |
<value> |
Move the cursor over a node on a frame without clicking: <node path>@<frame>, e.g. /root/Main/HUD/StartButton@20; repeatable. The node draws its hover style from the next frame, for a --frame-at a frame or two later; a click would press it as well | — |
--click |
<value> |
Left-click the centre of a node on a frame, e.g. /root/Main/HUD/PauseButton@20; repeatable. A Button's pressed signal fires from this, and the cursor moves off the node after the release so later frames show its normal style. Works under --headless too. A click on a node laid out beyond the viewport reaches nothing and fails the run rather than passing silently | — |
--type |
<value> |
Type text into a LineEdit or TextEdit on a frame: <node-path>@<frame>=<text>, e.g. /root/Main/%Email@20=someone@example.com; repeatable. The field is focused and emptied, then the text goes in as real key events, so text_changed fires the way a validating form expects. The value lands the frame after, so click Submit at least two frames later | — |
--focus |
<value> |
Give a Control keyboard focus on a frame: <node-path>@<frame>; repeatable. --type focuses the field it types into, so this is for watching a focus ring or a tab order | — |
--no-auto-camera |
— | For a 3D scene with no Camera3D, capture what the game would show (the clear colour) instead of adding a temporary camera that frames the scene | — |
--keep-cursor |
— | Leave the synthetic cursor on the last clicked node instead of moving it off, so the frame shows that node's hover style; only the in-game cursor moves either way, never the desktop pointer | — |
--frame-at |
<n> |
Also keep this frame (numbered from 0) and return it as frame_at; repeatable, so --frame-at 0 --frame-at 30 keeps a before-and-after pair as well as the last frame | — |
--log-lines |
<n> |
Lines of the log to return inline as log_tail | 40 |
godot-cli project show
Summarize key project.godot configuration
godot-cli project show [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project move
Move or rename a file and repoint every reference to it
Renames the file with its .uid and .import sidecars, rewrites every ext_resource path in the project's scenes and resources, repoints catalog manifests, and updates project.godot settings such as the main scene and autoloads. Paths are res:// or project-relative.
godot-cli project move [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--rename-ids |
— | Re-seed ext_resource ids from the new file name, so a Script_player id stops naming a file called hero.gd; ids already in use are left alone | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
--import |
— | Run Godot's headless import after the move, so its uid cache stops mapping the old path and validation stops reporting uid_path_mismatch | — |
--from |
<value> |
Current path (res://scripts/player.gd or scripts/player.gd), or a folder to rename; repeatable, to move several files into the folder --to names in one call (required) | — |
--to |
<value> |
New path. With several --from, or ending in /, the folder the files go into, keeping their names: --from res://player.tscn --from res://player.gd --to res://actors/player/. For a folder --from, the folder's new path (required) | — |
--dry-run |
— | Report what would change without moving or writing | — |
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project apply
Apply unified project intent JSON (input, settings, autoload, plugins, rendering, physics)
One intent with any of the sections: {"settings": {"application": {"run/main_scene": "res://scenes/main.tscn"}}, "input": {"actions": [{"name": "move_left", "events": [{"type": "key", "keycode": "A", "physical": true}]}]}, "autoload": {"autoloads": [{"name": "GameState", "path": "res://scripts/game_state.gd", "singleton": true}]}, "physics": {"engine_3d": "Jolt Physics"}}. Each section takes the same document as the matching project <section> apply command. Give it as a file (--intent) or inline (--intent-json).
godot-cli project apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: settings {"<section>": {"<key>": value}}, input {"actions": [{"name", "events": [{"type": "key", "keycode": "A", "physical": true}]}]}, autoload {"autoloads": [{"name", "path", "singleton"}]}, plugins, rendering, physics; see the examples | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project input
Input Map actions in project.godot
godot-cli project input [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List input actions |
apply |
Apply input map intent JSON (merge/replace per action) |
validate |
Validate [input] section event objects |
godot-cli project input list
List input actions
Each action's name, deadzone, event_count, and events: each binding as one line in the apply intent's words, such as "A (physical)", "Ctrl+S (physical)", "mouse left", "joypad start" or "joypad left_x -1.0", with "(device N)" when it is pinned to one device. Result data: path, actions, action_count, summary.
godot-cli project input list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project input apply
Apply input map intent JSON (merge/replace per action)
One intent: {"actions": [{"name": "move_left", "deadzone": 0.5, "events": [...]}]}; each action replaces the one of the same name. Event types: {"type": "key", "keycode": <name or number>, "physical": true, "ctrl": false, "shift": false, "alt": false, "meta": false} (physical defaults to true: the key's place on the keyboard, so WASD stays put on AZERTY), {"type": "mouse_button", "button": <name or number>}, {"type": "joypad_button", "button": <name or number>}, {"type": "joypad_motion", "axis": <name or number>, "axis_value": -1.0}. Keys: a letter or digit, space, escape, tab, backtab, backspace, enter/return, kp_enter, insert, delete, pause, print, home, end, left, up, right, down, pageup, pagedown, shift, ctrl, meta/cmd, alt, capslock, numlock, scrolllock, f1-f12; or a Godot keycode number. Names are matched without case, and KEY_<letter> is accepted. Mouse buttons: left, right, middle, wheel_up, wheel_down, wheel_left, wheel_right, xbutton1/x1, xbutton2/x2; or the MouseButton number. Names are matched without case. Joypad buttons: a/south, b/east, x/west, y/north, back/select, guide/home, start, left_stick/l3, right_stick/r3, left_shoulder/lb, right_shoulder/rb, dpad_up, dpad_down, dpad_left, dpad_right, misc1, paddle1-4, touchpad, misc2-6; or the JoyButton number. Names are matched without case. Joypad axes: left_x/LX, left_y/LY, right_x/RX, right_y/RY, trigger_left/LT, trigger_right/RT; or the JoyAxis number. Names are matched without case. Result data: path, intent, applied_actions, actions (each applied action's events in words, as input list gives them, on a dry run too, so the bindings can be checked before anything is written), added_count, replaced_count, dry_run, summary. To check a change that touches only the input map: project input validate, then project run with --press <action>@<frames> on any scene that reacts to the action (--scene res://... when the project has no main scene), and read the log.
godot-cli project input apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: {"actions": [{"name": "move_left", "deadzone": 0.5, "events": [{"type": "key", "keycode": "A", "physical": true}, {"type": "joypad_motion", "axis": "left_x", "axis_value": -1.0}]}]}; each action replaces one of the same name, and deadzone is optional (Godot defaults to 0.5) | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project input validate
Validate [input] section event objects
godot-cli project input validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project settings
Scalar project settings (application, display, layer_names, …)
godot-cli project settings [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List settings (optional --section filter) |
get |
Get one setting value |
set |
Set one setting value |
apply |
Apply settings intent JSON (per-key merge) |
validate |
Validate res:// paths in settings |
godot-cli project settings list
List settings (optional --section filter)
godot-cli project settings list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--section |
<value> |
Filter to one section (application, display, layer_names, …) | — |
godot-cli project settings get
Get one setting value
godot-cli project settings get [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--section |
<value> |
Section name (e.g. application) (required) | — |
--key |
<value> |
Setting key (e.g. run/main_scene) (required) | — |
godot-cli project settings set
Set one setting value
godot-cli project settings set [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--section |
<value> |
Section name (e.g. application) (required) | — |
--key |
<value> |
Setting key (e.g. run/main_scene) (required) | — |
--value |
<value> |
The value: a number, true or false, or Godot's own text for a value (Vector2i(640, 360), PackedStringArray("4.8", "Mobile")) is written as it is, and anything else is quoted as a string (res://scenes/main.tscn) (required) | — |
--raw |
— | Store --value verbatim (already Godot-formatted) | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project settings apply
Apply settings intent JSON (per-key merge)
godot-cli project settings apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: {"<section>": {"<key>": value}}, e.g. {"application": {"run/main_scene": "res://scenes/main.tscn"}, "display": {"window/size/viewport_width": 640}}; keys merge into the existing file | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project settings validate
Validate res:// paths in settings
godot-cli project settings validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--section |
<value> |
Filter to one section (application, display, layer_names, …) | — |
godot-cli project autoload
Autoload singletons in project.godot
godot-cli project autoload [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List autoload entries |
apply |
Apply autoload intent JSON (merge by name; optional replace_all) |
validate |
Validate autoload paths and names |
godot-cli project autoload list
List autoload entries
godot-cli project autoload list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project autoload apply
Apply autoload intent JSON (merge by name; optional replace_all)
godot-cli project autoload apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: {"autoloads": [{"name": "GameState", "path": "res://scripts/game_state.gd", "singleton": true}], "replace_all": false} | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project autoload validate
Validate autoload paths and names
godot-cli project autoload validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project plugins
Editor plugins enable/disable in project.godot
godot-cli project plugins [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List addons and enabled state |
enable |
Enable one plugin |
disable |
Disable one plugin |
apply |
Apply plugin intent JSON (enable/disable lists) |
validate |
Validate enabled plugin paths exist |
godot-cli project plugins list
List addons and enabled state
godot-cli project plugins list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project plugins enable
Enable one plugin
godot-cli project plugins enable [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--plugin |
<value> |
Plugin path or addon folder name (res://addons/.../plugin.cfg) | — |
--path |
<value> |
Alias for --plugin | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project plugins disable
Disable one plugin
godot-cli project plugins disable [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--plugin |
<value> |
Plugin path or addon folder name (res://addons/.../plugin.cfg) | — |
--path |
<value> |
Alias for --plugin | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project plugins apply
Apply plugin intent JSON (enable/disable lists)
godot-cli project plugins apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: {"enable": ["my_addon"], "disable": []}; names are folders under addons/ | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project plugins validate
Validate enabled plugin paths exist
godot-cli project plugins validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project rendering
Rendering method and graphics driver settings
godot-cli project rendering [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List [rendering] section settings |
apply |
Apply rendering intent JSON (friendly aliases) |
validate |
Validate known rendering method/driver values |
godot-cli project rendering list
List [rendering] section settings
godot-cli project rendering list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project rendering apply
Apply rendering intent JSON (friendly aliases)
godot-cli project rendering apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: {"method": "forward_plus" | "mobile" | "gl_compatibility", "driver": "vulkan" | "d3d12" | "metal" | "opengl3"}, or raw rendering/ keys | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project rendering validate
Validate known rendering method/driver values
godot-cli project rendering validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project physics
Physics engine and gravity settings
godot-cli project physics [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List [physics] section settings |
apply |
Apply physics intent JSON (friendly aliases) |
validate |
Validate known physics engine and scalar values |
godot-cli project physics list
List [physics] section settings
godot-cli project physics list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project physics apply
Apply physics intent JSON (friendly aliases)
godot-cli project physics apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
--intent |
<path> |
Intent JSON file: | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Apply in memory without writing project.godot | — |
godot-cli project physics validate
Validate known physics engine and scalar values
godot-cli project physics validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (directory containing project.godot) | — |
godot-cli project export
Export presets in export_presets.cfg, and the export itself
Creates and edits export presets the way the editor writes them: every option the platform defines, in the editor's order, with secrets (keystore passwords, the script encryption key) in .godot/export_credentials.cfg rather than the committed file. The option list comes from the editor of the project's Godot version (config/features), or the newest one godot-cli has for a project that names none.
godot-cli project export [options]
Subcommands
| Subcommand | Summary |
|---|---|
list |
List export presets |
show |
Show one export preset |
options |
List the export options a platform has |
apply |
Create, update, rename, or remove export presets |
validate |
Check export_presets.cfg for what Godot would drop or reject |
build |
Export the project with a preset (runs Godot) |
godot-cli project export list
List export presets
Each preset's name, platform, runnable flag, its preset keys (export_path, export_filter, custom_features, ...), and the options that differ from the default. A preset Godot would skip (a platform it does not match, or one past a gap in the numbering) is listed with godot_skips saying why and how to fix it. Secret values are never shown, only whether they are set. Result data: path, exists, presets, godot_version, project_godot_version, summary.
godot-cli project export list [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
godot-cli project export show
Show one export preset
One preset, as list shows it; with --all-options, every option the platform has and its value, the default where the file sets none, rather than only the changed ones. Secret values are never shown. Result data: the preset's fields, changed_options or options, summary.
godot-cli project export show [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--preset |
<value> |
The preset's name, as project export list shows it (required) | — |
--all-options |
— | Every option with its value, not only the ones that differ from the default | — |
godot-cli project export options
List the export options a platform has
Every option the platform's exporter defines in this Godot version: name, default, type, choices for an option with a fixed set, and whether it is secret. Also the preset keys every platform shares (export_path, export_filter, include_filter, ...); filter narrows those too, so preset_keys can be empty. Use it to find an option's name before setting it with project export apply. Result data: platform, options, preset_keys, godot_version, summary.
godot-cli project export options [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--platform |
<value> |
Android, iOS, Linux, macOS, visionOS, Web, or Windows Desktop (Windows also works) (required) | — |
--filter |
<value> |
Only options whose name contains this, e.g. icon or keystore | — |
godot-cli project export apply
Create, update, rename, or remove export presets
Applies {"presets": [...], "remove": [...]}. A preset entry is matched by name and created if there is none, which needs platform (Android, iOS, Linux, macOS, visionOS, Web, Windows Desktop; Windows, HTML5 and the like are accepted and written as the name Godot matches). Fields: name, platform, rename, runnable (one per platform), export_path, export_filter (all_resources, scenes, resources, exclude, customized) with export_files, include_filter and exclude_filter (a string or a list), custom_features (a string or a list), dedicated_server, script_export_mode (text, binary_tokens, compressed_binary_tokens), the patch and encryption keys, script_encryption_key, and options: {name: value} with names from project export options. Option values are typed by the option: true/false, numbers, strings, a choice's label ("AAB" for gradle_build/export_format), arrays of strings. An option the platform does not have is refused with the nearest name, unless the entry sets allow_unknown_options for an addon's own option. The whole preset is written as the editor writes it, every option included, so opening the project in the editor changes nothing. Secret options go to .godot/export_credentials.cfg. An export_path inside the project gets a .gdignore in its top folder (build/ for build/windows/game.exe), so Godot neither imports builds nor packs one into the next. A preset whose platform Godot does not match (Windows) is corrected by giving the right one, keeping its settings; presets past a gap in the numbering are kept and renumbered; secrets found in export_presets.cfg move to the credentials file. Result data: path, credentials_path, created, updated, removed, changes (for each updated preset, every value the apply changed as {key, old, new}, keys being [preset.N] keys, options/<name>, platform, rename or runnable; a secret's values are never shown, only secret: true; anything not listed was kept), secrets_written and secrets_moved (names only), gdignore_created, presets, dry_run, summary.
godot-cli project export apply [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--intent |
<path> |
Intent JSON file: {"presets": [{"name": "Windows", "platform": "Windows Desktop", "export_path": "build/windows/game.exe", "runnable": true, "options": {"binary_format/embed_pck": true}}], "remove": ["Old"]} | — |
--intent-json |
<value> |
The intent itself, instead of a file; the same document the intent option describes | — |
--file |
<path> |
Alias for --intent | — |
--dry-run |
— | Check and apply in memory without writing either file | — |
godot-cli project export validate
Check export_presets.cfg for what Godot would drop or reject
Errors: a platform Godot does not know (it skips the preset and drops it on its next save; Windows must be Windows Desktop), a gap in the preset numbering (Godot stops reading at the gap), two presets with one name, an option value of the wrong type or outside its choices, and Android settings that need gradle_build/use_gradle_build (an AAB, compressed native libraries, swipe to dismiss, a min SDK), which Godot refuses to export. Warnings: missing include_filter or exclude_filter, no export_path, an export_path inside the project in a folder with no .gdignore (Godot imports the build and packs it into the next), a keystore or template file that does not exist on this machine, an option the platform does not have, a secret in the committed file, a res:// path that does not exist, a runnable entry naming no preset. matches_editor_save says whether the editor would leave the file as it is. Each issue names the file and line it is about: an option set only in .godot/export_credentials.cfg, such as a keystore path or password, points there. Exits non-zero when there is an error. Result data: path, exists, issues (severity, kind, preset, message, file, line), error_count, warning_count, matches_editor_save, summary.
godot-cli project export validate [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
godot-cli project export build
Export the project with a preset (runs Godot)
Runs godot --headless --export-release (or --export-debug, --export-pack) with the preset, creating the output folder first, and a .gdignore in its top folder inside the project (build/ for build/windows/game.exe) so Godot neither imports the build nor packs it into the next one. Needs the export templates for this exact Godot version; without them it fails as export_templates_missing, with missing_template naming the path Godot looked in. Any other failure is export_failed, with Godot's ERROR lines and the reasons listed under them in errors. Result data: preset, platform, mode, output, output_path, exit, files (each output file and its size), errors (Godot's ERROR lines and their reasons), missing_template, gdignore_created, stdout_tail and stderr_tail on failure, summary. With all instead of a preset, every preset is exported in turn to its export_path and a failure does not stop the rest: a preset Godot cannot find or with no export_path is skipped and says why. Result data then: mode, results (one per preset, as above, with ok, and failure_kind or skipped), built, failed, summary; it exits non-zero if any preset was not exported.
godot-cli project export build [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project root (default: current directory) | — |
--preset |
<value> |
The preset to export, by name (this or all) | — |
--all |
— | Export every preset to its own export_path, carrying on past a failure and reporting each | — |
--output |
<path> |
Output file, relative to the project root or absolute; default the preset's export_path | — |
--debug |
— | Export with the debug template (--export-debug) | — |
--pack |
— | Export only the .pck or .zip, no executable (--export-pack) | — |
--godot |
<path> |
Godot binary; default $GODOT, then godot on PATH, then the macOS app bundle | — |
godot-cli completions
Print shell completions (bash, zsh, fish)
Generated from the command tree, so completions stay in step with the binary that printed them.
bash: godot-cli completions bash > ~/.godot-cli/share/completions/godot-cli.bash zsh: godot-cli completions zsh > "${fpath[1]}/_godot-cli" fish: godot-cli completions fish > ~/.config/fish/completions/godot-cli.fish
godot-cli completions [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Write to this file instead of stdout | — |
godot-cli man
Print the godot-cli(1) man page in roff format
Render with: godot-cli man | man -l -
godot-cli man [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Write to this file instead of stdout | — |
godot-cli reference
Print the command reference as Markdown or JSON
--format markdown (default) prints the document committed as docs/commands.md. --format json prints the whole command surface — every command, option, and value kind — for tools that wrap the CLI.
godot-cli reference [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--output |
<path> |
Write to this file instead of stdout | — |
--format |
<value> |
markdown or json | markdown |
godot-cli mcp
Serve the commands as MCP tools over stdio
Speaks the Model Context Protocol on stdin and stdout so Claude Code, Cursor, and OpenCode can call every command as a tool, read the agent docs as resources, and start a session from the godot-scene-session prompt. With --project-root the server works inside that project: --project-root . is added to every call and path arguments may not leave it.
claude mcp add godot-cli -- godot-cli mcp --project-root .
godot-cli mcp [options]
Options
| Option | Value | Description | Default |
|---|---|---|---|
--project-root |
<path> |
Godot project to serve; injected into every call and enforced on path arguments | — |
--all-options |
— | Also expose the save-preparation and id-session options in the tool schemas | — |
--toolset |
<value> |
Which tools to serve: all (default), or core for the thirteen that cover most sessions, for a client that loads every schema up front | — |
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Runtime or command failure |
2 |
Usage or invocation error |