In our last article we looked at how to get started with the Unity CLI and Pipeline package. If you haven’t tried either before or simply need a refresher, check it out here.
In this article we wanted to share a few more commands you can add to your developer tool belt. With more than 140 commands, and more being added with every update, you don’t need to learn them all. However, memorizing some of the essential commands and knowing what more options are available will set you up to leverage the AI developer workflows better. Feel free to skim and cherrypick those that are new and skip the ones you already know. Let’s dive in.
A quick disclaimer before we dive into the details: new features and improvements are being added frequently. At the time of writing, I’m using the 1.0.0-beta.10 version of Unity CLI combined with 0.6.0-exp.1 of the com.unity.pipeline package and Unity 6000.6.0f1. As such, things may change in the future and if you run into issues, check out the Unity CLI documentation: https://docs.unity.com/en-us/unity-cli/use-unity-cli.
1. Use --help for any command
You likely already know and have used the unity --help command. However, --help can actually be appended to any level of a nested command to get instant documentation. When in doubt, simply add --help at the end.
Here are a few examples:
You likely already know and have used the unity --help command. However, --help can actually be appended to any level of a nested command to get instant documentation. When in doubt, simply add --help at the end.
Here are a few examples:# Docs for getting all editors available
unity editors --help
# Get parameters for installing a specific module
unity install-modules --help
# Help for authentication commands
unity auth --help
# Help for the login command specifically
unity auth login --help
Every single help screen will instantly output exactly what the command does, what options are available, and what arguments it expects.
The --help flag is also what agents use to explore the tool, so when starting a fresh session with your CLI you can ask your agent to run --help to ensure it’s connected.
2. List the commands
Speaking of documentation and finding your way around the many options available, there is also this command (when run with no arguments):
unity command
This command connects to a running Unity Editor over the Pipeline package's local server and gives you a list of every registered command the Editors API exposes to the shell and the agent can use to work inside of Unity.

An example of one way to use commands could be:unity command editor_play
For making the connected Editor enter Play Mode (our CLI equivalent of clicking the Play button) so your scripts start running without you having to touch the Editor UI.Similarly the counterpart is:
unity command editor_stop
To ensure your agent is aware of what the CLI can do (and because it sometimes feels like a blackbox), a tip you can use when starting a new prompt is to be more exploratory and give Claude, Codex etc. context on what the CLI can do. You can do that by running a command like:Run "unity command" in a bash and tell me what it can do, and test a simple "eval" command
3. Checking status and running multiple instances
If you need to check if Unity CLI is running you can simply use the command:unity statusIt should return something like this:If you see the
Unity Editor (port 7800): readyProject: /Users/thomaskr/Github/UnityProjects/MyAwesomeProjectVersion: 6000.6.0d1PID: 85009ready state next to the first line, it means that the Editor is live and reachable. It also confirms what port the Editor is on, the Project path, Editor Version, and a process identifier (PID).
unity status already lists every connected Editor, so it answers "which ones are running?" on its own. When you specifically need to know which of those projects have the Pipeline package installed and reachable, use:# pipeline
unity pipeline listWhich shows every Unity project the CLI knows about that has the Pipeline package running, listing each project alongside its server port and whether it's currently reachable.

When several editors are running like the example above, you can target one by passing --project-path <path> with its project path. Otherwise the CLI picks the Editor whose project contains the current directory.
4. Short and long flags
Most commands also offer a single-letter shortcut designed for fast typing in your daily terminal workflow. So instead of running unity --help you can also just use unity -h both giving you the same answer but saving you a few keystrokes.unity --help # Long flag version (improved readability)
unity -h # Short flag version (faster in day to day)
5. Check your project size
If you are looking to free up space this command can help you quickly identify the size of your Unity projects:
# Per-folder disk footprint for one project, so you can see how much is regenerable (Library/Temp)
unity projects size
# Summarize every registered project, sorted by size
unity projects size --all
6. Control the output format
By default, commands return human-readable text, but you can change the format to JSON when a script needs clean nested JSON to parse. Default to human-readable output when your agent is reading a small, flat result directly and won't need to parse it programmatically, switch to --format json once the response has structure or size that would otherwise require regex-guessing against a format that isn't guaranteed to stay stable.
# Machine-readable JSON
unity editors list --format json
# Human friendly format
unity editors list --format human
7. Preview module installation without downloading
Before you commit to the download and the disk space large modules take up, you can use --dry-run, which will show you exactly which modules would be installed and their combined size, without pulling anything down.
unity install-modules --module android ios --dry-run
Doing a dry run then provides you a nice overview of what the full project will look like.

