跳到正文
Skillpedia
通用编程58k · #3208

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/godot/agent-harness/cli_anything/godot/skills/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能