gd-tools-cli 0.3.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. gd_tools_cli-0.5.0/PKG-INFO +408 -0
  2. gd_tools_cli-0.5.0/README.md +367 -0
  3. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/pyproject.toml +108 -106
  4. gd_tools_cli-0.5.0/src/gd_tools/addon_check.py +75 -0
  5. gd_tools_cli-0.3.0/src/gd_tools/addons/gd-tools-coverage/pre_run_hook.gd → gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-coverage/coverage.gd +336 -266
  6. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/addons/gd-tools-coverage/post_run_hook.gd +116 -113
  7. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-coverage/pre_run_hook.gd +10 -0
  8. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_gut_bridge.gd +770 -0
  9. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_mock.gd +362 -0
  10. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_native_coverage.gd +211 -0
  11. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_parameter_naming.gd +50 -0
  12. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_test.gd +862 -0
  13. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_test_context.gd +298 -0
  14. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_test_preflight.gd +948 -0
  15. gd_tools_cli-0.5.0/src/gd_tools/addons/gd-tools-test/gd_tools_test_runner.gd +894 -0
  16. gd_tools_cli-0.5.0/src/gd_tools/cli.py +1113 -0
  17. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/config.py +215 -0
  18. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/__init__.py +0 -3
  19. gd_tools_cli-0.5.0/src/gd_tools/coverage/diff_reporter.py +729 -0
  20. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/html_reporter.py +16 -0
  21. gd_tools_cli-0.5.0/src/gd_tools/coverage/omissions.py +162 -0
  22. gd_tools_cli-0.5.0/src/gd_tools/coverage/orchestrator.py +507 -0
  23. gd_tools_cli-0.5.0/src/gd_tools/coverage/plan_generator.py +762 -0
  24. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/reporter.py +245 -2
  25. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/templates/file.html +5 -1
  26. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/terminal_reporter.py +13 -0
  27. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/doctor.py +285 -49
  28. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/format_runner.py +7 -0
  29. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/init.py +198 -89
  30. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/lint_runner.py +51 -52
  31. gd_tools_cli-0.5.0/src/gd_tools/migration/__init__.py +1 -0
  32. gd_tools_cli-0.5.0/src/gd_tools/migration/apply.py +143 -0
  33. gd_tools_cli-0.5.0/src/gd_tools/migration/gutconfig.py +138 -0
  34. gd_tools_cli-0.5.0/src/gd_tools/migration/reporter.py +154 -0
  35. gd_tools_cli-0.5.0/src/gd_tools/migration/rewrite.py +104 -0
  36. gd_tools_cli-0.5.0/src/gd_tools/migration/scan.py +135 -0
  37. gd_tools_cli-0.5.0/src/gd_tools/migration/translate.py +97 -0
  38. gd_tools_cli-0.5.0/src/gd_tools/native_test/__init__.py +33 -0
  39. gd_tools_cli-0.5.0/src/gd_tools/native_test/artifacts.py +279 -0
  40. gd_tools_cli-0.5.0/src/gd_tools/native_test/bridge_scan.py +141 -0
  41. gd_tools_cli-0.5.0/src/gd_tools/native_test/command.py +568 -0
  42. gd_tools_cli-0.5.0/src/gd_tools/native_test/discovery.py +172 -0
  43. gd_tools_cli-0.5.0/src/gd_tools/native_test/orchestrator.py +504 -0
  44. gd_tools_cli-0.5.0/src/gd_tools/native_test/preflight.py +228 -0
  45. gd_tools_cli-0.5.0/src/gd_tools/native_test/protocol.py +271 -0
  46. gd_tools_cli-0.5.0/src/gd_tools/output.py +132 -0
  47. gd_tools_cli-0.5.0/src/gd_tools/test_runner.py +175 -0
  48. gd_tools_cli-0.5.0/src/gd_tools/verbosity.py +50 -0
  49. gd_tools_cli-0.5.0/src/gd_tools/version.py +54 -0
  50. gd_tools_cli-0.5.0/src/gd_tools/watch/__init__.py +1 -0
  51. gd_tools_cli-0.5.0/src/gd_tools/watch/coalescer.py +80 -0
  52. gd_tools_cli-0.5.0/src/gd_tools/watch/loop.py +118 -0
  53. gd_tools_cli-0.5.0/src/gd_tools/watch/mapping.py +65 -0
  54. gd_tools_cli-0.5.0/src/gd_tools/watch/observer.py +131 -0
  55. gd_tools_cli-0.5.0/src/gd_tools/watch/scope.py +88 -0
  56. gd_tools_cli-0.5.0/src/gd_tools/watch/session.py +187 -0
  57. gd_tools_cli-0.5.0/src/gd_tools_cli.egg-info/PKG-INFO +408 -0
  58. gd_tools_cli-0.5.0/src/gd_tools_cli.egg-info/SOURCES.txt +71 -0
  59. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools_cli.egg-info/requires.txt +2 -2
  60. gd_tools_cli-0.3.0/PKG-INFO +0 -193
  61. gd_tools_cli-0.3.0/README.md +0 -152
  62. gd_tools_cli-0.3.0/src/gd_tools/addons/gd-tools-coverage/coverage.gd +0 -43
  63. gd_tools_cli-0.3.0/src/gd_tools/cli.py +0 -376
  64. gd_tools_cli-0.3.0/src/gd_tools/coverage/orchestrator.py +0 -319
  65. gd_tools_cli-0.3.0/src/gd_tools/coverage/plan_generator.py +0 -443
  66. gd_tools_cli-0.3.0/src/gd_tools/test_runner.py +0 -495
  67. gd_tools_cli-0.3.0/src/gd_tools_cli.egg-info/PKG-INFO +0 -193
  68. gd_tools_cli-0.3.0/src/gd_tools_cli.egg-info/SOURCES.txt +0 -35
  69. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/setup.cfg +0 -0
  70. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/__init__.py +0 -0
  71. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/__main__.py +0 -0
  72. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/addons/__init__.py +0 -0
  73. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/cobertura_reporter.py +0 -0
  74. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/lcov_reporter.py +0 -0
  75. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/coverage/templates/index.html +0 -0
  76. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/errors.py +0 -0
  77. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/file_discovery.py +0 -0
  78. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/godot.py +0 -0
  79. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools/update_check.py +0 -0
  80. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools_cli.egg-info/dependency_links.txt +0 -0
  81. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools_cli.egg-info/entry_points.txt +0 -0
  82. {gd_tools_cli-0.3.0 → gd_tools_cli-0.5.0}/src/gd_tools_cli.egg-info/top_level.txt +0 -0
