Fablun CLI、Agent Skill 与轻量 MCP Server
零运行时依赖的 Node.js 18+ 命令行工具(npm 包 fablun)、Agent Skill(npx skills add Crimson-Pass/fablun-cli)与 6 工具轻量 MCP Server。共用一次浏览器 OAuth 登录即可调用全站 20 款视频与图像模型。
1. 一键安装 CLI 或 Agent Skill
# Option A: One-step onboarding (browser OAuth + Agent Skill)
npx -y fablun init
# Option B: Install Agent Skill directly for Claude Code / Cursor / Codex / Antigravity
npx skills add Crimson-Pass/fablun-cli
# Option C: Install CLI globally
npm i -g fablun
fablun login
fablun balance2. 视频替换与多模型生成示例
# 1. H3 Pro Object Video Swap ($0.025/s · uses $1.00 free starter credit)
fablun swap --mode object \
--video ./source-clip.mp4 \
--ref ./new-product.png \
--target "earbuds case" \
--prompt "Replace the earbuds case with <Picture 1>, keeping exact camera motion and lighting" \
--resolution 480p --duration 5 --ratio 16:9 -o swapped.mp4
# 2. Check live USD quote before submitting
fablun quote magi-2 --resolution 1080P --duration 5 --ratio 16:9
# 3. Generate with MAGI-2, Seedance 2.5, Seedream 5.5, or FLUX 3
fablun generate magi-2 --prompt "Rain-slicked Tokyo alley at dusk" --resolution 1080P --duration 5 -o tokyo.mp4
fablun generate flux-3 --prompt "Ceramic espresso cup on warm oak desk" --ratio 1:1 -o cup.png3. 轻量 MCP Server(6 个核心工具,约 1.3K Tokens)
fablun_list_models— 查询全站可用模型、模式、规格与 USD 价格fablun_quote— 获取实时美元精确报价并校验账户余额fablun_swap_video— 调用 H3 Pro 进行视频主体/人物替换(支持本地 MP4 与图片自动上传)fablun_generate— 统一提交全站视频与图像生成任务fablun_get_task— 轮询任务状态并下载成品视频/图片fablun_cancel_task— 取消排队或运行中任务并自动全额退还余额
# Claude Code:
fablun login
claude mcp add fablun -- npx -y fablun mcp
# Cursor / Claude Desktop / Codex (mcp.json):
{
"mcpServers": {
"fablun": {
"command": "npx",
"args": ["-y", "fablun", "mcp"]
}
}
}常见问题与解答
不绑卡可以免费体验 npx fablun 吗?
可以。运行 npx -y fablun init 或 fablun login,用 Google / GitHub 登录后即可免绑卡领取 $1.00 H3 Pro 免费额度(约 8 次 480p 5秒生成或替换)。
CLI 登录凭证保存在哪里?
密钥保存在本地 ~/.config/fablun/config.json(0600 权限),由 fablun CLI 与 fablun mcp 自动共享;也可通过环境变量 FABLUN_API_KEY 传入。
如何在 CLI/MCP 中解锁 MAGI-2、Seedance 2.5、Seedream 5.5 等全部模型?
在 /topup 完成最低 $5 一次性美元充值(无月费、永不过期),现有 CLI 密钥与 MCP 配置无需改动即可直接调用全站 20 款模型。
CLI 会自动处理本地视频和图片上传吗?
是的。传入本地 MP4(≤ 50 MiB)或 PNG/JPG/WebP(≤ 12 MiB)时,CLI 会自动通过 /api/v3/uploads 上传并按 SHA256 缓存 2 小时签名链接,重复调优提示词无需重复上传。