https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent
Gemini CLI: your open-source AI agent
Free and open source, Gemini CLI brings Gemini directly into developers’ terminals — with unmatched access for individuals.
blog.google
Google에서 Gemini CLI를 출시했다.
Cursor와 Claude Coding이 이끌고 있는 AI Coding Assistant 전쟁에 Google까지 합세한 것이다.
일 1,000회 요청 가능이라는 사실 상 무제한에 가까운 무료 요금제로 부담없이 시도해 볼 수 있다.
대신 Google에서 입력을 학습 자료로 사용한다고 하니 중요한 정보를 넣지 않도록 주의하자. (키 등)
오늘은 Gemini CLI와 Unity MCP를 통해 Unity에서 간단한 작업을 시도해 보았다.
Gemini CLI 설치하기
https://github.com/google-gemini/gemini-cli/tree/main
GitHub - google-gemini/gemini-cli: An open-source AI agent that brings the power of Gemini directly into your terminal.
An open-source AI agent that brings the power of Gemini directly into your terminal. - google-gemini/gemini-cli
github.com
설치를 위해 v.18 이상의 Node.js가 필요하다.
msi 파일로 다운 받아 설치하였다.
cmd를 열고
npm
을 입력했을 때, 명령어 도움말이 뜨면 잘 설치된 것이다.
npm을 통해 gemini-cli를 설치한다.
npm install -g @google/gemini-cli
npm 패키지가 추가되었다고 하면, 다음 명령어를 통해 gemini cli를 실행할 수 있다.
gemini
에디터 Theme을 고른 뒤, Login with Google을 선택하자.
그리고 브라우저에서 구글 계정으로 로그인한다.
이제 다른 llm처럼 Gemini에게 질문할 수 있다.
Unity MCP 설치
Unity MCP는 LLM에서 Unity의 파일을 읽고 조작하도록 도와주는 MCP이다.
Gemini CLI가 MCP를 지원하므로 이걸 통해 Unity를 조작해 보자.
https://github.com/justinpbarnett/unity-mcp
GitHub - justinpbarnett/unity-mcp: A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Edi
A Unity MCP server that allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions. - justinpbarnett/unity-mcp
github.com
설치를 위해 Python 3.12 이상, Unity 2020.3 LTS 이상, uv (Python Package Manager) 가 필요하다고 한다.
uv는
pip install uv
로 설치하자.
먼저, Unity 프로젝트를 열고, Package Manager에서 MCP를 설치한다.
Package Manager에서 Install package from git URL을 클릭하고,
https://github.com/justinpbarnett/unity-mcp.git?path=/UnityMcpBridge
를 입력한다.
설치가 완료되면, Unity의 Window>Unity MCP를 열어본다.
Server Status가 초록색이면 서버가 작동 중인 것이다.
프로젝트의 Root 폴더에 .gemini 폴더를 만들고, settings.json을 만든다.
My Project/
├── .gemini/
│ └── settings.json
├── Assets/
├── Library/
├── Logs/
...
settings.json에 다음 내용을 입력한다.
{
"mcpServers": {
"UnityMCP": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\UnityMCP\\UnityMcpServer\\src",
"server.py"
]
}
}
}
YOUR_USERNAME
에 PC 사용자명을 입력한다. (햇갈리면 직접 폴더를 찾아보자)
이제 프로젝트의 Root 폴더에서 터미널을 열고,
gemini
로 Gemini를 실행해 본다.
Using 1 MCP server라고 뜨면 성공한 것이다.ctrl-t
로 확인하면
🟢 UnityMCP - Ready (7 tools)
라고 나올 것이다.
에디터에서 실행하기
이대로도 Gemini를 사용할 수 있지만, VS Code나 Rider의 터미널에서도 실행할 수 있다.
나는 Rider를 사용하므로 Rider에서 실행해 보았다.
사용해 보기
씬에 큐브를 배치하고, 회전하게 해보았다.
에러가 나서 스스로 재시도하는 경우가 조금 있어 시간이 걸리지만 그래도 잘해준다.
Cube.cs를 만들고 transform.Rotate
를 통해 회전하도록 만들었다.
잘 사용해 보면 꽤 유용할 거 같다!