Communitygithub.com

CLI-Anything Godot

为 Godot 游戏引擎提供智能体原生 CLI,支持项目管理、场景操作、GDScript 执行和导出构建等功能。

CLI-Anything Godot 是什么?

CLI-Anything Godot 是一个为 AI 智能体设计的命令行工具,旨在让智能体能够直接与 Godot 游戏引擎交互。它允许用户通过 CLI 管理项目、创建和修改场景、执行 GDScript 脚本以及进行导出构建。该工具支持 Godot 4.x 版本,并可以通过 `GODOT_BIN` 环境变量指定引擎路径。所有命令均支持 `--json` 模式,以结构化 JSON 输出适合智能体解析的结果。此外,它还提供了交互式 REPL 会话功能,方便调试和探索。主要用于提升 AI 辅助游戏开发的工作效率,在 Claude Code、Cursor 及 Codex 等平台上均可集成使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-godot

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Godot 引擎 CLI

用于 Godot 游戏引擎的智能体原生 CLI。可从命令行管理项目、场景、导出及 GDScript 执行。

安装

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

要求

  • 系统 PATH 中包含 Godot 4.x(或设置 GODOT_BIN 环境变量)

命令

项目管理

# 创建新 Godot 项目
cli-anything-godot project create <path> [--name "我的游戏"]

# 获取项目信息(名称、功能、主场景)
cli-anything-godot --json -p <project> project info

# 列出所有场景
cli-anything-godot --json -p <project> project scenes

# 列出所有脚本
cli-anything-godot --json -p <project> project scripts

# 列出所有资源
cli-anything-godot --json -p <project> project resources

# 重新导入项目资源
cli-anything-godot -p <project> project reimport

场景操作

# 创建新场景,指定根节点类型
cli-anything-godot -p <project> scene create scenes/Level1.tscn --root-type Node3D

# 读取场景结构(节点、资源、连接)
cli-anything-godot --json -p <project> scene read scenes/Level1.tscn

# 向场景添加子节点
cli-anything-godot -p <project> scene add-node scenes/Level1.tscn --name Player --type CharacterBody3D --parent .

GDScript 执行

# 运行 GDScript 文件(需扩展 SceneTree)
cli-anything-godot -p <project> script run tools/build_navmesh.gd

# 运行内联 GDScript 代码
cli-anything-godot -p <project> script inline 'print(ProjectSettings.get_setting("application/config/name"))'

# 验证 GDScript 语法
cli-anything-godot -p <project> script validate scripts/player.gd

导出

# 列出已配置的导出预设
cli-anything-godot --json -p <project> export presets

# 导出所有预设
cli-anything-godot -p <project> export build

# 导出特定预设
cli-anything-godot -p <project> export build --preset "Windows Desktop" --output build/game.exe

引擎

# 检查 Godot 可用性和二进制路径
cli-anything-godot --json engine status

# 获取引擎版本
cli-anything-godot engine version

JSON 模式

为任何命令添加 --json 标志,即可获得适合智能体消费的结构化 JSON 输出:

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

交互式 REPL

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

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-inkscape

>-

相关技能