unity-cli
日本語 | 中文 | Français | Deutsch | Italiano | Español
unity-cli is a Rust CLI that lets Claude Code control Unity Editor over direct TCP.
It is the successor to unity-mcp-server, redesigned from Node.js + MCP to a native binary workflow.
Why unity-cli
- Operate Unity from Claude Code with focused skills and typed commands.
- Access
101Unity Tool APIs across scene, asset, code, test, UI, and editor domains. - Run as a single binary with fast startup and low overhead.
How It Works
Claude Code
-> Skills (on demand)
-> unity-cli
-> Unity Editor (TCP bridge)
Some code tools (read, search, find_symbol, find_refs, etc.) run locally without a Unity connection.
Getting Started
Recommended: Claude Code Plugin
Install the unity-cli plugin from Claude Code Marketplace:
The marketplace plugin installs skills only. Install the unity-cli binary
separately using one of the manual options below.
Codex Skills
When using this repository with Codex, skills are available via .codex/skills/ (symlinks to the plugin source).
No additional setup is required - just clone the repository.
Quick Install (recommended)
|
This downloads the latest release binary to ~/.unity/tools/unity-cli/{rid}/
and symlinks it to ~/.local/bin/unity-cli. After the initial install the CLI
checks for updates automatically in the background — no manual upgrades needed.
If ~/.local/bin is not in your PATH, add the following to your shell profile
(e.g. ~/.zshrc or ~/.bashrc):
Set UNITY_CLI_NO_AUTO_UPDATE=1 to disable auto-update.
Manual Install
Download the latest binary from GitHub Releases, or install from a local checkout:
Unity-side bridge package (choose one):
OpenUPM (recommended):
Git URL (Unity Package Manager):
https://github.com/akiojin/unity-cli.git?path=UnityCliBridge/Packages/unity-cli-bridge
Connection check:
Managed binary maintenance:
unityd and lspd automatically refresh their managed unity-cli / C# LSP binaries on daemon startup.
The managed copies live under UNITY_CLI_TOOLS_ROOT (or the OS default tools directory) and are updated without an interactive confirmation prompt.
Skills (14)
These skills are written as workflow guides, not just command catalogs. They are designed to trigger from natural Unity requests such as "create a test scene", "trace references to this MonoBehaviour", or "run PlayMode tests and capture a screenshot".
| Category | Skills |
|---|---|
| Getting Started | unity-cli-usage |
| Scenes & Objects | unity-scene-create, unity-scene-inspect, unity-gameobject-edit, unity-prefab-workflow |
| Assets | unity-asset-management, unity-addressables |
| Code | unity-csharp-navigate, unity-csharp-edit |
| Runtime & Testing | unity-playmode-testing, unity-input-system, unity-ui-automation |
| Editor | unity-editor-tools |
| Maintenance | gh-skills-sync |
Quick Examples
# Connectivity
# Create a scene
# Create a GameObject through raw tool call
# Search C# code (local tool)
# Inspect machine-readable tool schema
# Dry-run mutating tool calls (no side effects)
# Run EditMode tests
GWT Spec Migration (Issue-first)
If you need to migrate local specs/SPEC-* directories to GitHub issues, use:
If the plan looks correct, run without --dry-run:
The script writes progress/results to migration-report.json and applies the
gwt-spec label to the created issues.
Configuration
| Variable | Description | Default |
|---|---|---|
UNITY_PROJECT_ROOT |
Directory containing Assets/ and Packages/ |
auto-detect |
UNITY_CLI_HOST |
Unity Editor host | localhost |
UNITY_CLI_PORT |
Unity Editor port | 6400 |
UNITY_CLI_TIMEOUT_MS |
Command timeout (ms) | 30000 |
UNITY_CLI_LSP_MODE |
LSP mode (off / auto / required) |
off |
UNITY_CLI_TOOLS_ROOT |
Downloaded tools root directory | OS default |
UNITY_CLI_NO_AUTO_UPDATE |
Disable background auto-update (1 to disable) |
(unset) |
Legacy MCP-prefixed variables are not supported. Use UNITY_CLI_* only.
Documentation
- Full command and tool catalog: docs/tools.md
- Development workflow and CI: docs/development.md
- Contribution guide: CONTRIBUTING.md
- Release process: RELEASE.md
- Attribution templates: ATTRIBUTION.md
License
MIT. See ATTRIBUTION.md for redistribution attribution templates.