8. Inspect a build's configuration before committing to the compile time
There is no --dry-run for builds, but you can still validate the shape of one before paying for a compile. unity build requires either --target or --profile, and several flags exit before any building happens which catches a wrong target or a missing build profile in seconds instead of minutes.
# Test your build before running it
unity build --list-targets
# List profiles
unity build --list-profiles
9. Install a specific Editor version with all modules at once
For CI environments where reproducibility matters, you can install an exact Editor version without the Hub. The version is a positional argument, --cm pulls in child modules automatically, and named platform modules come from the separate install-modules command.
# The version is positional, not a --version flag
unity install 6000.6.0f1
# Include child modules automatically
unity install 6000.6.0f1 --cm
# Add platform modules (separate command, supports --dry-run)
unity install-modules --module android ios webgl
10. Editor installation and upgrade process from terminal
Rather than using the Hub to administer your installation process, use the basic unity install command, which will give you a list of all the Editor versions available which you can then install without opening the Hub.
# Interactive instal guide
unity install
Once you’ve installed the new versions, you can upgrade the project using the upgrade command specifying your project folder path and version to upgrade to:# Replace project path and editor version as needed for your project
unity projects upgrade /Users/thomaskr/Github/UnityProjects/CLIDemo --to 6000.6.0f1

In the screenshot above you can see how upgrading was done in one simple command line.
11. Create a project from the terminal
You can create new projects via CLI with just a few commands:
#The default interactive template
unity projects create "CLI demo"
Running the standard mode gives you an interactive wizard that guides you through the process. Simply pick the editor version you want to use, link to Unity Cloud and choose templates and Editor versions during creation, making it very easy to set up a new project similar to how you would do it in the Hub.

However, unlike the Hub you can also automate your settings, in case you have a frequent setup workflow by simply defining the options as you like them to be. Here is an example where you define a specific editor version, template and project path.
#With template (3D, 2D, VR, etc. - simply replace placeholders)
unity projects new "CLI demo" --editor-version 6000.6.0b9 --template com.unity.template.3d --path ~/MyProjects
12. Capture screenshots
If you need to capture screenshots in your workflows you have three different commands available.
# Capture Scene or Game view to a PNG file, returns the path. Params: --view, --output, --width, --height
# Game view
# Note: Screen Space Overlay UI is NOT in a camera's output, so it returns black
unity command screenshot --view game
# Scene view
unity command screenshot ---view scene
# Capture at a specific resolution and camera, get base64 back inline
# Reads the composited backbuffer, so overlay UI is included. Play Mode only.
unity command capture_game_view --width 1920 --height 1080 --camera "Main Camera" --save_path Screenshots/check.png
The output will look something like this:

This can be useful for the "implement this, take a screenshot, compare to the design" verification loop from Claude Code's own best-practices guidance, since the image comes back as data the agent can reason about immediately rather than a path it then has to separately open.
13. Changelog
Because new features are being added fast to the Unity CLI and Pipeline package, a handy command I like to use is the changelog which you can get by simply running:
unity changelog
It summarizes recent changes giving you a quick overview of what to look out for and maybe new commands to try out.
14. Run C# with Eval
When the Unity Pipeline package is running inside your Editor, the CLI can compile and run C# snippets live in the Editor using the eval command. Because there is no project-level recompile and no domain reload, it executes in milliseconds instead of making you wait. You can use this to run automated setup scripts, query editor states, or even execute C# script files from your disk using unity command eval_file --file path/to/script.cs.
# Returns true if the Editor is currently in Play Mode
unity command eval --code "return UnityEditor.EditorApplication.isPlaying;"
# Log a simple string to the console window
unity command eval --code 'Debug.Log("I was invoked in the terminal");'

