Skip to main content

godot-map

A structural map of a Godot 4 project, for coding agents and for you.

Godot keeps a project's shape in files no code-graph tool reads: .tscn scenes carry the node trees, script attachments, instanced scenes and signal connections; project.godot carries the autoloads. godot-map reads those plus the declarations in every .gd and .cs and writes two things:

  • PROJECT_MAP.md — the always-read tier. Autoloads and their signals, every declared signal with who emits it and who listens (in code and in scenes), every scene with its scripts, instances, connections and (for small scenes) its node tree, the class_name index, the scripts nothing references, and where the data files live. Short enough to read at the start of a task.
  • .godot-map/graph.json — the query tier. Every node, script, resource and data file, plus a reverse index (used_by) from any res:// path to everything that references it.

No engine, no LSP, no dependencies: it is a few hundred lines of Python over the text formats, and it never rejects a file it does not fully understand.

Install

uv tool install --editable ~/godot-projects/godot-map   # from this checkout
# or, once published: uv tool install godot-map

Use

godot-map .                        # write PROJECT_MAP.md and .godot-map/graph.json
godot-map . --check                # exit 1 if the committed map is stale (CI)
godot-map . --stdout               # print the Markdown
godot-map . --who scenes/hud.tscn  # everything that references a path
godot-map . --who Enemy --depth 3  # ...or a class_name / autoload, transitively, as a tree
godot-map . --paths                # every $Node / %Unique path in every attached script,
                                   # checked against the scenes; exit 1 if one is missing
godot-map . --paths scripts/hud.gd # the same for one script
godot-map . --no-trees             # smaller Markdown, no per-scene node trees
godot-map . --mermaid              # append a Mermaid scene-instance graph (off by default)

Commit both outputs. A checkout then reads without the tool installed, and --check in CI catches a map that fell behind the scenes. --check compares against the same flags you pass it, so a project that commits with --mermaid checks with --mermaid.

What it reads

Source Facts
project.godot name, main scene (uid resolved), features, autoloads in order
*.tscn uid, root, every node (name, type, parent path, groups, unique_name_in_owner), script = attachments, instance= scenes, [connection] blocks, external resources
*.tres type, uid, attached script, external resources it names (a shader, a texture)
*.gd class_name, extends, @tool, preload/load paths, other res:// literals, signal declarations, func names, X.sig.emit(, X.sig.connect(, $Node, %Unique and get_node("…") paths, x.name = "…"
*.cs class and base, [GlobalClass], [Tool], [Signal] delegates, GD.Load/ResourceLoader.Load paths, EmitSignal, += and Connect( listeners, GetNode("…") paths
*.json, *.csv, *.gdshader listed, with who names them
*.uid uid → path, so uid:// references resolve

A script is used by whatever attaches, autoloads, loads or extends it, and by every script that names its class_name or autoload name in code (Enemy.new(), a static call, a type hint). That last rule is where most uses live in a project that builds its UI in code.

Skipped: .godot/, addons/, builds/, shots/, bin/, obj/, dot-directories.

In an agent's instructions

One line does most of the work:

Read PROJECT_MAP.md before grepping for which scene uses a script, who connects to a signal, or whether a node path exists. Run godot-map . after adding or moving scenes or scripts.

A PostToolUse hook on .gd/.tscn edits can run godot-map . so the map never goes stale mid-task; Kombucha ships one as tools/seeds/claude-hooks.json.

Limits

The GDScript and C# passes are regex, not parsers: a string literal that looks like a declaration, or a preload built from a variable, will be missed or misread. Scenes are read at the section level, so a property value in a shape the reader does not know is kept verbatim and ignored. --paths checks only paths relative to the script's own node (other.get_node("X") is skipped) and skips paths through a node the script names itself; a node added at runtime some other way is reported as missing. The map is for orientation; the engine, the LSP and the tests are for proof.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

godot_map-0.2.1.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

godot_map-0.2.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file godot_map-0.2.1.tar.gz.

File metadata

  • Download URL: godot_map-0.2.1.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for godot_map-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d99a85141727380fbd41856d8b0600d9437560b685cd7d0b535a464fb9bede68
MD5 07d6fed6fc0a8210eb8020cc7dcb2717
BLAKE2b-256 b2cbd76c26d3b0efbd4eecae02a92f6e49f047499daaba5d08bfe47ef4f7866f

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_map-0.2.1.tar.gz:

Publisher: publish.yml on aboucher51/godot-map

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godot_map-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: godot_map-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for godot_map-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8970e5c6896fc4e30ff8ff811d5d834c7167e30fb97497a59267d033dc287c5d
MD5 9cff177f31e52687482bf5d8b129f4df
BLAKE2b-256 128ff2317639e24efba6c045ab81e54b56ccb063f92f747ed20c3c003c1cdf6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_map-0.2.1-py3-none-any.whl:

Publisher: publish.yml on aboucher51/godot-map

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.1 This release

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page