Skip to main content

gd-tools

A modern development workflow CLI for GDScript projects in Godot 4.5+.

CI Coverage PyPI version Python versions Godot version License: MIT


1. Overview

gd-tools brings professional development tooling to GDScript -- test, lint, format, and code coverage in a single CLI. It wraps mature, community-trusted tools (GUT for testing, gdtoolkit for linting and formatting) and fills the remaining gap with a custom hybrid coverage system -- production-quality line and branch coverage for GDScript that no existing tool provides.

One install, one config, one mental model.

2. Features

Feature Description
Unified workflow One install, one config (gd-tools.toml), one mental model for test, lint, format, and coverage.
Zero-friction bootstrap gd-tools init gets a project fully set up in under a minute -- GUT installed, coverage addon deployed, configs generated.
Coverage gap-filling Production-quality line and branch coverage for GDScript -- HTML, LCOV, and Cobertura reports that integrate with CI and code review tools.
CI/CD friendly Exit codes, --check flags, machine-readable output (JSON, JUnit XML, LCOV, Cobertura), no interactive prompts in CI mode.
Standalone compatibility gdlint, gdformat, and GUT continue to work if invoked directly. gd-tools is a layer on top, not a lock-in.

3. Installation

pip install gd-tools-cli

gd-tools requires Python 3.10+ and a Godot 4.5+ binary on your system. The Godot binary is auto-detected from configuration, environment variables (GODOT_BIN, GODOT4_BIN, GODOT_PATH), PATH, or common install locations.

4. Quick Start

# 1. Install
pip install gd-tools-cli

# 2. Bootstrap your Godot project
cd your-godot-project
gd-tools init

# 3. Run your tests
gd-tools test

# 4. Run tests with coverage
gd-tools test --coverage --min 80

gd-tools init installs GUT, deploys the coverage addon, generates gd-tools.toml, and creates per-tool config files (.gutconfig.json, gdlintrc, gdformatrc). The command is idempotent -- safe to re-run.

5. CLI Command Summary

Command Description
gd-tools init Bootstrap a Godot project -- install GUT, deploy coverage addon, generate configs.
gd-tools doctor Diagnose the development environment -- Godot, GUT, coverage addon, tooling.
gd-tools test Run GUT tests with optional coverage, thresholds, JUnit XML output. Accepts optional path arguments to override configured test directories.
gd-tools lint Lint GDScript files using gdlint with text or JSON output. Accepts one or more file or directory paths.
gd-tools format Format GDScript files using gdformat with check and diff modes. Accepts one or more file or directory paths.
gd-tools coverage Coverage subcommands -- report, merge, show.

See the User Guide for full command reference, flags, examples, and exit codes.

6. Configuration

gd-tools uses a single gd-tools.toml file as the source of truth for all tool configuration. gd-tools init generates this file with sensible defaults.

[godot]
binary = ""  # Optional -- auto-detected if unset

[test]
test_dirs = ["test", "tests"]
prefix = "test_"
suffix = ".gd"
gutconfig = ".gutconfig.json"

[lint]
exclude = ["addons", ".godot", ".gd-tools", ".git"]

[format]
exclude = ["addons", ".godot", ".gd-tools", ".git"]

[coverage]
enabled = false
min_percent = 0
format = "html"  # html, lcov, cobertura, text
output_dir = ".gd-tools/coverage"
exclude = ["addons", ".godot", ".gd-tools", ".git"]
test_dirs = ["test", "tests"]

See the User Guide for a full configuration reference with all keys, defaults, and examples.

7. Documentation

Document Description
User Guide Complete CLI reference -- all commands, flags, examples, and troubleshooting.
Contributing Guide Development setup, code style, testing requirements, and PR process.
Architecture Coverage system architecture -- hybrid instrumentation design and data flows.
Product Requirements Full product specification -- features, design decisions, technical detail.
Roadmap Release phases and milestones.
Testing Strategy Test pyramid, coverage targets, and CI integration.

8. Development

# Clone and install in editable mode with dev dependencies
git clone https://github.com/mansyar/gd-tools.git
cd gd-tools
pip install -e ".[dev]"

Running Tests

Unit tests run without Godot. Integration tests require a Godot 4.5+ binary -- configure via .env (see .env.example):

cp .env.example .env
# Edit .env: set GODOT_BIN to your Godot binary path

# Run all tests with coverage
pytest --cov=src/gd_tools --cov-report=term-missing

See Testing Strategy for the full testing guide and Contributing Guide for development setup details.

9. License

MIT

Download files

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

Source Distribution

gd_tools_cli-0.3.0.tar.gz (53.0 kB view details)

Uploaded Source

Built Distribution

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

gd_tools_cli-0.3.0-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file gd_tools_cli-0.3.0.tar.gz.

File metadata

  • Download URL: gd_tools_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for gd_tools_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1ab05c0908e28fdbb728359212acd51b2d3d1f85c1c29a0384dc4a457b624d73
MD5 ed805554305c0f99151c843b5253994e
BLAKE2b-256 5980209670d0871a851121a97a606690d72f1f47506d90660c5a85aa02bb8ad2

See more details on using hashes here.

File details

Details for the file gd_tools_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: gd_tools_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for gd_tools_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87c0bdd83b90503dfd11dc8b112225b5d8659014258b2e3bc40e5e10f09c9859
MD5 90b3f5ab1a829fdebce5aaf6d2cdccd2
BLAKE2b-256 6dce6b9eda33b3d44bfbabf00a0b99c253873986a474202cfb3aa426da8e1e03

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.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