Skip to main content

Godot GDScript Architecture Guard

godot-gdscript-architecture-guard checks whether GDScript files still follow a small architecture policy. It is aimed at projects where autoloads, shared scripts, and feature modules can quietly become tangled during refactors.

It does not run the Godot editor. It scans .gd files and reports dependency direction, autoload access, unresolved res:// script/resource references, module owner summaries, high fan-in/fan-out from visible script references, and possible unused scripts/resources.

Install

python -m pip install godot-gdscript-architecture-guard

From a source checkout:

python -m pip install -e .\godot-gdscript-architecture-guard

Quick Start

godot-architecture-guard examples\tiny-architecture-project --config architecture-guard.toml

Write SARIF for code scanning:

godot-architecture-guard . --config architecture-guard.toml --format sarif --output reports\architecture.sarif

Write a Markdown refactor note:

godot-architecture-guard . --config architecture-guard.toml --format markdown --output reports\architecture.md --fail-on none

Markdown reports include owner summaries, dependency hotspots, possible unused files, and a Mermaid module dependency graph when configured modules reference each other. Use --format mermaid when you only want the graph.

Policy Example

[modules.ui]
paths = ["scripts/ui/**"]
may_depend_on = ["shared"]
allowed_autoloads = ["Settings"]

[modules.gameplay]
paths = ["scripts/gameplay/**"]
may_depend_on = ["shared"]
allowed_autoloads = ["GameState"]

[modules.shared]
paths = ["scripts/shared/**"]
may_depend_on = []
allowed_autoloads = []

[autoloads]
names = ["GameState", "Settings"]

[ignore]
paths = ["addons/generated/**", "scripts/generated/**"]

If scripts/ui/menu.gd preloads res://scripts/gameplay/inventory.gd, the tool reports a module boundary violation unless ui may depend on gameplay.

If a configured module path matches no scripts, the tool reports that stale policy path as a warning. JSON, text, and Markdown reports also include advisory sections for module ownership, files with many visible script references, and scripts or resources that do not appear in visible res:// references. Script checks also treat class_name declarations as public entry points. Use [ignore] paths for generated, vendor, or imported helper folders that would otherwise dominate owner summaries, hotspots, and possible-unused advice. Patterns are matched against project-relative paths with forward slashes.

Outputs

  • text: local terminal report.
  • json: CI and scripts.
  • markdown: PR comments and review notes.
  • sarif: GitHub code scanning.
  • mermaid: dependency graph.

JSON reports include metadata, rule_help, and per-finding suggestions so CI jobs and small review scripts can explain the issue without hard-coding rule text. They also include owner_summaries, hotspots, and possible_unused_scripts / possible_unused_resources arrays for refactor review. Markdown reports embed the same module graph that --format mermaid writes as a standalone artifact. SARIF output carries rule descriptions for code scanning tools.

Metadata

Release files for godot-gdscript-architecture-guard 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for godot-gdscript-architecture-guard 0.1.6
File Size Uploaded
godot_gdscript_architecture_guard-0.1.6.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for godot-gdscript-architecture-guard 0.1.6
File Interpreter ABI Platform
godot_gdscript_architecture_guard-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / godot_gdscript_architecture_guard-0.1.6.tar.gz

Download URL godot_gdscript_architecture_guard-0.1.6.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
abf5966afcebe5e358acf74fdd3b460d5633a76b6b57edbe4411eb587030edc7
BLAKE2b-256 checksum
How to use checksums
cb7237c73601ee3ed426fdbfa1b13d94922908bc347a73d8ad79853e260eef1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / godot_gdscript_architecture_guard-0.1.6-py3-none-any.whl

Download URL godot_gdscript_architecture_guard-0.1.6-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19fc0bac1ec96f58c1ffe6ff5b36dda7c551f17be6b89d4ecc1c4b37d37e31f7
BLAKE2b-256 checksum
How to use checksums
612e14b51b558b48557fdcce8af32003af20195588d8d2132ccbca9c83113c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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