@youka/cli

中文文档
0.3.0发布于 2026/11/03UNLICENSEDES Module零依赖

Official command-line client for the Youka REST API.

原始使用文档
文档目录8 节
  1. Install
  2. API key
  3. Create a karaoke video
  4. Transcribe lyrics automatically
  5. Use a hosted media URL
  6. Docs
  7. Discover capabilities and create lyric videos
  8. Timings and version selection

@youka/cli

Official command-line client for the Youka REST API.

Use this package to create karaoke videos from your terminal: upload audio or video, sync or transcribe lyrics, create a karaoke project, render the final video, and download the MP4.

Install

npm install -g @youka/cli

API key

Create an API key at online.youka.io/account under API keys.

Log in once:

youka login "yk_..."

Or keep the key in your environment:

export YOUKA_API_KEY="yk_..."

Inspect which account, key source, and API URL are active:

youka whoami --json

Create a karaoke video

Create a project from a local song, sync your lyrics, export the karaoke video, and download the MP4:

youka project create ./song.mp3 \
  --title "Artist - Song" \
  --mode align \
  --lyrics "$(cat lyrics.txt)" \
  --sync-model audioshake-alignment \
  --split-model mdx23c \
  --wait \
  --json

Then export the finished project:

youka export create proj_123 \
  --resolution 1080p \
  --quality high \
  --wait \
  --download \
  --output ./karaoke.mp4 \
  --json

Or do the whole flow in one command:

youka project create ./song.mp3 \
  --mode align \
  --lyrics "$(cat lyrics.txt)" \
  --download \
  --output ./karaoke.mp4 \
  --json

Transcribe lyrics automatically

Use transcription when you do not already have lyrics text:

youka project create ./song.mp3 \
  --mode transcribe \
  --download \
  --output ./karaoke.mp4 \
  --json

Use a hosted media URL

youka project create https://example.com/song.mp4 \
  --mode align \
  --lyrics "$(cat lyrics.txt)" \
  --download \
  --output ./karaoke.mp4 \
  --json

Install local helper binaries when needed for URL downloads and local rendering:

youka deps status --json
youka deps ensure --for all --json
youka deps ensure --for render --update --json
youka deps path ffmpeg

Docs

Discover capabilities and create lyric videos

youka capabilities --json
youka project quote ./reference.wav --duration 120 --kind lyric-video --mode transcribe --sync-model elevenlabs-transcription --lyrics "Optional recognition hints" --json
youka project create ./reference.wav --kind lyric-video --mode align --sync-model audioshake-alignment --lyrics "Supplied lyrics" --wait --json

--kind lyric-video skips separation and rejects --split-model. Omitted kind preserves karaoke behavior. All supported models are exposed with workflow and input requirements; models requiring isolated vocals cannot process an original track directly. --mode transcribe accepts recognition hints through --lyrics (or --text for project sync). --language-hint-mode auto|explicit controls the language policy. Wav2Vec2 is an alignment model.

Timings and version selection

youka project timings list proj_123 --json
youka project timings get proj_123 alignment_123 --json
youka project timings import proj_123 alignment_123 --body corrected-timings.json --json
youka project timings select proj_123 alignment_123 --expected-revision REVISION --expected-selection-revision SELECTION_REVISION --json
youka project versions proj_123 --json
youka project settings proj_123 --version-id version_123 --json
youka export create proj_123 --local --version-id version_123 --transparent --mute-all --fps 30 --output ./overlay.mov --json

corrected-timings.json contains { "alignment": { "items": [...] }, "expectedRevision": "...", "select": true, "expectedSelectionRevision": "..." }. Use --body - to read that JSON object from stdin. Timings replace the complete alignment, use absolute seconds, and preserve text and supported metadata. Invalid intervals and stale revisions fail rather than being silently repaired. Read results use the normal CLI JSON envelope; construct the import object from its data field rather than passing the whole envelope back.

Timing edits and selections start no AI task. --mute-all silences all existing stems and takes precedence over volume overrides; it does not promise removal of the audio stream. Transparent local exports use ProRes 4444 and do not incur cloud-export or alignment charges. Existing feature eligibility still applies. Line anticipation depends on the selected layout.

Deploy the matching API endpoints before publishing the updated CLI.

版本与发布记录

@youka/cli 共发布 14 个版本,首次发布于 2026/04/12;过去 12 个月发布了 14 个版本。

版本发布日期距今
0.3.0latest2026/11/03今天
0.2.02026/09/221 个月前
0.1.112026/04/236 个月前
0.1.102026/04/236 个月前
0.1.92026/04/176 个月前
0.1.82026/04/176 个月前

关于 @youka/cli 的常见问题

@youka/cli 是什么?

Youka REST API的官方命令行客户端。

如何安装 @youka/cli?

在项目目录运行 npm install @youka/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 youka,可以用 npx youka 直接运行。

@youka/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/youka__cli 是否存在。

@youka/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@youka/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@youka/cli 可以商用吗?

@youka/cli 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@youka/cli 还在维护吗?

最新版本 0.3.0 发布于 2026/11/03(今天);至今共发布 14 个版本,其中过去 12 个月发布了 14 个;首次发布于 2026/04/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。