Logo vun gdep — Game Codebase Analysis Tool

gdep — Game Codebase Analysis Tool

Communautéit
pirua-game

Game Codebase Analysis AI Agentic Tool

Editeurpirua-game
Repositoryai_game_base_analysis_cli_mcp_tool
SproochPython
Forks
14
Stären
66
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzApache-2.0
Linken
  • Tools mat KI-Workflows verbannen

    gdep — Game Codebase Analysis Tool stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    66 Stären an 14 Forks aus dem verlinkte Repository.

🎮 gdep — Game Codebase Analysis Tool

Understand a Unity/UE5/Axmol project in 0.5 seconds. Make Claude and Cursor read the actual code.

CI PyPI npm

"If I modify this class, what breaks?" — answered in 3 seconds, grounded in source. Source-grounded: structural facts from C++ source and binary assets. Confidence tier (HIGH/MEDIUM/LOW) reported on every result.

Read this in other languages: 한국어 · 日本語 · 简体中文 · 繁體中文


✨ Why gdep?

Large game codebases are brutal:

  • UE5 with 300+ Blueprints → "Where is this Ability actually called?" — half a day gone
  • Unity with 50 Managers + Prefab refs → refactor triggers circular dep explosion
  • "What breaks if I change this class?" → open files manually for 30 minutes

gdep answers all of this in under 0.5 seconds.

Measured Performance

MetricResultNotes
UE5 warm scan0.46 s2,800+ asset project
Unity warm scan0.49 sSSD, 900+ classes
Peak memory28.5 MB10× headroom vs target
MCP accuracy5 / 5 (100%)Code-based facts

Full details → docs/BENCHMARK.md · docs/mcp-benchmark.md


🤖 MCP Integration — Make AI Read Real Code

gdep ships an MCP server for Claude Desktop, Cursor, and any MCP-compatible agent.

Install in 1 line

bash
npm install -g gdep-mcp

Configure your agent (copy-paste)

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

That's it. Your AI now has 30 game-engine-aware tools available on every conversation.

What changes with MCP

Without gdep:  "CombatCore probably has some Manager dependencies..." ← hallucination
With gdep:     Direct deps: 2 · Indirect: 200+ UI classes · Asset: prefabs/UI/combat.prefab

30 MCP Tools at a glance

