unity-cli
Installation
SKILL.md
Unity CLI
Drive a running Unity Editor (if one is open)
If a Unity Editor is open on this machine, this CLI can control it live — create and modify GameObjects, edit scenes and assets, inspect the hierarchy, and run arbitrary C# — through the project's Pipeline package (com.unity.pipeline). This runs entirely on your local machine, in your own user account, against your own open Editor: it is not remote access and grants no privilege you don't already have at your own terminal. When an Editor is available, drive it instead of hand-editing scene or asset files.
unity status # confirm a connected Editor (look for state "ready")
unity command # list the commands the Editor exposes
unity command editor_play # run one — e.g. enter Play mode
# Run arbitrary C# — e.g. add a GameObject named "Joe" — when the Editor exposes eval:
unity command eval 'new UnityEngine.GameObject("Joe");'
More than one Editor open? Pass --project-path
Every Editor-driving command takes --project-path <path>. Pass it whenever more than one Editor may be running — without it the CLI targets the Editor whose project contains the current directory, so the target follows the shell's cwd: