@civitai/cli

中文文档
0.1.136发布于 2026/11/05Apache-2.0零依赖构建来源已验证近 30 天下载 3646

The Civitai CLI — author and ship Civitai App Blocks. Installs the prebuilt Go binary.

原始使用文档
文档目录3 节
  1. Install
  2. How it works
  3. Other install methods

@civitai/cli

The Civitai CLI — author and ship Civitai App Blocks.

This npm package is a thin wrapper over the Go CLI. On linux/x64 the prebuilt binary arrives as an npm package of its own (@civitai/cli-linux-x64), so installing needs only the npm registry. On other platforms the wrapper downloads the binary from the project's GitHub Releases and verifies its sha256 checksum.

Install

npm install -g @civitai/cli
civitai version

Or run without installing:

npx @civitai/cli app create my-app

How it works

  • On linux/x64, npm installs @civitai/cli-linux-x64 (an optional dependency pinned to the same version), which contains the binary. Nothing is downloaded outside the npm registry.
  • Everywhere else — or if optional dependencies were skipped (--omit=optional) — a postinstall step downloads civitai_<version>_<os>_<arch> from the matching GitHub Release and verifies it against checksums.txt.
  • The civitai command then execs that binary, forwarding all arguments and the exit code.
  • Set CIVITAI_CLI_BINARY=/path/to/civitai to point the wrapper at a specific binary (escape hatch / local development).

Supported platforms: linux, macOS, and Windows on x64/arm64 (Windows/arm64 is not built).

Other install methods

This is one of several distribution channels — you can also use go install github.com/civitai/cli/cmd/civitai@latest, Homebrew, or download a release archive directly. See the project README.

版本与发布记录

@civitai/cli 共发布 97 个版本,首次发布于 2026/07/04;过去 12 个月发布了 97 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.136latest2026/11/055 天前
0.1.1352026/11/046 天前
0.1.1342026/11/018 天前
0.1.1332026/11/019 天前
0.1.1322026/10/2317 天前
0.1.1312026/10/2120 天前

关于 @civitai/cli 的常见问题

@civitai/cli 是什么?

The Civitai CLI — author and ship Civitai App Blocks. Installs the prebuilt Go binary.

如何安装 @civitai/cli?

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

@civitai/cli 支持 TypeScript 吗?

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

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

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

@civitai/cli 可以商用吗?

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

@civitai/cli 的下载量有多少?

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

@civitai/cli 还在维护吗?

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