npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dabi-cli

v1.1.1

Published

达笔 AI 命令行工具 - 文生图/图生图/视频生成

Readme

dabi-cli

达笔 AI 命令行工具 - 文生图 / 图生图 / 视频生成

使用方式

dabi-cli 由达比客户端内置并提供给技能运行环境,不面向独立终端用户。不要执行全局安装或升级命令;版本升级随达比客户端发布。

配置

# 设置 API Key(必需)
dabi-cli apiKey <你的密钥>

# 设置默认输出目录(可选,默认 ./dabi-ai-output)
dabi-cli config set outputDir D:/output

# 查看配置
dabi-cli config list

快速开始

# 达比图像引擎 pro 文生图
dabi-cli text2img -m dabi_image_pro -p "一只猫"

# 达比图像引擎 max 图生图
dabi-cli img2img -m dabi_image_max -c <图片Code> -p "油画风格"

# 文生图
dabi-cli text2imgBanana -p "一只猫"

# 图生图
dabi-cli img2imgBanana -f photo.png -p "油画风格"

# 文生视频(可灵3)
dabi-cli kling3 -p "日落延时" -u 5

# 文生视频(Seedance)
dabi-cli seedance -p "跳舞" -u 4

# Seedance 2.5 全能参考(音频可独立输入)
dabi-cli seedance25 -p "参考@音频1的节奏生成视频" --audioCode <audioCode> -u 10

# Seedance 2.5 视频编辑
dabi-cli seedance25 -p "编辑视频,将@视频1的天空替换为@图片1中的晚霞,并参考@音频1的节奏" --videoCode <videoCode1> <videoCode2> --refCode <imageCode> --audioCode <audioCode> --mode edit

# 新建设计会话
dabi-cli newDs

# 上传文件
dabi-cli upload -f photo.png -d <dsCode>

# 明确需要在同一画布创建新的相同素材节点
dabi-cli upload -f photo.png -d <dsCode> --force-upload

# 查询任务结果
dabi-cli poll -T <taskId>

seedance25 仅接受媒体Code;所有模式下单张输入图片必须小于30 MB,单个输入视频不能超过50 MB,单个输入音频不能超过15 MB。 提示词建议按图片、视频、音频各自的输入顺序,使用 @图片1@视频1@音频1 指代对应素材。

素材自动复用

upload、图生图、Kling 和 Seedance 的本地媒体输入会按“API 账号 + 服务地址 + dsCode + 文件内容”自动复用已有素材 code。文件改名不影响复用,文件内容改变或切换画布后会重新上传。

同步生成并保存到本地的图片或视频也会登记其生成结果 code,后续继续作为参考素材时不需要重新上传。

异步模式只提交任务,不会在 CLI 内下载生成结果,因此不会自动登记生成结果的本地文件;再次使用时优先引用 poll 返回的媒体 code。异步任务使用过的原始本地输入仍会正常登记,重新发起任务时不会重复上传。

用户明确要求创建新的相同素材节点时,在对应命令中添加:

--force-upload

素材登记只保存账号/画布的不可逆摘要、文件哈希、素材 code 和时间等少量元数据,不保存图片本体、Base64、完整本地路径或明文 API Key。登记区采用固定容量(最多 1024 个槽位、每槽最多 4 个素材),不会随使用次数无限增长;条目被淘汰时只会重新上传,不会阻断生成。

素材登记只是上传优化;登记、校验、锁或写入异常时,CLI 会回退到原始上传流程。

全局选项

| 选项 | 短参 | 说明 | 默认值 | |------|------|------|--------| | --format | -F | 输出格式: text, json | json | | --query | -q | jq 表达式,提取 JSON 结果字段 | - | | --version | -V | 显示版本号 | - | | --help | -h | 显示帮助信息 | - |

输出格式

默认输出结构化 JSON,加 -F text 切换为带颜色的终端文本。

使用 -q 提取 JSON 中的字段(支持 .key[0][]| 管道):

# 提取单个字段
dabi-cli newDs -q .dsCode
dabi-cli text2imgBanana -p "一只猫" -q ".medias[0].code"

# 遍历数组
dabi-cli getSelectedNodes -d <dsCode> -q ".nodes[].code"

# 管道组合
dabi-cli text2imgBanana -p "一只猫" -q ".medias | .[0].url"

命令一览

| 命令 | 说明 | |------|------| | text2img | 达比图像引擎文生图(dabi_image_pro=达比图像引擎pro,dabi_image_max=达比图像引擎max,默认max) | | img2img | 达比图像引擎图生图(dabi_image_pro=达比图像引擎pro,dabi_image_max=达比图像引擎max,默认max,-c 最多4个输入) | | text2imgBanana | Banana 文生图(模型: bananapro/banana2/banana) | | img2imgBanana | Banana 图生图(-f/-c 合计最多4个输入) | | text2imgGpt | GPT 文生图(模型: gpt_2_0) | | img2imgGpt | GPT 图生图(-f/-c 合计最多4个输入) | | kling3 | 可灵3视频生成(-f/-c 合计最多2张输入) | | seedance | Seedance 视频生成(参考图最多9张,参考视频最多3个) | | seedance25 | Seedance 2.5 视频生成(仅接受媒体Code,支持全能参考、视频编辑、视频延长) | | newDs | 新建设计会话 | | poll | 查询/轮询任务结果 | | upload | 上传文件 | | getSelectedNodes | 获取选中节点 | | useDs | 切换设计会话 | | config | 配置管理 | | apiKey | 快捷设置 API Key | | list-apis | 列出所有可用的 API 接口 | | api <operation> | 调用指定的 API 接口 |

每个命令支持 -h 查看完整参数列表和说明。

通用 API 调用

除了内置的生图/生视频命令,还可以通过 list-apisapi 调用平台提供的所有 API 接口。

# 列出所有可用接口(含请求类型:GET / POST-form / POST-json)
dabi-cli list-apis

# 查看某个接口的参数规范(调用前建议先查看)
dabi-cli api <operationId> -i

# 调用接口(根据请求类型选择传参方式)
dabi-cli api <operationId>                              # GET 请求,无参直接调用
dabi-cli api <operationId> -P key=value                 # GET / POST-form 请求
dabi-cli api <operationId> -f body.json                 # POST-json 请求
  • GET 请求:通过 -P 传递 query 参数
  • POST-form 请求:通过 -P 传递表单字段
  • POST-json 请求:通过 -f 从 JSON 文件读取请求体

异步模式

生成命令(text2imgBanana / img2imgBanana / kling3 / seedance / seedance25)支持 --async 参数,创建任务后立即返回,不等待结果:

dabi-cli text2imgBanana -p "一只猫" --async

异步模式 JSON 输出:

{
  "command": "text2imgBanana",
  "dsCode": "61598",
  "taskId": "abc123",
  "medias": [],
  "savedTo": null,
  "async": true,
  "message": "任务已异步提交,可登录达笔查看结果"
}

使用 poll 命令查询异步任务结果:

dabi-cli poll -T <taskId>

要求

  • Node.js >= 18.0.0

License

MIT