Skip to content

Language intelligence platform for GDScript: parser, semantic analysis, refactoring, CLI, LSP, and Godot plugin.

License

Notifications You must be signed in to change notification settings

elamaunt/GDShrapt

Repository files navigation

GDShrapt logo

GDShrapt

NuGet Build Coverage Tests License

High-performance language intelligence platform for GDScript.

GDShrapt is built and tested as a standalone tooling platform. It does not depend on the Godot runtime and can analyze projects purely from source files, project configuration, and scene metadata.

GDShrapt is an open-source ecosystem for deep static analysis, refactoring, and automation of GDScript projects. What started as a standalone parser has evolved into a full semantic platform powering CLI tools, a Language Server (LSP), and a Godot Editor plugin — all built on a shared, incremental semantic core.

GDShrapt is designed as a language tooling platform for Godot, comparable in scope to clang/clangd or rust-analyzer, but tailored specifically to GDScript and the Godot workflow.


Project Status

  • Test coverage: 4,000+ automated tests (including semantic stress tests and benchmarks)

  • Latest stable release: 5.x (parser, linter, formatter libraries)

  • Next major release: 6.0.0 (semantic platform release)

Version 6.0.0 represents a conceptual shift from standalone libraries to an integrated language intelligence platform. While much of the code already exists in this repository, not all components have been publicly released yet.


What GDShrapt Provides

Open-Source Core

The core libraries intentionally expose only a minimal public surface, while internally supporting deep semantic analysis and large-scale refactoring. This allows GDShrapt to evolve its semantic model without breaking consumers, while still enabling advanced tooling on top.

The open-source core is the foundation of all GDShrapt tooling:

  • Incremental GDScript parser with full-fidelity AST
  • Project-wide semantic model (types, signals, scenes, resources)
  • Flow-sensitive type inference with confidence tracking
  • Cross-file symbol resolution and reference indexing
  • Refactoring planning engine (rename, extract, reorder, etc.)
  • Unified diagnostics framework (syntax, semantic, style)

This core is shared by the CLI, LSP server, and Godot plugin to ensure identical behavior across all environments.

The semantic engine operates independently of the Godot editor or runtime. It can:

  • Parse and analyze GDScript projects offline
  • Read Godot project configuration
  • Load and inspect scene files for type, signal, and node information
  • Perform cross-file and cross-scene analysis without launching Godot

Tooling Built on the Core

Command Line Interface (CLI)

The GDShrapt CLI is part of the upcoming 6.0.0 platform release.

It will provide project-wide analysis, linting, formatting, and refactoring workflows designed for automation and CI/CD environments.

The CLI is not publicly available yet. NuGet packages currently published (5.x) contain only the standalone libraries released prior to the semantic platform.


Language Server Protocol (LSP)

GDShrapt provides an LSP 3.17-compatible server for editor integration:

  • Code completion
  • Go to definition
  • Find references
  • Rename refactoring
  • Hover information
  • Document symbols
  • Real-time diagnostics

The LSP can be used with any LSP-capable editor (VS Code, Neovim, Sublime Text, etc.).


Godot Editor Plugin (Community Edition)

The Community Edition plugin integrates GDShrapt directly into the Godot editor:

  • Semantic code completion
  • Go to definition / find references
  • Rename and refactoring previews
  • Quick fixes and diagnostics
  • TODO scanning and reference views
  • AST and semantic inspection tools

The plugin is currently developed in this repository and will be published to the Godot Asset Store after stabilization.


Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                          Integrations                                   │
├──────────────┬─────────────┬──────────────┬─────────────────────────────┤
│     CLI      │ LSP Server  │ Godot Plugin │        Your Tool            │
└──────┬───────┴──────┬──────┴──────┬───────┴─────────────────────────────┘
       │              │             │
       └──────────────┴─────────────┴─────────────────────────────────────┐
                                                                          │
┌─────────────────────────────────────────────────────────────────────────┤
│                         GDShrapt.CLI.Core                               │
│           Commands · Handlers · Service Registry                        │
├───────────────────────────────────────────────────────┬─────────────────┤
│                     GDShrapt.Semantics                │ GDShrapt        │
│       Project Model · Type Inference · Refactoring    │ .TypesMap       │
│ ┌───────────────────────────────────────────────────┐ │ (submodule)     │
│ │             GDShrapt.Semantics.Validator          │ │                 │
│ │                Type-based validation              │ │ Godot built-in  │
│ └───────────────────────────────────────────────────┘ │ type metadata   │
├───────────────────────────────────────────────────────┴─────────────────┤
│                        GDShrapt.Abstractions                            │
├───────────────┬─────────────┬──────────────┬────────────────────────────┤
│   Validator   │   Linter    │  Formatter   │          Builder           │
│  (AST-based)  │             │              │     Code generation        │
└───────────────┴─────────────┴──────────────┴────────────────────────────┘
                                    │
┌───────────────────────────────────┴─────────────────────────────────────┐
│                          GDShrapt.Reader                                │
│                   Parser · AST · Syntax Tokens                          │
└─────────────────────────────────────────────────────────────────────────┘

Each layer depends only on the layers below it. Two validation levels: AST-based (syntax, scope, control flow) and semantic (type checking, member resolution).

TypesMap is a submodule containing Godot built-in type metadata (classes, methods, signals, enums). It is used by Semantics for type resolution and completion.


Commercial Edition (Overview)

GDShrapt follows an open-core platform model.

The open-source core remains fully functional and actively developed. A commercial edition is planned for professional teams and studios, building on the same core and focusing on automation, scale, and CI reliability, such as:

  • Advanced project-wide refactoring execution
  • Batch and transactional code transformations
  • CI baselines and regression detection
  • Advanced reports and exports
  • Enterprise-oriented build and optimization features

Commercial features are implemented as a separate automation layer and do not replace or cripple the open-source core.


Repository Structure

This repository contains the entire open-source platform:

GDShrapt/
├── Reader         Parser, AST (netstandard2.0)
├── Builder        Code generation
├── Validator      Diagnostics GD1xxx-GD8xxx (AST-based)
├── Linter         Style rules GDLxxx
├── Formatter      Safe formatting GDFxxx
├── Abstractions   Shared interfaces (netstandard2.1)
├── Semantics      Project analysis, type inference, refactoring (net8.0)
│   └── Validator  Type-based validation
├── CLI.Core       Commands, handlers, service registry
├── CLI            CLI executable
├── LSP            Language Server Protocol implementation
└── Plugin         Godot Editor plugin (Community Edition)

Related submodule:

  • GDShrapt.TypesMap — Godot built-in type metadata (classes, methods, signals, enums)

Roadmap (High-Level)

6.0.0

  • Stabilized semantic core
  • Public CLI with semantic analysis
  • Initial LSP release
  • Godot plugin Community Edition

6.x

  • Incremental analysis optimizations
  • Expanded refactoring support
  • CI-focused workflows

Later

  • Commercial automation layer
  • Enterprise build and performance tooling

License

This project is licensed under the Apache License 2.0.

Earlier versions (≤ 5.0.0) were released under the MIT License.


Project Vision

GDShrapt aims to become the reference language intelligence platform for GDScript, providing first-class tooling for both the open-source community and professional Godot teams — with a shared, transparent, and technically rigorous core.

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •