> ## Documentation Index
> Fetch the complete documentation index at: https://docs.youka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 依赖项

> 检查、安装并刷新用于 URL 导入和本地渲染的本地辅助二进制文件

某些 CLI 流程需要本地辅助二进制文件。`youka deps ensure` 会将它们下载到 `~/.youka/binaries`，进行校验，并在后续运行时复用缓存副本。

通常在两种情况下需要这些依赖项：

* URL 导入：从远程 URL 创建项目可能需要 `ffmpeg`、`ffprobe` 和 `yt-dlp`
* 本地渲染：`youka export create --local` 需要 `ffmpeg`、`ffprobe`、Remotion 和 Chromium

## `deps status`

```bash theme={null}
youka deps status [--for <scope>]
```

`deps status` 是只读的。它会输出所需二进制文件是否已安装并可用，然后在需要配置时建议对应的 `deps ensure` 命令。

### 示例

<CodeGroup>
  ```bash all theme={null}
  youka deps status --json
  ```

  ```bash render theme={null}
  youka deps status --for render --json
  ```
</CodeGroup>

## `deps ensure`

```bash theme={null}
youka deps ensure [--for <scope>] [--update]
```

### 选项

| 选项              | 描述                                           |
| --------------- | -------------------------------------------- |
| `--for <scope>` | 要安装或检查的依赖集：`url`、`render` 或 `all`。默认为 `all`。 |
| `--update`      | 强制刷新受支持的二进制文件。                               |

### Scope

| Scope    | 安装内容                                     |
| -------- | ---------------------------------------- |
| `url`    | `ffmpeg`、`ffprobe`、`yt-dlp`，以及可选的 `deno` |
| `render` | `ffmpeg`、`ffprobe`、Remotion 和 Chromium   |
| `all`    | 两者都安装                                    |

### 示例

<CodeGroup>
  ```bash all theme={null}
  youka deps ensure --json
  ```

  ```bash url theme={null}
  youka deps ensure --for url --json
  ```

  ```bash render theme={null}
  youka deps ensure --for render --json
  ```

  ```bash refresh theme={null}
  youka deps ensure --for all --update --json
  ```
</CodeGroup>

不使用 `--json` 时，`deps ensure` 会打印进度条以及摘要，说明哪些二进制文件已验证、已下载或已跳过。

## 接下来

* [Projects](/zh/cli/projects) - 从文件或 URL 创建项目
* [Exports](/zh/cli/exports) - 运行 `export create --local`
