{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"常用资源流程"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"常用资源流程","__idx":0},"children":["常用资源流程"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["执行写入示例前，先从列表命令取得真实 ID。将 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENV_ID"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PHONE_ID"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TEAM_APP_ID"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GROUP_ID"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FILE_ID"]}," 分别设为目标资源，它们代表不同资源类型。以下示例是独立操作，不是连续执行的批处理脚本。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"浏览器环境与内核","__idx":1},"children":["浏览器环境与内核"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env find --keyword Amazon\nml-cli --timeout 30 env open --keyword Amazon --exact\nml-cli --timeout 30 env start --env-id \"$ENV_ID\" --is-headless false --cdp-evasion true\nml-cli env core-download --core 1:124 --core 2:146\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["find/open"]}," 可按名称、分组、标签、备注搜索，只有唯一候选才执行打开。加密环境可为 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["env start"]}," 提供 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--encrypt-key"]},"。内核类型 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," 为 Chrome、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," 为 Firefox，每次 1～20 项，也可使用 JSON ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Cores"]},"。示例版本不代表当前一定可下载。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["env create-quick"]}," 已提供分组、代理、凭据、地区和 IP 监控参数。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fingerprint-refresh"]}," 支持 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--browser-type-id"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--operator-system-id"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ua-version"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--advanced-setting"]},"；",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resolution-list"]}," 支持 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ua"]},"。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["set-group/set-remark"]}," 可选 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--env-ids"]}," 或 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--unique-ids"]},"。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app-hide-accessibility --package-name"]}," 可重复传入（别名 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--package-names"]},"）。完整字段见",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/cli/commands"},"children":["命令总表"]},"。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"云手机","__idx":2},"children":["云手机"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone find --keyword android-test\nml-cli --timeout 120 cloudphone open --keyword android-test --headless false\nml-cli --timeout 120 cloudphone power-on --id \"$PHONE_ID\" --headless true --disable-money-saving-mode false\nml-cli --timeout 30 cloudphone close --keyword android-test\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["headless=false"]}," 显示云手机窗口，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," 隐藏。开机还支持 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--disable-money-saving-mode"]},"。按名称或关键词打开须有唯一匹配项。请求成功不等于串流或设备开机已经完成。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"团队应用","__idx":3},"children":["团队应用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["team-app-list"]}," 查询团队应用库，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app-list"]}," 查询应用市场。使用团队记录 ID，不是手机 ID 或市场 ID。列表中的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["versionCode"]}," 是文本，但 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--version-code"]}," 及 JSON ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["versionCode"]}," 必须是有符号 i64 整数，不能传字符串、小数、版本名称或版本记录 ID。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["team-app-list"]}," 默认 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageNo=1"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageSize=10"]},"，分页参数须在 u32 范围内。从 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app-list"]}," 选择 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PACKAGE_NAME"]}," 和整数 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VERSION_CODE"]},"。版本更新仅支持商店应用，须选择同包名的其他可用版本，是否可用由后端校验。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone team-app-list --app-name Facebook --page-no 1 --page-size 10\nml-cli cloudphone app-list --app-name Facebook\nml-cli --fail-on-business-error cloudphone team-app-create --package-name \"$PACKAGE_NAME\" --version-code \"$VERSION_CODE\"\nml-cli --fail-on-business-error cloudphone team-app-update-group --id \"$TEAM_APP_ID\" --is-all false --group-ids \"$GROUP_ID\"\nml-cli --fail-on-business-error cloudphone team-app-enable --id \"$TEAM_APP_ID\" --enabled false\nml-cli --fail-on-business-error cloudphone team-app-update-install-setting --id \"$TEAM_APP_ID\" --install-setting 2\nml-cli --fail-on-business-error cloudphone team-app-update-enable-root --id \"$TEAM_APP_ID\" --enable-root false\nml-cli --fail-on-business-error cloudphone team-app-update-version --id \"$TEAM_APP_ID\" --package-name \"$PACKAGE_NAME\" --version-code \"$VERSION_CODE\"\nml-cli --fail-on-business-error cloudphone team-app-update-setting --id \"$TEAM_APP_ID\" --setting-type keep-alive --enabled false\nml-cli --fail-on-business-error cloudphone team-app-operate --id \"$TEAM_APP_ID\" --operation START --only-started-by-me true\nml-cli --fail-on-business-error cloudphone team-app-delete --id \"$TEAM_APP_ID\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["创建仅支持商店应用，返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.id"]},"，不支持自建 APK 上传。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isAll=false"]}," 时分组 ID 必须非空；",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," 时可省略或传 null。安装策略 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," 覆盖、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," 跳过。删除仅移除团队记录及预装范围，保留设备已安装应用和数据。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["配置接受 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["permission/keep-alive/auto-start/hide"]}," 或 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PERMISSION/KEEP_ALIVE/AUTO_START/HIDE"]},"；操作接受 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start/stop/restart/uninstall"]}," 或对应全大写。flags 与 JSON 均兼容上述精确写法，发送时统一为大写 API 枚举；其他值被拒绝。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onlyStartedByMe"]}," 省略/null 默认为 false，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enabled"]}," 缺失/null 被拒绝。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli --fail-on-business-error cloudphone team-app-update-setting --json-data '{\"id\":\"123456\",\"settingType\":\"KEEP_ALIVE\",\"enabled\":true}' --enabled false\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["版本/设置写入返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data=null"]},"，仅确认保存，不代表设备完成。版本、权限、自启动由开机规则应用；保活/隐藏还可能由后端异步下发。批量返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data=true"]}," 不保证每台设备成功。CLI 不自动开机、重试写入或轮询。批量卸载可删除设备应用数据，但保留团队预装配置。用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["team-app-list"]}," 回读设置，设备效果单独验证。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"云存储","__idx":4},"children":["云存储"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloud-storage info\nml-cli cloud-storage list --keyword video --page-no 1 --page-size 20\nml-cli cloud-storage presign --file-name video.mp4\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上传分三步：presign、向返回的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," HTTP PUT 文件二进制、使用返回 ID 执行 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["complete --id"]},"。带上返回的上传 headers，PUT 成功后才能 complete。若沙箱/网络阻止 PUT，应取得网络权限或由用户在本机执行同一上传命令。预签名 URL 有时效，不要公开。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -f -L -X PUT --upload-file ./video.mp4 \"$PRESIGNED_URL\"\nml-cli cloud-storage complete --id \"$UPLOAD_ID\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"curl.exe -f -L -X PUT --upload-file .\\video.mp4 \"$env:PRESIGNED_URL\"\nml-cli cloud-storage complete --id \"$env:UPLOAD_ID\"\n","lang":"powershell"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloud-storage labels\nml-cli cloud-storage label-create --label-name automation --color \"#2F80ED\"\nml-cli cloud-storage label-update --label-id \"$LABEL_ID\" --label-name automation-ready --color \"#27AE60\"\nml-cli cloud-storage file-labels --file-id \"$FILE_ID\"\nml-cli cloud-storage add-labels --file-id \"$FILE_ID\" --tag-id \"$LABEL_ID\"\nml-cli cloud-storage set-labels --file-id \"$FILE_ID\" --tag-id \"$LABEL_ID\"\nml-cli cloud-storage label-delete --label-id \"$LABEL_ID\"\nml-cli cloud-storage delete --file-id \"$FILE_ID\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RPA 可通过 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["morelogin://cloudfile?ids=<fileId>"]}," 使用已上传文件，多 ID 用英文逗号分隔。保留 RPA 参数必需的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["__Extra__"]}," 元数据。调度及执行查询使用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schedule template-market/template-personal/list/create-once-task/cancel/subtask-list/subtask-detail/subtask-cancel"]},"。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"云浏览器","__idx":5},"children":["云浏览器"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloud-browser list --page-no 1 --page-size 10\nml-cli --timeout 30 cloud-browser start --env-id \"$ENV_ID\"\nml-cli cloud-browser connect --env-id \"$ENV_ID\"\nml-cli cloud-browser stop --env-id \"$ENV_ID\" --force false\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["这些命令管理远程云浏览器运行实例；",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["env start/open"]}," 控制的是本地浏览器环境。start/stop/connect 使用独立参数与 JSON 契约，复用环境 ID 或端口前先查看帮助。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"分组标签代理与查询元数据","__idx":6},"children":["分组、标签、代理与查询元数据"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli group list\nml-cli tag list\nml-cli proxy list\nml-cli env set-group --help\nml-cli env set-proxy --help\nml-cli env set-remark --help\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["列表/详情可返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupName"]},"（未分组为 null）、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tagInfos"]},"（无标签为空数组）和浏览器 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envRemark"]},"。标签 ID 保持字符串。表格输出优先显示这些字段，JSON 保留嵌套结构。分组、标签、代理的创建、编辑和删除参数均见",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/cli/commands"},"children":["命令总表"]},"。"]}]},"headings":[{"value":"常用资源流程","id":"常用资源流程","depth":1},{"value":"浏览器环境与内核","id":"浏览器环境与内核","depth":2},{"value":"云手机","id":"云手机","depth":2},{"value":"团队应用","id":"团队应用","depth":2},{"value":"云存储","id":"云存储","depth":2},{"value":"云浏览器","id":"云浏览器","depth":2},{"value":"分组、标签、代理与查询元数据","id":"分组标签代理与查询元数据","depth":2}],"frontmatter":{"seo":{"title":"常用资源流程"}},"lastModified":"2026-10-20T08:43:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/cli/workflows","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}