cli-anything-godot
它能做什么
这个技能让你的智能体通过命令行工具管理 Godot 4 游戏项目。适合想在不打开编辑器的情况下创建场景和运行脚本的游戏开发者。
适用场景
- ✓当你想通过命令行创建一个新的 Godot 项目或场景的时候。
- ✓当你想为现有场景添加节点的时候。
- ✓当你想导出 Godot 项目或运行一个 GDScript 文件的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/godot/agent-harness/cli_anything/godot/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我创建一个名为 Racer 的新 Godot 项目,其中有一个 Level1 场景,并包含一个 Player 节点。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会用命令调用你电脑上的 Godot 程序,处理项目、场景、导出和脚本。它会读写项目文件,使你的智能体能够处理这些文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Godot Engine CLI
Agent-native CLI for the Godot game engine. Manage projects, scenes, exports, and GDScript execution from the command line.
Installation
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
# Create a new Godot project
cli-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 scenes
cli-anything-godot --json -p <project> project scenes
# List all scripts
cli-anything-godot --json -p <project> project scripts
# List all resources
cli-anything-godot --json -p <project> project resources
# Re-import project resources
cli-anything-godot -p <project> project reimport
Scene Operations
# Create a new scene with root node type
cli-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 scene
cli-anything-godot -p <project> scene add-node scenes/Level1.tscn --name Player --type CharacterBody3D --parent .
GDScript Execution
# Run a GDScript file (must extend SceneTree)
cli-anything-godot -p <project> script run tools/build_navmesh.gd
# Run inline GDScript code
cli-anything-godot -p <project> script inline 'print(ProjectSettings.get_setting("application/config/name"))'
# Validate GDScript syntax
cli-anything-godot -p <project> script validate scripts/player.gd
Export
# List configured export presets
cli-anything-godot --json -p <project> export presets
# Export all presets
cli-anything-godot -p <project> export build
# Export a specific preset
cli-anything-godot -p <project> export build --preset "Windows Desktop" --output build/game.exe
Engine
# Check Godot availability and binary path
cli-anything-godot --json engine status
# Get engine version
cli-anything-godot engine version
JSON Mode
Add --json flag to any command for structured JSON output suitable for agent consumption:
cli-anything-godot --json -p ./my-game project info
Interactive REPL
cli-anything-godot -p ./my-game session
常见问题
需要哪个版本的 Godot?
需要 Godot 4.x 并位于你的系统路径中,或通过 GODOT_BIN 变量进行设置。
它可以运行脚本吗?
可以,它可以运行一个 GDScript 文件,该文件必须继承 SceneTree。
它可以显示项目详情吗?
可以,它可以显示项目信息、场景、脚本和资源。
详情
作者的原始描述
Agent-native CLI for Godot project management, scenes, exports, and script execution.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3208
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。