@dbx-app/plugin-cli

中文文档
0.1.10发布于 2026/11/04Apache-2.0ES Module零依赖构建来源已验证近 30 天下载 2577

Create and package DBX plugins without compiling the DBX plugin CLI

原始使用文档

@dbx-app/plugin-cli

Precompiled dbx-plugin CLI for creating and packaging DBX plugins. Installing this package does not compile the CLI and does not require a DBX source checkout.

npm install --global @dbx-app/plugin-cli
dbx-plugin create my-plugin

Or run it without a global installation:

npx @dbx-app/plugin-cli create my-plugin

The package selects a precompiled binary for macOS, Linux, or Windows and bundles the matching Rust and Go DBX plugin SDK sources. Frontend-only plugins, including the Svelte template, require only Node.js. Rust and Go are needed only when the plugin itself has a Rust or Go backend.

dbx-plugin create my-plugin --template frontend
dbx-plugin create my-svelte-plugin --template svelte
dbx-plugin create my-rust-plugin --template rust
dbx-plugin create my-go-plugin --template go
dbx-plugin package my-plugin
dbx-plugin dev --path my-plugin --port 5190

The dev subcommand requires Node.js 22+ and runs the bundled browser development runtime, without DBX or source-tree dependencies. It supports frontend-only workbenches and Rust/Go backends, with JSONL or framed transport. Optional [dev] ui_build and ui_watch command arrays configure project builds. Development credentials are stored locally as plaintext under .dbx-dev/ (or --data-dir). Other commands retain their existing Node requirements.

中文说明

@dbx-app/plugin-cli 提供预编译的 dbx-plugin 命令。安装时不会编译 CLI,也不需要克隆 DBX 源码仓库。

npm install -g @dbx-app/plugin-cli
dbx-plugin create my-plugin

也可以直接使用:

npx @dbx-app/plugin-cli create my-plugin

npm 主包会自动选择当前操作系统对应的预编译二进制,并携带匹配版本的 Rust 和 Go 插件 SDK。纯前端插件只需要 Node.js;只有插件自身包含 Rust 或 Go 后端时才需要对应语言的编译环境。

使用 dbx-plugin dev --path my-plugin --port 5190 可在浏览器运行通用插件开发环境,无需启动 DBX。仅 dev 要求 Node.js 22+;运行时及外壳已包含在 npm 包中。开发配置和凭据以明文保存在 .dbx-dev/,不要提交或打包该目录。

版本与发布记录

@dbx-app/plugin-cli 共发布 11 个版本,首次发布于 2026/08/09;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.10latest2026/11/048 天前
0.1.92026/09/161 个月前
0.1.82026/09/161 个月前
0.1.72026/09/161 个月前
0.1.62026/09/141 个月前
0.1.52026/09/141 个月前

关于 @dbx-app/plugin-cli 的常见问题

@dbx-app/plugin-cli 是什么?

Create and package DBX plugins without compiling the DBX plugin CLI

如何安装 @dbx-app/plugin-cli?

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

@dbx-app/plugin-cli 支持 TypeScript 吗?

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

@dbx-app/plugin-cli 支持 ESM 还是 CommonJS?

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

@dbx-app/plugin-cli 需要什么版本的 Node.js?

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

@dbx-app/plugin-cli 可以商用吗?

@dbx-app/plugin-cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@dbx-app/plugin-cli 的下载量有多少?

根据 npm 官方下载统计,@dbx-app/plugin-cli 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,577 次,日均约 86 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dbx-app/plugin-cli 还在维护吗?

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