ドキュメント

Unity command-line interface (CLI)

Download Unity Hub

Unity command-line interface (CLI)

Command naming conventions for Unity CLI

Name groups, commands, arguments, and tags consistently when you define Unity CLI commands in the Pipeline package or a CLI extension.
読み終わるまでの所要時間 2 分最終更新 3日前

Use these conventions when you author commands with the
[CliCommand]
attribute in the Unity Pipeline package (
com.unity.pipeline
) or in any Unity CLI extension. Consistent names make commands easier to discover and predict, for both people and AI agents.
These conventions cover command groups, command names, argument names, and tags. They don't cover the commands that ship with the
unity
binary itself, such as
unity install
or
unity open
. For those commands, refer to Unity CLI reference.
重要
These conventions apply to
com.unity.pipeline
version 0.9.0-exp.1 and later. Earlier versions of the package use different command names, so scripts and batch JSON written for earlier versions might need updates. The package is still experimental, which is why these naming changes are happening now. After the package reaches general availability (GA), command names will stay stable.

Command structure

Every command belongs to exactly one group and has a name that's unique within that group. The group is where the command lives, such as
prefab
or
animation.animator
. The name is what the command does, such as
create
or
create_controller
.
The following table describes each part of a command:

Term

Description

Example

GroupWhere the command lives. Every command has exactly one group, and the group is required. A group can contain subgroups, separated by dots.
prefab
,
animation.animator
NameThe operation the command performs, relative to its group. A name only needs to be unique within its group.
create
,
get_settings
,
create_controller
idThe group and name joined with a dot. The server uses the id to match commands, and batch JSON uses it to refer to a command. The id isn't shown in the CLI.
animation.animator.create_controller
MCP tool nameThe id with each dot replaced by an underscore. MCP clients see the command under this name.
animation_animator_create_controller
TagsOptional labels that describe what a command is like. A command can have zero or more tags. Tags don't indicate where a command lives.
destructive
,
async
,
runtime
,
dry_run

Next steps

Additional resources