# クライアントの導入と起動

先に導入状態を確認し、導入済みなら開きます。インストールは `status=not_installed` かつ導入を意図する場合のみです。検出失敗・タイムアウト・不正 JSON・`detection_inconclusive` は未導入を意味しません。

```bash
ml-cli client status --output-json
ml-cli client open --output-json
ml-cli client install --interactive --output-json
```

`client open` は Windows・macOS・Linux 対応です。`already_running` は重複起動を避けます。`launch_requested` は OS の要求受理だけで、表示・ログイン・API 準備完了ではありません。status/doctor で別途確認します。検出失敗時は起動しません。

macOS の通常 status は codesign/Gatekeeper を実行せず `integrityStatus=not_checked` です。厳密な検証は `client status --require-integrity --output-json`。失敗時に `installed_with_integrity_warning`、終了 2 でも App は未導入ではありません。既存の旧版を上書きせず、`nextAction=update_in_client` を案内する場合があります。

Windows x64 は PE・製品・Authenticode・発行元を検証してからインストーラーを再利用します。macOS は対応する新規 DMG を毎回取得し、独立した発行元署名・チェックサムがないため `installerVerified=false`、`signatureStatus=null`、`publisher=null` が想定されます。ディスク検査は発行元検証ではありません。Linux は導入を行わず、既存の標準インストールを開きます。

`--interactive` は OS にインストーラーを開くよう依頼するだけで、ライセンス承認・UAC/Gatekeeper 許可・ウィザード完了・Applications へのコピーは行いません。表示されない場合は `installerPath` を確認し、手動完了後に status を再実行します。