ue-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ue-cli

ue-cli


CLI for controlling Unreal Engine Editor via Remote Control API (HTTP :30010).

一款通过Remote Control API(HTTP端口30010)控制Unreal Engine Editor的CLI工具。

Prerequisites

前提条件

  • UE Editor running with
    Web Remote Control
    plugin enabled (HTTP :30010)
  • Python Editor Script Plugin
    enabled (for script commands)
  • ue-cli
    installed:
    npm install -g @banaba/ue-cli
  • 运行已启用
    Web Remote Control
    插件的UE Editor(HTTP端口30010)
  • 已启用
    Python Editor Script Plugin
    (用于脚本命令)
  • 已安装
    ue-cli
    npm install -g @banaba/ue-cli

Commands

命令

Object operations

对象操作

CommandDescription
ue-cli call <objectPath> <functionName> [--params '{}']
Call a function
ue-cli get <objectPath> <propertyName>
Read a property
ue-cli set <objectPath> <propertyName> --value '{}'
Write a property
ue-cli describe <objectPath>
Get object schema
命令描述
ue-cli call <objectPath> <functionName> [--params '{}']
调用函数
ue-cli get <objectPath> <propertyName>
读取属性
ue-cli set <objectPath> <propertyName> --value '{}'
写入属性
ue-cli describe <objectPath>
获取对象架构

Discovery

发现功能

CommandDescription
ue-cli discover
Browse available objects/functions (offline, from GitHub)
ue-cli discover --detail <objectPath>
Show function signatures with examples
ue-cli discover --object <keyword>
Filter by class name
ue-cli discover --category <cat>
Filter by category (subsystem, library)
ue-cli info
List all API routes (online, from UE)
ue-cli search --query '{}'
Search assets (online, from UE)
ue-cli describe <objectPath>
Full object schema (online, from UE)
命令描述
ue-cli discover
浏览可用的对象/函数(离线模式,数据来自GitHub)
ue-cli discover --detail <objectPath>
显示带示例的函数签名
ue-cli discover --object <keyword>
按类名筛选
ue-cli discover --category <cat>
按类别筛选(子系统、库)
ue-cli info
列出所有API路由(在线模式,数据来自UE)
ue-cli search --query '{}'
搜索资源(在线模式,数据来自UE)
ue-cli describe <objectPath>
获取完整对象架构(在线模式,数据来自UE)

Python scripts

Python脚本

CommandDescription
ue-cli script <name> --params '{}'
Execute a bundled Python template
ue-cli script --list
List available templates with parameters
命令描述
ue-cli script <name> --params '{}'
执行捆绑的Python模板
ue-cli script --list
列出所有带参数的可用模板

Batch

批量操作

CommandDescription
ue-cli batch --requests '[...]'
Execute multiple requests
命令描述
ue-cli batch --requests '[...]'
执行多个请求

Workflow

工作流程

  1. Use
    ue-cli info
    to check API connectivity
  2. Use
    ue-cli discover
    to find available objects and functions (offline — no UE connection needed)
  3. Use
    ue-cli describe <objectPath>
    for full schema when exact parameter details are needed (online)
  4. Use
    ue-cli get
    for reads,
    ue-cli call
    /
    ue-cli set
    for writes
  5. For complex operations (BP creation, node wiring, UMG widgets), use
    ue-cli script
  1. 使用
    ue-cli info
    检查API连通性
  2. 使用
    ue-cli discover
    查找可用的对象和函数(离线模式——无需连接UE)
  3. 当需要确切的参数详情时,使用
    ue-cli describe <objectPath>
    获取完整的对象架构(在线模式)
  4. 使用
    ue-cli get
    执行读取操作,使用
    ue-cli call
    /
    ue-cli set
    执行写入操作
  5. 对于复杂操作(蓝图创建、节点连接、UMG组件),使用
    ue-cli script

Global flags

全局标志

FlagDescription
--host <url>
UE host (default: http://localhost:30010)
--dry-run
Preview HTTP request without sending
--force
Skip confirmation for write commands
--timeout <ms>
HTTP timeout (default: 5000)
--verbose
Print request/response headers
--transaction
Generate undo transaction (call, set)
标志描述
--host <url>
UE主机地址(默认值:http://localhost:30010)
--dry-run
预览HTTP请求但不发送
--force
跳过写入命令的确认步骤
--timeout <ms>
HTTP超时时间(默认值:5000毫秒)
--verbose
打印请求/响应头信息
--transaction
生成可撤销的事务(适用于call、set命令)

Safety

安全提示

  • call
    ,
    set
    ,
    script
    ,
    batch
    are write commands — require confirmation
  • Use
    --force
    to skip confirmation (always use this flag)
  • Use
    --dry-run
    to preview requests before sending
[!CAUTION] Write commands modify editor state and are hard to undo. Use
--dry-run
first for unfamiliar operations.
  • call
    set
    script
    batch
    为写入命令——执行前需要确认
  • 使用
    --force
    标志可跳过确认步骤(建议始终使用此标志)
  • 使用
    --dry-run
    标志可在发送请求前预览请求内容
[!CAUTION] 写入命令会修改编辑器状态,且难以撤销。对于不熟悉的操作,请先使用
--dry-run
预览。