Cli Anything Godot

作者 hkuds34f519533bc1無授權條款51K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

Agent-native CLI for Godot project management, scenes, exports, and script execution.

AI 產生的概覽

用於管理 Godot 遊戲專案、場景、匯出與 GDScript 執行的命令列介面。

功能
為 Godot 遊戲引擎提供面向代理的命令列介面。它可以建立與檢視專案,列出場景、指令碼與資源,建立場景並加入子節點,執行或驗證 GDScript,以及建置匯出預設集。它也能回報引擎狀態與版本,支援 JSON 輸出,並提供互動式工作階段模式。
適用情境
當代理需要透過命令列處理 Godot 專案時使用,例如檢視專案結構、編輯場景、執行 GDScript 或產生遊戲組建。它適合自動化 Godot 專案工作,而非一般程式開發或設計工作。
執行需求
需要 PATH 中有 Godot 4.x,或設定 GODOT_BIN 環境變數指向執行檔。此 CLI 本身透過 pip 從 Git 儲存庫安裝,因此安裝需要 Python 與網路存取。它僅包含說明文件,不附帶指令碼。

Godot Engine CLI

Agent-native CLI for the Godot game engine. Manage projects, scenes, exports, and GDScript execution from the command line.

Installation

bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=godot/agent-harness

Requirements

  • Godot 4.x on PATH (or set GODOT_BIN env var)

Commands

Project Management

bash
# Create a new Godot projectcli-anything-godot project create <path> [--name "My Game"]
# Get project info (name, features, main scene)cli-anything-godot --json -p <project> project info
# List all scenescli-anything-godot --json -p <project> project scenes
# List all scriptscli-anything-godot --json -p <project> project scripts
# List all resourcescli-anything-godot --json -p <project> project resources
# Re-import project resourcescli-anything-godot -p <project> project reimport

Scene Operations

bash
# Create a new scene with root node typecli-anything-godot -p <project> scene create scenes/Level1.tscn --root-type Node3D
# Read scene structure (nodes, resources, connections)cli-anything-godot --json -p <project> scene read scenes/Level1.tscn
# Add a child node to a scenecli-anything-godot -p <project> scene add-node scenes/Level1.tscn --name Player --type CharacterBody3D --parent .

GDScript Execution

bash
# Run a GDScript file (must extend SceneTree)cli-anything-godot -p <project> script run tools/build_navmesh.gd
# Run inline GDScript codecli-anything-godot -p <project> script inline 'print(ProjectSettings.get_setting("application/config/name"))'
# Validate GDScript syntaxcli-anything-godot -p <project> script validate scripts/player.gd

Export

bash
# List configured export presetscli-anything-godot --json -p <project> export presets
# Export all presetscli-anything-godot -p <project> export build
# Export a specific presetcli-anything-godot -p <project> export build --preset "Windows Desktop" --output build/game.exe

Engine

bash
# Check Godot availability and binary pathcli-anything-godot --json engine status
# Get engine versioncli-anything-godot engine version

JSON Mode

Add --json flag to any command for structured JSON output suitable for agent consumption:

bash
cli-anything-godot --json -p ./my-game project info

Interactive REPL

bash
cli-anything-godot -p ./my-game session

來源與署名

來源:hkuds/cli-anything位於skills/cli-anything-godot提交34f5195

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架