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++.
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 + full inheritance chain + 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 |
method-impact |
Reverse-trace callers of a specific method | Before modifying a method, find all call sites |
path |
Shortest call path between two methods (BFS, C#/Unity only) | Trace how A connects to B |
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 (26)
| Tool | Scenario |
|---|---|
get_project_context |
Call first โ full project overview |
analyze_impact_and_risk |
Safety check before modifying a class or method (method_name= for method-level callers) |
trace_gameplay_flow |
Trace how a feature works (C++โBP). summary=True for compact output |
inspect_architectural_health |
Full tech debt diagnosis |
explore_class_semantics |
Understand an unfamiliar class. Default compact=True keeps output AI-friendly; include_source=True appends source code |
explain_method_logic |
Internal control flow of a single method (Guard/Branch/Loop/Always). include_source=True appends method body |
suggest_test_scope |
Which test files to run after modifying a class |
suggest_lint_fixes |
Lint issues with code fix suggestions (dry-run) |
summarize_project_diff |
Architecture-level summary of a git diff |
get_architecture_advice |
Full project diagnosis + LLM-powered advice |
find_method_callers |
Reverse call graph โ who calls this method |
find_call_path |
Shortest call path between two methods (A โ B, C#/Unity only) |
find_class_hierarchy |
Full inheritance tree โ ancestors (parent chain) + descendants (subclass tree) |
read_class_source |
Return actual source code of a class or a specific method. method_name= for only that method's body |
find_unused_assets |
Unreferenced assets โ Unity GUID scan / UE5 binary path reference scan |
query_project_api |
Search project API by class/method/property name with relevance scoring |
detect_patterns |
Detect design patterns in the codebase (Singleton, Subsystem, GAS, Component, etc.) |
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 โ confidence header + IS-A asset role breakdown |
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 โ confidence header |
๐ฎ 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 |
UE5-BP-001 |
UE5 | Blueprint references a C++ class not found in source |
UE5-BP-002 |
UE5 | Blueprint K2 override references a deleted/changed C++ function |
UNI-ASSET-001 |
Unity | Prefab script reference broken (.meta GUID mismatch) |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdep-0.2.8.tar.gz.
File metadata
- Download URL: gdep-0.2.8.tar.gz
- Upload date:
- Size: 4.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00911779834783618de470fb5bbe6b1002dbdf546b94805f50264e2e588e037f
|
|
| MD5 |
6cb2aa835f47f1658efc46d742848833
|
|
| BLAKE2b-256 |
8712409ec3f8a51d0d43ee95613c12bc7ec1160bacbab5c060be69d6501ae905
|
Provenance
The following attestation bundles were made for gdep-0.2.8.tar.gz:
Publisher:
release.yml on pirua-game/ai_game_base_analysis_cli_mcp_tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gdep-0.2.8.tar.gz -
Subject digest:
00911779834783618de470fb5bbe6b1002dbdf546b94805f50264e2e588e037f - Sigstore transparency entry: 1278538842
- Sigstore integration time:
-
Permalink:
pirua-game/ai_game_base_analysis_cli_mcp_tool@05fa216b252cbae3b66341fca094cf31614f97dc -
Branch / Tag:
refs/tags/v0.2.8 - Owner: https://github.com/pirua-game
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@05fa216b252cbae3b66341fca094cf31614f97dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file gdep-0.2.8-py3-none-any.whl.
File metadata
- Download URL: gdep-0.2.8-py3-none-any.whl
- Upload date:
- Size: 4.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bcf040bf703ad5b494442789e6581b76f17c35df8645a51cb9f2b77a0ef48a7
|
|
| MD5 |
ed970480cc793d3b94296bba4dceedbf
|
|
| BLAKE2b-256 |
e2311da30c84ceae3fee0022850aee3a534df232099e37a1f8026668f5cf99ef
|
Provenance
The following attestation bundles were made for gdep-0.2.8-py3-none-any.whl:
Publisher:
release.yml on pirua-game/ai_game_base_analysis_cli_mcp_tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gdep-0.2.8-py3-none-any.whl -
Subject digest:
7bcf040bf703ad5b494442789e6581b76f17c35df8645a51cb9f2b77a0ef48a7 - Sigstore transparency entry: 1278538903
- Sigstore integration time:
-
Permalink:
pirua-game/ai_game_base_analysis_cli_mcp_tool@05fa216b252cbae3b66341fca094cf31614f97dc -
Branch / Tag:
refs/tags/v0.2.8 - Owner: https://github.com/pirua-game
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@05fa216b252cbae3b66341fca094cf31614f97dc -
Trigger Event:
push
-
Statement type: