# yuanflow-cli

> 面向内容创作与运营团队的 AI 工作流入口，支持主流 Agent 与本地工作台。

Latest version **0.3.6** (published 2026-08-04) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install yuanflow-cli
pnpm add yuanflow-cli
yarn add yuanflow-cli
bun add yuanflow-cli
```

Provides the commands `yuanflow-cli`, `yuanflow-skill`.

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; large bundle; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.6 |
| Published | 2026-08-04 |
| First published | 2026-04-19 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 4 |
| Unpacked size | 14.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zktlove |
| Maintainers | zktlove |
| Keywords | skills, ai-agent, ai-workflow, content-creation, creator-tools, social-media, codex, claude-code, cursor, gemini-cli, yuanflow-cli, yuanflow-skill, xiaohongshu, douyin |

## Links

- npm: https://www.npmjs.com/package/yuanflow-cli
- Repository: https://github.com/zktlove/yuanflow-cli
- Homepage: https://www.npmjs.com/package/yuanflow-cli
- Issues: https://github.com/zktlove/yuanflow-cli/issues
- npm.io page: https://npm.io/package/yuanflow-cli

## Dependencies (4)

- [ajv](https://npm.io/package/ajv.md) ^8.20.0
- [tar](https://npm.io/package/tar.md) ^7.5.22
- [ajv-formats](https://npm.io/package/ajv-formats.md) ^3.0.1
- [@napi-rs/keyring](https://npm.io/package/@napi-rs/keyring.md) ^1.3.0

## Recent versions

- 0.3.6 (latest) — 2026-08-04
- 0.3.5 — 2026-08-03
- 0.3.4 — 2026-07-30
- 0.3.3 — 2026-07-30
- 0.3.2 — 2026-07-27
- 0.3.1 — 2026-07-26
- 0.2.0 — 2026-07-18
- 0.1.94 — 2026-07-09
- 0.1.93 — 2026-07-02
- 0.1.92 — 2026-07-02
- 0.1.91 — 2026-07-02
- 0.1.90 — 2026-07-02
- 0.1.89 — 2026-07-01
- 0.1.88 — 2026-07-01
- 0.1.87 — 2026-07-01
- … 85 more at https://npm.io/package/yuanflow-cli/versions

## README

# YuanFlow CLI

> 把内容调研、创作、视觉、音视频制作与运营协作，带进你常用的 AI Agent。

YuanFlow 面向内容创作者、运营团队和 AI 工作流使用者，提供统一的命令入口、可复用技能与本地工作台。你可以在熟悉的 Agent 中发现能力、发起任务并持续跟踪执行进度。

当前发布线为 `0.3.6`。口播、情绪卡点与 Vlog 三条视频生产赛道均已正式启用；Vlog 使用独立多素材剪辑链、逐镜头技术校正、单一主 LUT 和成片复检，不会回退到旧滤镜或其它视频赛道。

## 核心能力

- 内容与账号调研：搜索作品、账号、评论和热门内容。
- 创作与运营：支持选题、文案、知识库、账号运营和私域场景。
- 图片与音视频：覆盖视觉理解、生图、语音、视频拆解与剪辑流程。
- 本地任务工作台：集中管理能力、任务记录、资源和设置。
- 多 Agent 接入：同一套 YuanFlow 能力可用于 Codex、Claude Code 和 Gemini CLI。

## 快速开始

要求 Node.js 20 或更高版本。

```bash
npm install -g yuanflow-cli
yuanflow-cli doctor
yuanflow-cli setup --agent "codex"
```

也可以一次接入多个支持的 Agent：

```bash
yuanflow-cli setup --agent "codex,claude-code,gemini-cli"
```

## 打开 YuanFlow 工作台

```bash
yuanflow-cli workbench open --target auto --workspace-root "<项目绝对路径>"
```

查看当前可用能力：

```bash
yuanflow-cli capabilities --format json
```

## 支持环境

| 环境 | 支持状态 |
| --- | --- |
| Codex Desktop / CLI | 正式支持 |
| Claude Code | 正式支持 |
| Gemini CLI | 正式支持 |
| Cursor | Preview |

安装、接入 Agent 和打开本地工作台不需要业务 Token。调用需要在线授权的 YuanFlow 能力时，再按提示完成配置。

## 视频 Runtime

口播、情绪卡点与 Vlog 共用版本化视频 Runtime。普通 npm 安装和 `yuanflow-cli setup` 不下载大型资源；首次制作视频前，在已配置 YuanFlow 业务令牌的环境中显式执行：

```bash
yuanflow-cli video runtime status --format json
yuanflow-cli video runtime setup --format json
yuanflow-cli video runtime history --format json
yuanflow-cli video runtime recover --format json
yuanflow-cli video runtime gc --dry-run --format json
```

`video runtime setup` 只通过 YuanFlow 资源服务取得短期下载地址，校验压缩包与 175 项大型生产资源后安装到 YuanFlow 用户数据目录。4 个通用 Vlog LUT 与其授权、Hash 合同直接包含在 npm Runtime 中。该命令不接受本地资源源目录，也不依赖开发仓库、迁移目录、测试视频或缓存。

正常首次/升级安装只产生 1 次带 YuanFlow 业务令牌的资源授权请求；同一 bundle 已就绪时为 0 次。安装后的 Python Runtime、FFmpeg、Remotion、路由、批准、渲染和审计均在本机执行且不接触令牌。口播缺少时间戳稿时，Node 凭据层会通过 YuanFlow `/v1/audio/transcriptions` 调用并缓存 `fun-asr`；默认视觉由本地算法和 Agent 抽帧检查完成，只有 Agent 无法看图时才显式使用可能计费的 `video vision analyze` / `qwen3-vl-plus`。

资源下载按字节和百分比写入 Job 进度。安装、失败、取消、中断、重试和恢复记录保存在受管 Runtime 根目录的脱敏限长历史中；异常退出的 `running` 会自动归档为可重试 `interrupted`。`runtime recover` 深度校验并重建损坏版本，失败时只恢复 bundle 与 175 项资源均通过逐文件校验的备用版本。`runtime gc` 必须先 `--dry-run` 预览，实际删除需要 Workbench 或真实交互终端二次确认，且不会删除活动版本、默认保留的一个备用版本、未知目录或符号链接。

## 图片生成与编辑

图片能力已经注册为真实命令：

```bash
yuanflow-cli image generate --prompt "一只橘猫" --output "<输出图片路径>" --format json
yuanflow-cli image edit --prompt "改成水彩风格" --image-file "<本地原图路径>" --output "<输出图片路径>" --format json
```

生成与编辑均先调用 `gpt-image-2-c`，只有主模型明确失败时才切换一次 `gpt-image-2`。生成使用标准 JSON generation 请求；编辑必须把本地 PNG/JPEG/WEBP/GIF 作为 `multipart/form-data` 文件上传，不接受用 JSON 路径或网络 URL 冒充原图。两项均为服务端鉴权和计费命令，实际执行前需要用户二次确认；CLI 只负责提交请求、接收 URL 或 `b64_json`、校验图片内容并原子写入本地文件。

---
_Source: https://npm.io/package/yuanflow-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