ToolWhen to use
get_project_contextAlways call first — full project overview
wiki_searchCall before any analysis — search previously analyzed classes/assets by keyword (FTS5 BM25). Instant if cached
wiki_listList all wiki nodes with staleness status — see what has already been analyzed
wiki_getRead full content of a specific wiki node
wiki_save_conversationSave agent conversation summary to wiki — persists session context, decisions, and findings across sessions. Creates discussed_in edges to referenced classes
analyze_impact_and_riskBefore modifying any class or method (method_name= for method-level callers; detail_level="summary" for quick count)
explain_method_logicInternal control flow of a single method — Guard/Branch/Loop/Always. Supports C++ namespace-style functions. include_source=True appends method body
trace_gameplay_flowTrace C++ → Blueprint call chains (summary=True for compact output)
inspect_architectural_healthTech debt audit
explore_class_semanticsUnfamiliar class deep-dive. Default compact=True keeps output AI-friendly (~4–8 KB); include_source=True appends source code
suggest_test_scopeWhich test files to run after modifying a class
suggest_lint_fixesLint issues with code fix suggestions (dry-run)
summarize_project_diffArchitecture-level summary of a git diff
get_architecture_adviceFull project diagnosis + LLM-powered advice
find_method_callersReverse call graph — who calls this method
find_call_pathShortest call path between two methods (A → B, C#/Unity only)
find_class_hierarchyFull inheritance tree — ancestors (parent chain) + descendants (subclass tree)
read_class_sourceReturn actual source code of a class or a specific method. method_name= to return only that method's body (token-efficient)
find_unused_assetsUnreferenced assets — Unity GUID scan / UE5 binary path reference scan
query_project_apiSearch project API by class/method/property name with relevance scoring
detect_patternsDetect design patterns in the codebase (Singleton, Subsystem, GAS, Component, etc.)
execute_gdep_cliRaw access to all CLI features
find_unity_event_bindingsInspector-wired methods (invisible in code search)
analyze_unity_animatorAnimator state machine structure
analyze_axmol_eventsAxmol EventDispatcher/Scheduler binding map
analyze_ue5_gasGAS Abilities / Effects / Tags / ASC — with confidence header + IS-A asset role breakdown
analyze_ue5_behavior_treeBehaviorTree asset structure
analyze_ue5_state_treeStateTree asset structure
analyze_ue5_animationABP states + Montage + GAS Notifies
analyze_ue5_blueprint_mappingC++ class → Blueprint impl mapping — with confidence header

Wiki — Analysis Result Cache

Analysis results are automatically saved to .gdep/wiki/ and indexed in SQLite + FTS5. The wiki accumulates knowledge across sessions — always wiki_search before running fresh analysis.

wiki_search("zombie ability") → instant result if already analyzed
wiki_list()                   → see all cached nodes with staleness status
wiki_get("class:ZombieChar")  → full cached analysis content

Key features:

  • FTS5 full-text search with BM25 ranking — CamelCase-aware ("GameplayAbility" finds ULyraGameplayAbility)
  • Dependency edges auto-extracted (inheritance, UPROPERTY, Behavioral Dependencies)
  • Staleness detection: node flagged when source file changes since last analysis
  • related=True on wiki_search expands results via dependency edges

UE5 Confidence Transparency

Every analyze_ue5_gas and analyze_ue5_blueprint_mapping response starts with:

> Analysis method: cpp_source_regex + binary_pattern_match
> Confidence: **MEDIUM**
> Coverage: 4633/4633 assets parsed (100.0%)
> UE version: 5.6 (validated)

gdep init generates a .gdep/AGENTS.md that tells AI agents exactly when to trust gdep results (HIGH = trust fully, MEDIUM = reliable, LOW = verify source) and when to read source files directly.

Full MCP setup → gdep-cli/gdep_mcp/README.md


📦 Installation

Prerequisites

ItemVersionPurpose
Python3.11+CLI · MCP server
.NET Runtime8.0+C# / Unity project analysis

One-click (Recommended)

bash
# Windows
install.bat

# macOS / Linux
chmod +x install.sh && ./install.sh

Manual

bash
cd gdep-cli && pip install -e .

🚀 Quick Start

bash
gdep detect {path}                          # auto-detect engine
gdep scan {path} --circular --top 15        # structure overview
gdep init {path}                            # create .gdep/AGENTS.md for AI agents
gdep advise {path}                          # architecture diagnosis + advice

After gdep init, Claude / Cursor / Gemini automatically read the project context and know which gdep tools to call for which questions.


🖥️ Web UI — Visual Analysis in Your Browser

gdep ships a browser UI for interactive, visual analysis — no terminal required after setup.

Step 1 — Install (run once from project root)

install.bat          # Windows
./install.sh         # macOS / Linux

Step 2 — Launch

run.bat              # Windows — opens backend + frontend in two separate terminals automatically
./run.sh             # macOS/Linux — Terminal 1: backend  (http://localhost:8000)
./run_front.sh       # macOS/Linux — Terminal 2: frontend (http://localhost:5173)

Open http://localhost:5173 → point the sidebar to your project's source folder.

What you get:

  • Interactive dependency graphs and call-flow visualization
  • Class browser with impact analysis and lint
  • AI chat agent that reads your actual codebase (tool-calling)
  • Engine-specific explorers: GAS · Blueprint mapping · Animator · BehaviorTree · StateTree

UI language: English and Korean only · Local LLM: Ollama supported · Non-commercial, features may not be perfect

Full documentation → gdep-cli/web/README.md


🎯 Command Reference

CommandSummaryWhen to Use
detectAuto-detect engine typeBefore first analysis
scanCoupling · Cycles · Dead codeUnderstand structure, before refactor
describeClass detail + full inheritance chain + Blueprint impl + AI summaryUnfamiliar class, code review
flowMethod call chain (C++→BP boundary)Bug tracing, flow analysis
impactChange impact reverse-traceSafety check before refactoring
method-impactReverse-trace callers of a specific methodBefore modifying a method, find all call sites
pathShortest call path between two methods (BFS, C#/Unity only)Trace how A connects to B
test-scopeTest files to run after modifying a classBefore merging, CI planning
watchLive file-change monitor (impact+test+lint)During active development
lintGame-specific anti-pattern scan (+ --fix)Quality check before PR
adviseFull architecture diagnosis + LLM adviceArchitecture review, tech debt
graphDependency graph exportDocumentation, visualization
diffDependency diff before/after commitPR review, CI gate
initCreate AI Agent context fileAI coding assistant setup
contextPrint project contextCopy-paste to AI chat
hintsManage singleton hintsImprove flow accuracy
configLLM configurationBefore using AI summary features

📖 Command Details

scan

bash
gdep scan {path} [options]
OptionDescription
--circularDetect circular dependencies
--dead-codeDetect unreferenced classes
--deepDeep analysis including method bodies
--include-refsInclude Prefab/Blueprint back-references
--top NShow top N by coupling (default: 20)
--format jsonJSON output (for CI/Agent)

flow — traces C++ → Blueprint boundaries

bash
gdep flow {path} --class <Class> --method <Method> [--depth N]
└── UARGamePlayAbility_BasicAttack.ActivateAbility
    ├── CommitAbility ○
    ├── BP_GA_BasicAttack_C.K2_ActivateAbility ○ [BP]   ← Blueprint entry
    └── BP_GA_HeavyAttack_C.K2_ActivateAbility ○ [BP]

test-scope — find test files affected by a class change

bash
gdep test-scope {path} <ClassName>
gdep test-scope {path} <ClassName> --format json   # CI pipeline output
gdep test-scope {path} <ClassName> --depth 5       # broader search

watch — live monitor for file changes

bash
gdep watch {path}                        # watch whole project
gdep watch {path} --class CombatManager  # only watch files related to class
gdep watch {path} --debounce 2.0         # adjust debounce (seconds)

On every save, instantly prints: impact count · test file count · lint warnings.

advise — architecture diagnosis

bash
gdep advise {path}                        # full project diagnosis
gdep advise {path} --focus CombatManager  # class-focused diagnosis
gdep advise {path} --format json          # CI/MCP output

Without LLM configured: structured data report (cycles/coupling/dead-code/lint). With LLM configured: IMMEDIATE / MID-TERM / LONG-TERM natural-language advice.

lint — 19 game-engine anti-pattern rules

bash
gdep lint {path}                # scan
gdep lint {path} --fix          # scan + code fix suggestions (dry-run, no file changes)
Rule IDEngineDescription
UNI-PERF-001UnityGetComponent/Find in Update
UNI-PERF-002Unitynew/Instantiate in Update
UNI-ASYNC-001UnityCoroutine while(true) without yield
UNI-ASYNC-002UnityFindObjectOfType/Resources.Load in Coroutine
UE5-PERF-001UE5SpawnActor/LoadObject in Tick
UE5-PERF-002UE5Synchronous LoadObject in BeginPlay
UE5-BASE-001UE5Missing Super:: call
UE5-GAS-001UE5Missing CommitAbility() in ActivateAbility()
UE5-GAS-002UE5Expensive world queries in GAS Ability
UE5-GAS-003UE5Excessive BlueprintCallable (>10)
UE5-GAS-004UE5Missing const on BlueprintPure method
UE5-NET-001UE5Replicated property without ReplicatedUsing callback
AXM-PERF-001AxmolgetChildByName/Tag in update()
AXM-MEM-001Axmolretain() without release()
AXM-EVENT-001AxmoladdEventListenerWith* without removeEventListener
UE5-BP-001UE5Blueprint references a C++ class not found in source (orphan reference)
UE5-BP-002UE5Blueprint K2 override references a deleted/changed C++ function
UNI-ASSET-001UnityPrefab script reference broken (.meta GUID mismatch)
GEN-ARCH-001CommonCircular dependency

🎮 Supported Engines

EngineClass AnalysisFlow AnalysisBack-refsSpecialized
Unity (C#)✅✅✅ Prefab/SceneUnityEvent, Animator
Unreal Engine 5✅ UCLASS/USTRUCT/UENUM✅ C++→BP✅ Blueprint/MapGAS, BP mapping, BT/ST, ABP/Montage
Axmol / Cocos2d-x (C++)✅ Tree-sitter✅—EventDispatcher/Scheduler bindings
.NET (C#)✅✅—
Generic C++✅✅—

🔄 Representative Workflows

Onboarding an unfamiliar codebase

bash
gdep init {path}
gdep scan {path} --circular --top 20
gdep describe {path} CombatManager --summarize
gdep flow {path} --class CombatManager --method ExecuteAction

UE5 GAS end-to-end

bash
gdep describe {path} UARGameplayAbility_Dash
gdep flow {path} --class UARGameplayAbility_Dash --method ActivateAbility

Pre-refactor safety check

bash
gdep impact {path} CombatCore --depth 5
gdep test-scope {path} CombatCore
gdep lint {path} --fix
gdep diff {path} --commit HEAD

Architecture review

bash
gdep advise {path}
gdep advise {path} --focus BattleManager

CI quality gate

bash
gdep diff . --commit HEAD~1 --fail-on-cycles
gdep lint . --format json > lint_report.json
gdep test-scope . ChangedClass --format json > test_scope.json

Active development (live feedback)

bash
gdep watch {path} --class CombatManager
# → On every save: impact count · test files · lint warnings

⚙️ C# Parser (gdep.dll)

Ships as an OS-agnostic single DLL — identical behavior on Windows · macOS · Linux.

bash
dotnet publish -c Release --no-self-contained -o publish_dll

Detection priority: $GDEP_DLL env → publish_dll/gdep.dll → publish/gdep.dll → legacy binary


MCP Server → gdep-cli/gdep_mcp/README.md CI/CD Integration → docs/ci-integration.md Performance Benchmark → docs/BENCHMARK.md MCP Token & Accuracy → docs/mcp-benchmark.md

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "pirua-game-ai_game_base_analysis_cli_mcp_tool": {
      "command": "npx",
      "args": [
        "-y",
        "ai_game_base_analysis_cli_mcp_tool"
      ]
    }
  }
}

gdep — Game Codebase Analysis Tool MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal gdep — Game Codebase Analysis Tool verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

gdep — Game Codebase Analysis Tool als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu gdep — Game Codebase Analysis Tool an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "pirua-game-ai_game_base_analysis_cli_mcp_tool": {
      "command": "npx",
      "args": [
        "-y",
        "ai_game_base_analysis_cli_mcp_tool"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu gdep — Game Codebase Analysis Tool. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu gdep — Game Codebase Analysis Tool.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat gdep — Game Codebase Analysis Tool?
gdep — Game Codebase Analysis Tool
Jo. Ech hunn et gelies.
Dat hunn ech mat gdep — Game Codebase Analysis Tool fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server gdep — Game Codebase Analysis Tool benotzt?

gdep — Game Codebase Analysis Tool ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech gdep — Game Codebase Analysis Tool MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir gdep — Game Codebase Analysis Tool mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat gdep — Game Codebase Analysis Tool MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann gdep — Game Codebase Analysis Tool verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech gdep — Game Codebase Analysis Tool MCP mat TypingMind?

gdep — Game Codebase Analysis Tool leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt gdep — Game Codebase Analysis Tool MCP an TypingMind zur Verfügung?

gdep — Game Codebase Analysis Tool stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir gdep — Game Codebase Analysis Tool MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann gdep — Game Codebase Analysis Tool eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