{"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":["先检测安装状态，已安装则打开；仅在 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status=not_installed"]}," 且确需安装时执行安装。检测错误、超时、JSON 非法或 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["detection_inconclusive"]}," 均不能视为未安装。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli client status --output-json\nml-cli client open --output-json\nml-cli client install --interactive --output-json\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client open"]}," 支持 Windows、macOS、Linux。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["already_running"]}," 避免重复进程；",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["launch_requested"]}," 只表示系统受理启动请求，不代表窗口出现、登录完成或 Local API 就绪，应另查 status/doctor。检测失败会在启动前停止。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["macOS 普通 status 不运行 codesign/Gatekeeper，返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integrityStatus=not_checked"]},"。严格检查使用 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client status --require-integrity --output-json"]},"；失败可返回 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["installed_with_integrity_warning"]},"、退出 2，不能据此判断 App 不存在。已安装旧客户端不会被覆盖，安装流程可提示 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextAction=update_in_client"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Windows x64 仅在 PE、产品、Authenticode、发布者校验通过后复用安装包。macOS 每次下载全新的匹配架构 DMG；由于没有可独立使用的发布者签名/校验和，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["installerVerified=false"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signatureStatus=null"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["publisher=null"]}," 是预期值，磁盘映像检查不等于发布者验证。Linux 不提供客户端下载安装，",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client open"]}," 可打开已有标准安装。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--interactive"]}," 仅请求系统打开已准备的安装包，不会接受许可、批准 UAC/Gatekeeper、完成安装向导、把 macOS App 复制到 Applications，也不代表安装完成。无窗口时检查返回的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["installerPath"]},"，手动完成后重新运行 status。"]}]},"headings":[{"value":"客户端安装与启动","id":"客户端安装与启动","depth":1}],"frontmatter":{"seo":{"title":"客户端安装与启动"}},"lastModified":"2026-10-20T08:43:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/cli/client","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}