Skip to main content

Game Engine Dependency & AI Analysis Tool

Project description

๐ŸŽฎ gdep โ€” Game Codebase Analysis Tool

Analyze game client codebases directly from your terminal and AI Agent.

Supports Unity ยท Cocos2d-x ยท Unreal Engine 5 ยท .NET C# ยท Generic C++.

CI PyPI

GitHub ยท MCP Setup ยท CI/CD Integration

Read this in other languages: ํ•œ๊ตญ์–ด ยท ๆ—ฅๆœฌ่ชž ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท ็น้ซ”ไธญๆ–‡


๐Ÿ“ฆ Installation

Prerequisites

Item Version Purpose
Python 3.11+ CLI ยท MCP server
.NET Runtime 8.0+ C# / Unity project analysis
pip install gdep

After installation, the gdep command is available globally.

For the MCP server (Claude Desktop / Cursor integration), also install:

npm install -g gdep-mcp

๐Ÿš€ Quick Start

1. Detect Project

gdep detect {path}

2. Analyze Structure

gdep scan {path} --circular --top 15
โ”Œโ”€ scan results โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Files: 312  |  Classes: 847  |  Dead Code: 12        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”€โ”€ Top Classes by Coupling
  1  CombatManager   23
  2  DataManager     18
โ”€โ”€ Circular Dependencies
  โ†ป CombatCore โ†’ CombatUnit โ†’ CombatCore

3. Initialize AI Agent Context

# Creates .gdep/AGENTS.md โ€” auto-read by Claude / Cursor / Gemini
gdep init {path}

๐ŸŽฏ Command Reference

Command Summary When to Use
detect Auto-detect engine type Before first analysis
scan Coupling ยท Cycles ยท Dead code Understand structure, before refactor
describe Class detail + Blueprint impl + AI summary Unfamiliar class, code review
flow Method call chain trace (C++โ†’BP boundary) Bug tracing, flow analysis
impact Change impact reverse-trace Safety check before refactoring
lint Game-specific anti-pattern scan Quality check before PR
graph Dependency graph export Documentation, visualization
diff Dependency diff before/after git commit PR review, CI gate
init Create AI Agent context First AI coding assistant setup
context Print project context Copy-paste to AI chat
hints Manage singleton hints Improve flow accuracy
config LLM configuration Before using AI summary features

๐Ÿค AI Agent + MCP Integration

gdep provides an MCP server for direct use in Claude Desktop, Cursor, and other MCP-compatible AI agents.

Quick Install via npm (Recommended)

npm install -g gdep-mcp

Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "gdep": {
      "command": "gdep-mcp",
      "env": { "PYTHONUTF8": "1" }
    }
  }
}

MCP Tools (13)

Tool Scenario
get_project_context Call first โ€” full project overview
analyze_impact_and_risk Safety check before modifying a class
trace_gameplay_flow Trace how a feature works (C++โ†’BP)
inspect_architectural_health Full tech debt diagnosis
explore_class_semantics Understand an unfamiliar class
execute_gdep_cli Raw access to all CLI features
find_unity_event_bindings Unity Inspector event bindings
analyze_unity_animator Unity Animator state machine
analyze_ue5_gas UE5 GAS system full analysis
analyze_ue5_behavior_tree UE5 BehaviorTree structure
analyze_ue5_state_tree UE5 StateTree structure
analyze_ue5_animation UE5 ABP + Montage analysis
analyze_ue5_blueprint_mapping C++ class โ†’ Blueprint impl mapping

๐ŸŽฎ Supported Engines

Engine Class Analysis Flow Analysis Back-refs Specialized
Unity (C#) โœ… โœ… โœ… Prefab/Scene UnityEvent, Animator
Unreal Engine 5 โœ… UCLASS/USTRUCT/UENUM โœ… C++โ†’BP โœ… Blueprint/Map GAS, BP mapping, BT/ST, ABP/Montage
Cocos2d-x (C++) โœ… โœ… - -
.NET (C#) โœ… โœ… - -
Generic C++ โœ… โœ… - -

๐Ÿ“‹ Lint Rules

Rule ID Engine Description
UNI-PERF-001 Unity GetComponent/Find in Update
UNI-PERF-002 Unity new/Instantiate allocation in Update
UNI-ASYNC-001 Unity Coroutine while(true) without yield
UNI-ASYNC-002 Unity FindObjectOfType/Resources.Load inside Coroutine
UE5-PERF-001 UE5 SpawnActor/LoadObject in Tick
UE5-PERF-002 UE5 Synchronous LoadObject in BeginPlay
UE5-BASE-001 UE5 Missing Super:: call
UE5-GAS-001 UE5 Missing CommitAbility() in ActivateAbility()
UE5-GAS-002 UE5 Expensive queries in GAS Ability
UE5-GAS-003 UE5 Excessive BlueprintCallable (>10)
UE5-GAS-004 UE5 Missing const on BlueprintPure method
UE5-NET-001 UE5 Replicated property without callback
GEN-ARCH-001 Common Circular dependency

โš™๏ธ C# Parser (gdep.dll)

The C# parser ships as an OS-agnostic single DLL, running identically on Windows ยท macOS ยท Linux.

Detection priority: $GDEP_DLL env โ†’ publish_dll/gdep.dll โ†’ publish/gdep.dll โ†’ legacy binary


๐Ÿ“š More

Project details


Download files

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

Source Distribution

gdep-0.1.11.tar.gz (148.8 kB view details)

Uploaded Source

Built Distribution

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

gdep-0.1.11-py3-none-any.whl (171.3 kB view details)

Uploaded Python 3

File details

Details for the file gdep-0.1.11.tar.gz.

File metadata

  • Download URL: gdep-0.1.11.tar.gz
  • Upload date:
  • Size: 148.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gdep-0.1.11.tar.gz
Algorithm Hash digest
SHA256 959d966aab919c639e5d024d1ef1cf7801bc890f510cbbff5869ee076e2ea18e
MD5 4871c331302abfa9a1ccd74dd222eee9
BLAKE2b-256 be48bd7ad4c0988759e38ee68b4afab5e41b1ba34588ef0006016d9225f8d7d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gdep-0.1.11.tar.gz:

Publisher: release.yml on pirua-game/gdep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gdep-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: gdep-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 171.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gdep-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ef82a0f69e1231b816e209d6cf3f1b1fef9baa55ef4c9d92d2d19150d6444d01
MD5 fb7a31bfb17be7adba420e7b988cf814
BLAKE2b-256 359299fddf246f333b607298f4b0c21bf144ac5ab1d021466dccdeb0857efe99

See more details on using hashes here.

Provenance

The following attestation bundles were made for gdep-0.1.11-py3-none-any.whl:

Publisher: release.yml on pirua-game/gdep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page