15. Testing
Unity's testing tool, also called the Unity Test Framework, can be run directly from the CLI.
Unity splits tests into two categories, and the difference matters a lot once an agent is running them repeatedly:
- EditMode tests: run instantly, without pressing Play. Good for testing plain logic (math, data handling, non-MonoBehaviour classes).
- PlayMode tests: actually run your game briefly, the way a player would experience it. Slower, because Unity has to reload things behind the scenes.
You likely want to start with EditMode tests. They're faster, simpler to write, and cover most of what you need early on. Once you have both the test framework and Unity CLI installed you can invoke it from the command line:
# Run the project's EditMode tests
unity test --mode EditMode
# Filter to a subset and write a JUnit report
unity test --mode EditMode --filter MyNamespace.MyTests --junit-output results.xml
# Only run tests affected by recent changes
unity test --affected
This runs every EditMode test. Add --junit-output results.xml and you also get a structured report of what passed and failed. Then ask your agent to run the tests and summarize what it finds, something like: "Run the EditMode tests and tell me only what’s failing, in plain English." The agent runs the command, reads the report, and reports back, no more manual log-scrolling required.
16. Manage your cloud
While sign-in management lives under unity auth, you can use unity cloud to handle your Unity Cloud organization and projects from the terminal.
# Opens a list of all available cloud commands
unity cloud
# To get your organization ID and account
unity cloud status
# Just the active organization id, ready to pipe
unity cloud org current
17. Check the doctor
When troubleshooting or verifying your environment, you can use the unity doctor command instead of manually auditing authentication, installations, and log files. The command runs a comprehensive health check for your setup, including available editors, proxy configurations, and recent activity logs in a single output. It is particularly useful for diagnosing silent configuration errors on CI machines during initial setup.
# Diagnose your setup
unity doctor
# Adds full error stack traces
unity doctor --verbose
As silent proxy misconfiguration is a common build-failure culprit you can consider checking Editor health before running builds. You can simply automate this to run on CI machines during setup.
You can also use the unity env command. It's a subset of unity doctor you'd want when you only need a path e.g. to clear the download cache, or to hand-inspect user-settings.json.
# resolved paths (install path, cache path, config path)
unity env

18. Creating custom commands
The [CliCommand] attribute makes it easy to write custom commands to provide your AI agents with custom scripts. To use the CLI command you just need a standard static C# method and decorate it with the [CliCommand] and [CliArg] attributes.
The Pipeline package automatically discovers these attributes during compilation, meaning zero manual configuration or registration files are needed. When you run unity command with no arguments, the CLI dynamically lists all available custom commands alongside the built-ins.
Note: The [CliCommand] attribute makes commands discoverable and invocable via the CLI. For parameterized execution, you call the method directly using unity command eval with C# syntax, rather than passing CLI-style flags.
Let's look at a quick "Hello World" custom command in action.
Create a new C# script named HelloWorldCommand.cs. Make sure the class and method are static, and include the Unity.Pipeline.Commands namespace:
using UnityEngine;
using Unity.Pipeline.Commands;
public static class HelloWorldCommand
{
[CliCommand("hello-cli", "A hello world test")]
public static void SayHello()
{
Debug.Log("Hello folks! I'm a custom CLI command.");
}
}
To run your new command, fire up your terminal and execute:
unity command hello-cli
Running it prints the command's result in your terminal, and the Debug.Log output appears in the Editor's Console window.


If you’d like to learn more about creating custom commands we will cover that in a future article.
19. Using MCP server
While using the CLI is generally the recommended workflow, the Unity CLI can also operate as an MCP server, if you want native tool integration or your agent struggles with shell commands.
MCP simplifies integration by giving agents direct access to tool names, descriptions, and structured schemas over a persistent connection, avoiding raw shell execution and output parsing. While CLI fits scripts and manual workflows, MCP seamlessly embeds Unity tools into AI workflows. Both reach the same Editor capabilities, with no meaningful performance difference.
AI clients typically launch the MCP server automatically. Although the server runs standalone, Editor tools require an active Editor with the Pipeline package. Think of the MCP as an alternative interface if your tooling for some reason struggles. In most use cases Unity CLI will be the best option.
Configure your AI client with:
# See which agents are supported
unity mcp configure --list
# Add the server to Claude Code
unity mcp configure claude-code
# Or to Cursor, scoped to the current project only
unity mcp configure cursor --local
# Preview the config change without writing it
unity mcp configure vscode --dry-run
20. Unity agent for CLI
Unity ships an agent skill for the CLI. This can help your agent know which commands exist and how to call them. The CLI can install it for you:
# Print the skills available without installing them
unity skill
# List the files the skill is made of
unity skill show --list
# Show supported clients and install status
unity skill install --list
# Install it into your AI client
unity skill install claude-code
# Update to the latest version
unity skill refresh
What’s next?
I hope this was a helpful quick overview of commands. Like mentioned you don’t have to memorize it all but knowing a few basic commands can be really helpful. In our next article we will take a closer look at working with Claude Code & Unity. Happy game coding!
