Godot Engine 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 "My Game"]
# 프로젝트 정보 조회 (이름, 기능, 메인 씬)
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