{
  "markdown": "# Godot LSP Bridge\n\n```\n┌──────────────────────────────────────────────┐\n│   G O D O T   L S P   B R I D G E           │\n│   GDScript intelligence for Claude Code      │\n└──────────────────────────────────────────────┘\n```\n\nFull GDScript code intelligence — go-to-definition, hover docs, completions, diagnostics, and **GDShader validation** — inside **Claude Code**, powered by Godot's native Language Server.\n\n---\n\n## Supported Godot Versions\n\nGodot 4.x (4.0 and later). The LSP server runs on port 6005 automatically when the Godot editor is open with a project loaded.\n\n---\n\n## Quick Start\n\n### Step 1 — Install the binary\n\n**Linux / macOS (recommended):**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Pixel-Directive-LLC/godot-lsp-bridge/main/install.sh | bash\n```\n\n**Windows (PowerShell):**\n\n```powershell\nirm https://raw.githubusercontent.com/Pixel-Directive-LLC/godot-lsp-bridge/main/install.ps1 | iex\n```\n\n**Rust developers — install via cargo-binstall (downloads pre-built binary, no compile):**\n\n```bash\ncargo binstall godot-lsp-bridge\n```\n\n### Step 2 — Register the Claude Code plugin\n\n```shell\n/plugin marketplace add https://github.com/Pixel-Directive-LLC/godot-lsp-bridge.git\n/plugin install godot-lsp-bridge@godot-lsp-bridge\n```\n\nThat's it. Open Godot with a project, open any `.gd` file in Claude Code, and GDScript intelligence is live.\n\n**Manual registration (fallback):** if the marketplace commands are unavailable, add the entry directly to `~/.claude/settings.json`:\n\n```json\n{\n  \"lsp\": {\n    \"godot-lsp-bridge\": {\n      \"transport\": \"stdio\",\n      \"command\": \"godot-lsp-bridge\",\n      \"args\": []\n    }\n  }\n}\n```\n\n---\n\n## Features\n\n- **Full GDScript intelligence** — go-to-definition, hover docs, completions, and diagnostics powered by Godot's native LSP\n- **GDShader diagnostics** — validates `.gdshader` files by running Godot headless, surfacing shader compilation errors as LSP diagnostics with line-accurate ranges\n- **Auto-discovery** — scans ports 6005–6014 and connects to the running Godot instance automatically\n- **Retry on startup** — exponential-backoff probe when Godot hasn't launched yet; no manual restarts needed\n- **Hot-reconnect** — detects in-session project switches and reconnects without restarting Claude Code\n- **Reliable framing** — `Content-Length` JSON-RPC framing prevents message truncation on high-latency connections\n- **Zero dependencies at runtime** — single statically-linked binary; no Node, Python, or JVM required\n- **Cross-platform** — native binaries for Windows, macOS, and Linux\n\n---\n\n## CLI Reference\n\n### Proxy flags\n\nAll flags below are **stable** as of v1.0. Shader flags added in v1.3.\n\n| Flag | Default | Description |\n|---|---|---|\n| `--version` | — | Print version and exit |\n| `--host <ADDR>` | `127.0.0.1` | Godot LSP host |\n| `--port <N>` | *(auto-detect)* | Skip discovery; connect to explicit port |\n| `--connect-timeout <SECS>` | `300` | Max wait time for Godot to appear |\n| `--godot-path <PATH>` | *(auto-detect)* | Path to the Godot binary for shader validation |\n| `--shader-timeout <SECS>` | `10` | Timeout for the Godot shader validation subprocess |\n| `--log-level <LEVEL>` | `info` | Tracing level (`error`/`warn`/`info`/`debug`/`trace`) |\n\nResolution order for `--host`, `--port`, and `--godot-path`: CLI flag → config file → built-in default (PATH lookup for Godot).\n\nThe `RUST_LOG` environment variable is also honoured (tracing-subscriber env-filter).\n\n```bash\n# Print the installed version\ngodot-lsp-bridge --version\n\n# Auto-discover Godot on ports 6005–6014 (Godot editor must be open)\ngodot-lsp-bridge\n\n# Connect to an explicit port (skips auto-discovery)\ngodot-lsp-bridge --port 6005\n\n# Wait up to 10 minutes for Godot to start\ngodot-lsp-bridge --connect-timeout 600\n```\n\n### Subcommands\n\n#### `update`\n\nDownload and install the latest release, then ensure the install directory is on `PATH`.\n\n```bash\ngodot-lsp-bridge update\n```\n\n- Fetches release metadata from GitHub, downloads the platform-appropriate archive, and atomically replaces the running binary.\n- If the install directory is not already on `PATH`, it is added automatically (shell rc file on Linux/macOS; User PATH via PowerShell on Windows).\n\n#### `doctor`\n\nCheck the environment and report diagnostics. Exits with code 1 if any check fails.\n\n```bash\ngodot-lsp-bridge doctor\n```\n\nChecks:\n\n1. **Binary in PATH** — confirms `godot-lsp-bridge` is reachable from the shell.\n2. **Godot LSP reachable** — probes the configured `host:port` with a 2-second TCP timeout.\n\nHost and port are resolved using the same priority as proxy mode (CLI flag → config file → built-in default). Unlike proxy mode, `doctor` does not perform auto-discovery and defaults to port `6005`. Pass `--host` or `--port` to test a non-default target:\n\n```bash\ngodot-lsp-bridge --port 6007 doctor\n```\n\n#### `config`\n\nRead or write persistent host/port defaults. Settings are stored in a JSON file under the platform config directory:\n\n| Platform | Path |\n|---|---|\n| Windows | `%APPDATA%\\godot-lsp-bridge\\config.json` |\n| macOS | `~/Library/Application Support/godot-lsp-bridge/config.json` |\n| Linux | `~/.config/godot-lsp-bridge/config.json` |\n\nSupported keys: `host`, `port`, `godot-path`.\n\n```bash\n# Read a value (prints \"(not set)\" if absent)\ngodot-lsp-bridge config get host\ngodot-lsp-bridge config get port\ngodot-lsp-bridge config get godot-path\n\n# Write a value\ngodot-lsp-bridge config set host 192.168.1.10\ngodot-lsp-bridge config set port 6007\ngodot-lsp-bridge config set godot-path /usr/bin/godot4\n```\n\n---\n\n## LSP Feature Support\n\nThe bridge passes most LSP traffic straight through to Godot.  A small set of\nmethods that Godot does not implement are **synthesised** by the bridge using\nGodot's available primitives.\n\n| LSP Method | Status | Notes |\n|---|---|---|\n| `initialize` / `initialized` | Native | Godot handles directly |\n| `textDocument/completion` | Native | Full GDScript completion |\n| `textDocument/hover` | Native | Type info and docs |\n| `textDocument/definition` | Native | Go-to-definition |\n| `textDocument/references` | Native | Find all references |\n| `textDocument/documentSymbol` | Native | Symbols in current file |\n| `textDocument/signatureHelp` | Native | Function signature hints |\n| `textDocument/didOpen` / `didChange` / `didClose` | Native | Document sync |\n| `textDocument/publishDiagnostics` | Pass-through | Server-push notification; forwarded intact for GDScript |\n| `.gdshader` diagnostics | **Synthesised** | Runs Godot headless to compile shaders; publishes errors as `publishDiagnostics` |\n| `workspace/symbol` | **Synthesised** | Aggregates `documentSymbol` across open files; filters by query string |\n| `textDocument/prepareCallHierarchy` | **Synthesised** | Resolves the symbol at the cursor via `documentSymbol` |\n| `callHierarchy/incomingCalls` | **Synthesised** | Finds callers via `references` at the item's selection range |\n| `callHierarchy/outgoingCalls` | **Synthesised** | Finds contained symbols via `documentSymbol` within the item's range |\n| `workspace/applyEdit` | Pass-through | Server-initiated; forwarded to client |\n\nSynthesised responses are best-effort approximations based on the information\nGodot exposes.  They degrade gracefully to empty results when Godot is\nunavailable or returns unexpected data.\n\n---\n\n## Why Rust?\n\n| Concern | Rust advantage |\n|---|---|\n| **Latency** | Zero-cost async via Tokio; no GC pauses on the hot path |\n| **Throughput** | Lock-free I/O piping saturates the TCP socket without copying |\n| **Reliability** | Ownership model eliminates data races on shared buffer state |\n| **Binary size** | Single statically-linked executable — no runtime to install |\n| **Cross-platform** | First-class support for Windows, macOS, and Linux from one codebase |\n\n---\n\n## Development\n\n<details>\n<summary>Build from source (contributors)</summary>\n\n### Prerequisites\n\n- Rust stable toolchain (`rustup`)\n- [`cargo-nextest`][nextest] — `cargo install cargo-nextest`\n- [`bacon`][bacon] — `cargo install bacon` (continuous background checker)\n\n### Commands\n\n```bash\n# Continuous check (recommended during development)\nbacon\n\n# Format\ncargo fmt\n\n# Lint (zero-warning policy)\ncargo clippy -- -D warnings\n\n# Test (CI suite — skips #[ignore] tests)\ncargo nextest run\n\n# Integration tests (requires Godot editor open with a project)\ncargo nextest run --ignored\n\n# Build release\ncargo build --release\n```\n\n</details>\n\n---\n\n## Privacy Policy\n\n[pixeldirective.com/privacy-policy][privacy]\n\n---\n\n## License\n\nMPL-2.0 — see [LICENSE](./LICENSE).\n\n---\n\n*Pixel Directive, LLC — [pixeldirective.com](https://pixeldirective.com)*\n\n[nextest]: https://nexte.st/\n[bacon]: https://dystroy.org/bacon/\n[releases]: https://github.com/Pixel-Directive-LLC/godot-lsp-bridge/releases\n[privacy]: https://pixeldirective.com/privacy-policy/\n",
  "bytes": 8833,
  "sha": "7bf36fe24faf25d3d567732826110308e6e99cf99545feab077f27b195a59079",
  "repo_slug": "pixel-directive-llc/godot-lsp-bridge",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_pixel_directive_llc_godot_lsp_bridge_god_c1e95eb8/readme"
}