@@ -0,0 +1,408 @@
1
+ Metadata-Version: 2.4
2
+ Name: gd-tools-cli
3
+ Version: 0.5.0
4
+ Summary: A modern development workflow CLI for GDScript projects in Godot 4.5+
5
+ Author-email: mansyar <m.ansyarafi@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/mansyar/gd-tools
8
+ Project-URL: Repository, https://github.com/mansyar/gd-tools
9
+ Project-URL: Documentation, https://github.com/mansyar/gd-tools#readme
10
+ Project-URL: Bug Tracker, https://github.com/mansyar/gd-tools/issues
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Testing
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: gdtoolkit
25
+ Requires-Dist: click
26
+ Requires-Dist: jinja2
27
+ Requires-Dist: rich
28
+ Requires-Dist: pyyaml
29
+ Requires-Dist: tomli; python_version < "3.11"
30
+ Requires-Dist: tomli_w
31
+ Requires-Dist: pydantic>=2.0
32
+ Requires-Dist: requests
33
+ Requires-Dist: packaging
34
+ Requires-Dist: watchdog
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest; extra == "dev"
37
+ Requires-Dist: pytest-cov; extra == "dev"
38
+ Requires-Dist: ruff==0.15.21; extra == "dev"
39
+ Requires-Dist: black; extra == "dev"
40
+ Requires-Dist: commitizen; extra == "dev"
41
+
42
+ # gd-tools
43
+
44
+ A modern development workflow CLI for GDScript projects in Godot 4.5+.
45
+
46
+ [![CI](https://github.com/mansyar/gd-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/mansyar/gd-tools/actions/workflows/ci.yml)
47
+ [![Coverage](https://codecov.io/gh/mansyar/gd-tools/branch/main/graph/badge.svg)](https://codecov.io/gh/mansyar/gd-tools)
48
+ [![PyPI version](https://img.shields.io/pypi/v/gd-tools-cli.svg)](https://pypi.org/project/gd-tools-cli/)
49
+ [![Python versions](https://img.shields.io/pypi/pyversions/gd-tools-cli.svg)](https://pypi.org/project/gd-tools-cli/)
50
+ [![Godot version](https://img.shields.io/badge/Godot-4.5%2B-blue.svg)](https://godotengine.org)
51
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
+
53
+ ---
54
+
55
+ ## 1. Overview
56
+
57
+ `gd-tools` brings professional development tooling to GDScript -- test, lint,
58
+ format, and code coverage in a single CLI. It wraps gdtoolkit for linting and
59
+ formatting, runs its own Godot-native test runtime, and fills the remaining
60
+ gap with a custom hybrid coverage system -- production-quality line and branch
61
+ coverage for GDScript that no existing tool provides.
62
+
63
+ Tests are written against `GdToolsTest`, a native GDScript base class that runs
64
+ inside your Godot project, so a test can touch the real scene tree, await real
65
+ signals, and assert on real engine objects without leaving the engine. Existing
66
+ suites that `extend GutTest` run through the built-in compatibility bridge --
67
+ no GUT addon required -- while projects migrate. The bridge is deprecated as of
68
+ v0.5.0 and will be removed in v0.6.0.
69
+
70
+ One install, one config, one mental model.
71
+
72
+ ## 2. Features
73
+
74
+ | Feature | Description |
75
+ |---------|-------------|
76
+ | **Unified workflow** | One install, one config (`gd-tools.toml`), one mental model for test, lint, format, and coverage. Consistent terminal output with colored markers and summary footers across all commands. |
77
+ | **Native test runtime** | Tests extend `GdToolsTest` and run inside Godot itself. Scene and resource integration tests reach the real scene tree through an explicit context object rather than a proxy. |
78
+ | **Zero-friction bootstrap** | `gd-tools init` gets a project fully set up in under a minute -- native test and coverage addons deployed, configs generated. Existing `GutTest` suites run through the built-in compatibility bridge with no addon install. |
79
+ | **Coverage gap-filling** | Production-quality line and branch coverage for GDScript -- HTML, LCOV, and Cobertura reports that integrate with CI and code review tools. `# gd-tools: no cover` annotations exclude debug-only code from the numbers. |
80
+ | **CI/CD friendly** | Exit codes, `--check` flags, machine-readable output (JSON, JUnit XML, LCOV, Cobertura), no interactive prompts in CI mode. |
81
+ | **Standalone compatibility** | gdlint and gdformat continue to work if invoked directly. `gd-tools` is a layer on top, not a lock-in. |
82
+
83
+ ## 3. Installation
84
+
85
+ ```bash
86
+ pip install gd-tools-cli
87
+ ```
88
+
89
+ `gd-tools` requires Python 3.10+ and a Godot 4.5+ binary on your system.
90
+ The Godot binary is auto-detected from configuration, environment variables
91
+ (`GODOT_BIN`, `GODOT4_BIN`, `GODOT_PATH`), `PATH`, or common install locations.
92
+
93
+ ## 4. Quick Start
94
+
95
+ ```bash
96
+ # 1. Install
97
+ pip install gd-tools-cli
98
+
99
+ # 2. Bootstrap your Godot project
100
+ cd your-godot-project
101
+ gd-tools init
102
+
103
+ # 3. Run your tests
104
+ gd-tools test
105
+
106
+ # 4. Run tests with coverage
107
+ gd-tools test --coverage --min 80
108
+
109
+ # 5. Show uncovered lines and branches when coverage is below 100%
110
+ gd-tools test --coverage --show-uncovered
111
+
112
+ # 6. Force plan regeneration, bypassing the coverage plan cache
113
+ gd-tools test --coverage --no-cache
114
+ ```
115
+
116
+ `gd-tools init` deploys the native test addon and the coverage addon, generates
117
+ `gd-tools.toml`, `gdlintrc`, and `gdformatrc`, and creates the `.gd-tools/`
118
+ directory. The command is idempotent -- safe to re-run. If you've modified
119
+ coverage addon files, they are automatically backed up to
120
+ `addons/gd-tools-coverage/.backups/` before being overwritten.
121
+
122
+ The legacy GUT runtime has been replaced by the built-in compatibility bridge:
123
+ suites extending `GutTest` run on the native runtime with no GUT addon
124
+ installed. The bridge is deprecated as of v0.5.0 and will be removed in
125
+ v0.6.0. See the [migration guide](./docs/gut-migration.md) for the
126
+ supported subset and the steps to move fully onto `GdToolsTest`.
127
+
128
+ A test suite is any class extending `GdToolsTest`:
129
+
130
+ ```gdscript
131
+ extends GdToolsTest
132
+
133
+ func test_health_starts_at_full() -> void:
134
+ assert_eq(health.current(), 100)
135
+ ```
136
+
137
+ ## 5. CLI Command Summary
138
+
139
+ | Command | Description |
140
+ |---------|-------------|
141
+ | `gd-tools init` | Bootstrap a Godot project -- deploy the native test and coverage addons, generate configs. |
142
+ | `gd-tools doctor` | Diagnose the development environment -- Godot, native test addon, bridge-eligible GUT suites, coverage addon, tooling. |
143
+ | `gd-tools test` | Run tests with optional coverage, thresholds, and JUnit XML output. Suites extending `GdToolsTest` and `GutTest` are detected and routed automatically (`GutTest` suites run through the compatibility bridge). Accepts optional path arguments to override configured test directories. `--watch` re-runs affected suites on `.gd` file changes. Every run publishes a machine-readable artifact index under `.gd-tools/artifacts/<run_id>/`. |
144
+ | `gd-tools migrate` | Guided GUT-to-native migration. Default: read-only report with unsupported-construct inventory and proposed base-class rewrites. `--apply` renames clean suites to `GdToolsTest` and translates `.gutconfig.json` into `gd-tools.toml` (merge, never clobber). `--config-only` translates config only. |
145
+ | `gd-tools lint` | Lint GDScript files using gdlint with text or JSON output. Accepts one or more file or directory paths. |
146
+ | `gd-tools format` | Format GDScript files using gdformat with check and diff modes. Accepts one or more file or directory paths. |
147
+ | `gd-tools coverage` | Coverage subcommands -- `report`, `merge`, `show`, `save-baseline`, and `diff` (baseline comparison for CI regression gates). |
148
+ | `gd-tools config` | Configuration management -- `show` (display resolved config), `validate` (check config validity). |
149
+ | `gd-tools version` | Display versions of all gd-tools components (gd-tools, Godot, gdtoolkit, Python, and GUT when installed) in a table or JSON. |
150
+ | `gd-tools completion` | Generate shell completion scripts for bash, zsh, fish, or PowerShell. |
151
+
152
+ ### Selecting and Filtering Tests
153
+
154
+ ```bash
155
+ gd-tools test # every discovered suite
156
+ gd-tools test --suite PlayerTests # one suite, by class name
157
+ gd-tools test --test test_takes_damage # one test method
158
+ gd-tools test --tag smoke # suites with that class-level tag
159
+ gd-tools test --test-timeout 30 # per-test timeout, in seconds
160
+ ```
161
+
162
+ `--tag` is repeatable, and `--test-timeout` (per test) is separate from
163
+ `--timeout` (per suite process).
164
+
165
+ Each run writes a machine-readable artifact index under
166
+ `.gd-tools/artifacts/<run_id>/`, listing the manifest, result, event stream,
167
+ engine log, coverage data, and any failure screenshots the run actually
168
+ produced. Only the latest run is retained. See the
169
+ [User Guide](./docs/USER_GUIDE.md#34-test) for the full artifact tree.
170
+
171
+ ### Watch Mode
172
+
173
+ ```bash
174
+ gd-tools test --watch # watch .gd files, re-run on change
175
+ gd-tools test --watch --coverage # every re-run includes coverage
176
+ gd-tools test --watch --tag smoke # filters apply to every run
177
+ ```
178
+
179
+ `--watch` runs the full suite once, then keeps watching: saving a `.gd` file
180
+ re-runs the tests affected by the change. The changed file is mapped to its
181
+ suite by convention — `src/enemy.gd` re-runs `tests/test_enemy.gd` or
182
+ `tests/enemy_test.gd` — with a full-suite fallback (announced explicitly)
183
+ when no suite matches. Rapid successive saves are coalesced into a single
184
+ re-run, and a save during a running suite queues exactly one follow-up run.
185
+
186
+ - Native runtime only: the removed legacy GUT runtime (`--runtime gut`) is
187
+ rejected with exit 2; `GutTest` suites run through the compatibility bridge.
188
+ - Interactive only: `--watch` combined with `CI=true` exits 2.
189
+ - The terminal is cleared between runs; the banner shows how many files are
190
+ watched, and `Ctrl+C` always exits 0.
191
+ - Positional path arguments are not supported with `--watch`; the watched
192
+ scope is the project root minus standard excludes (`.godot/`, `.gd-tools/`,
193
+ `.git/`, and the gd-tools addons).
194
+
195
+ ### Native Runtime vs. GUT Compatibility Bridge
196
+
197
+ The native runtime is the default and the forward path. Suites extending
198
+ `GutTest` run through the built-in compatibility bridge on the same native
199
+ runner; the bridge is deprecated as of v0.5.0 and will be removed in v0.6.0.
200
+
201
+ | Capability | Native runtime (`GdToolsTest`) | Bridge (`GutTest`) |
202
+ |------------|----------------|--------------|
203
+ | Base class | `GdToolsTest` extends `Node` | `GutTest`, provided by gd-tools (no GUT addon) |
204
+ | Discovery | `test_*` methods, by directory or exact file selector | Same; routed automatically per file |
205
+ | Lifecycle hooks | `before_all`, `after_all`, `before_each`, `after_each` | Same, plus `prerun_setup` and `postrun_teardown` |
206
+ | Assertions | Full native assertion set plus `fail()`, `skip_test()`, `pending_test()` | Documented GUT core subset -- unsupported constructs fail at preflight |
207
+ | Async waits | `wait_process_frame`, `wait_physics_frames`, `wait_seconds`, `wait_for_signal(signal, timeout)` | GUT helper family, incl. `wait_until`, `wait_while`, `yield_*` |
208
+ | Tags | Class-level tags, filtered with `--tag` | Same |
209
+ | Test selectors | `--suite`, `--test`, `--test-timeout` | Same |
210
+ | Scene and resource integration | `const INTEGRATION` plus `GdToolsTestContext` for scene root, node lookup, named resources, and bounded signal waits | Not wired into the bridge shim |
211
+ | Retries | Configurable per test (`[test].retries`) | Same |
212
+ | Line and branch coverage | Yes | Yes |
213
+ | JUnit XML output | Yes | Yes |
214
+ | Mocking and stubbing | `double()`, `partial_double()`, `stub()` (`.to_return`/`.to_call_super`), `assert_called*` family | Same -- inherited from `GdToolsTest` with identical semantics |
215
+ | Parameterized tests | `parameterize()` in `before_all`, values injected via `use_parameters` | Not supported -- preflight rejects `parameterize()` |
216
+ | Skipping a test at runtime | `skip_test()` and `pending_test()` | Yes |
217
+ | Parallel execution | Not yet -- suites run sequentially | Same |
218
+ | Editor plugin | Not yet | Not applicable |
219
+
220
+ **Known limitations.** Parameterized tests are native-only -- the bridge
221
+ deliberately refuses `parameterize()` at preflight rather than mis-running
222
+ them, so such suites must migrate to `GdToolsTest`. Suites run sequentially;
223
+ parallel execution is planned but not yet available. The bridge itself is
224
+ deprecated as of v0.5.0 and will be removed in v0.6.0. See the
225
+ [migration guide](./docs/gut-migration.md) for the bridge's supported subset,
226
+ [User Guide](./docs/USER_GUIDE.md#34-test) for the full flag reference, and
227
+ [Roadmap](./docs/ROADMAP.md#8-temporary-native-test-runtime-migration-roadmap)
228
+ for what is planned.
229
+
230
+ ### Verbosity Control
231
+
232
+ `gd-tools` supports two global flags that control output verbosity. Place
233
+ them before the subcommand:
234
+
235
+ | Flag | Short | Description |
236
+ |------|-------|-------------|
237
+ | `--verbose` | `-v` | Show underlying commands and timing information. |
238
+ | `--quiet` | `-q` | Suppress non-essential output (update checks, info messages, detailed tables). |
239
+
240
+ The flags are mutually exclusive -- using both exits with code 2.
241
+
242
+ ```bash
243
+ # Verbose: see the Godot command and elapsed time
244
+ gd-tools --verbose test
245
+
246
+ # Quiet: minimal output for CI pipelines
247
+ gd-tools --quiet lint
248
+ gd-tools --quiet doctor
249
+
250
+ # Default: current behavior (no change)
251
+ gd-tools test
252
+ ```
253
+
254
+ **Always shown** (regardless of flag): test pass/fail summaries, lint
255
+ violations, coverage reports, error messages, and exit codes.
256
+
257
+ See the [User Guide](./docs/USER_GUIDE.md) for full command reference,
258
+ flags, examples, and exit codes.
259
+
260
+ ## 6. Shell Completion
261
+
262
+ `gd-tools` supports tab completion for bash, zsh, fish, and PowerShell.
263
+ Generate a completion script with `gd-tools completion <shell>` and
264
+ source it in your shell configuration.
265
+
266
+ **Bash:**
267
+
268
+ ```bash
269
+ # Add to ~/.bashrc or ~/.bash_profile
270
+ eval "$(gd-tools completion bash)"
271
+ ```
272
+
273
+ **Zsh:**
274
+
275
+ ```bash
276
+ # Add to ~/.zshrc
277
+ eval "$(gd-tools completion zsh)"
278
+ # Or save to a file in your fpath:
279
+ gd-tools completion zsh > ~/.zsh/completions/_gd-tools
280
+ ```
281
+
282
+ **Fish:**
283
+
284
+ ```bash
285
+ gd-tools completion fish > ~/.config/fish/completions/gd-tools.fish
286
+ ```
287
+
288
+ **PowerShell:**
289
+
290
+ ```powershell
291
+ gd-tools completion powershell | Out-String | Add-Content $PROFILE
292
+ ```
293
+
294
+ **Alternative -- Click's environment variable:**
295
+
296
+ Click also supports completion via the `_GD_TOOLS_COMPLETE` environment
297
+ variable. This is useful for advanced users who prefer not to modify
298
+ their shell profile:
299
+
300
+ ```bash
301
+ # Bash example
302
+ export _GD_TOOLS_COMPLETE=bash_source
303
+ eval "$(gd-tools)"
304
+ ```
305
+
306
+ See the [User Guide](./docs/USER_GUIDE.md) for detailed per-shell
307
+ instructions.
308
+
309
+ ## 7. Configuration
310
+
311
+ `gd-tools` uses a single `gd-tools.toml` file as the source of truth for
312
+ all tool configuration. `gd-tools init` generates this file with sensible
313
+ defaults.
314
+
315
+ ```toml
316
+ [godot]
317
+ binary = "" # Optional -- auto-detected if unset
318
+
319
+ [test]
320
+ test_dirs = ["test", "tests"]
321
+ prefix = "test_"
322
+ suffix = ".gd"
323
+ gutconfig = ".gutconfig.json" # legacy; not read by the native runtime or the bridge
324
+ runtime = "native" # native (default); "gut" is no longer a runnable runtime
325
+ timeout_seconds = 5.0 # default per-test timeout for async native tests
326
+ retries = 0 # opt-in retries per native test
327
+ tags = [] # native suite tag filters
328
+
329
+ [lint]
330
+ exclude = ["addons", ".godot", ".gd-tools", ".git"]
331
+
332
+ [format]
333
+ exclude = ["addons", ".godot", ".gd-tools", ".git"]
334
+
335
+ [coverage]
336
+ enabled = false
337
+ min_percent = 0
338
+ format = "html" # html, lcov, cobertura, text
339
+ output_dir = ".gd-tools/coverage"
340
+ exclude = ["addons", ".godot", ".gd-tools", ".git"]
341
+ test_dirs = ["test", "tests"]
342
+ ```
343
+
344
+ See the [User Guide](./docs/USER_GUIDE.md) for a full configuration reference
345
+ with all keys, defaults, and examples.
346
+
347
+ ## 8. Documentation
348
+
349
+ | Document | Description |
350
+ |----------|-------------|
351
+ | [User Guide](./docs/USER_GUIDE.md) | Complete CLI reference -- all commands, flags, examples, and troubleshooting. |
352
+ | [Contributing Guide](./docs/CONTRIBUTING.md) | Development setup, code style, testing requirements, and PR process. |
353
+ | [Architecture](./docs/ARCHITECTURE.md) | System architecture -- hybrid coverage instrumentation and the native test runtime. |
354
+ | [Product Requirements](./docs/PRD.md) | Full product specification -- features, design decisions, technical detail. |
355
+ | [Roadmap](./docs/ROADMAP.md) | Release phases and milestones. |
356
+ | [Testing Strategy](./docs/TESTING_STRATEGY.md) | Test pyramid, coverage targets, and CI integration. |
357
+
358
+ ## 9. Development
359
+
360
+ ```bash
361
+ # Clone and install in editable mode with dev dependencies
362
+ git clone https://github.com/mansyar/gd-tools.git
363
+ cd gd-tools
364
+ pip install -e ".[dev]"
365
+ ```
366
+
367
+ ### Running Tests
368
+
369
+ Unit tests run without Godot. Integration tests require a Godot 4.5+
370
+ binary -- configure via `.env` (see `.env.example`):
371
+
372
+ ```bash
373
+ cp .env.example .env
374
+ # Edit .env: set GODOT_BIN to your Godot binary path
375
+
376
+ # Run all tests with coverage
377
+ CI=true pytest
378
+ ```
379
+
380
+ `CI=true` is what makes a missing Godot binary a failure rather than a skip.
381
+ Without it, integration and end-to-end tests skip quietly when Godot is
382
+ absent, so a run can report success having executed nothing.
383
+
384
+ See [Testing Strategy](./docs/TESTING_STRATEGY.md) for the full testing
385
+ guide and [Contributing Guide](./docs/CONTRIBUTING.md) for development
386
+ setup details.
387
+
388
+ ## 10. License
389
+
390
+ MIT
391
+
392
+ ## 11. Acknowledgements
393
+
394
+ `gd-tools` stands on the shoulders of two excellent community tools. It
395
+ wraps them; it does not replace them. Full credit to their authors for the
396
+ hard parts.
397
+
398
+ - **[GUT (Godot Unit Test)](https://github.com/bitwes/Gut)** by
399
+ [bitwes](https://github.com/bitwes): the GDScript test framework whose
400
+ core API the built-in compatibility bridge reproduces while projects
401
+ migrate to the native runtime.
402
+ - **[gdtoolkit](https://github.com/Scony/godot-gdscript-toolkit)** by
403
+ [Scony](https://github.com/Scony): provides `gdlint` and `gdformat`, which
404
+ `gd-tools lint` and `gd-tools format` wrap.
405
+
406
+ The native test runtime (`GdToolsTest`) and the custom hybrid coverage system
407
+ (plan generation, runtime instrumentation, and reporting) are the original work
408
+ of `gd-tools` and fill the gaps these tools do not cover.