@fluid-app/fluid-cli-products

中文文档
0.1.603发布于 2026/11/15TypeScriptES Module近 30 天下载 12.4万

Fluid CLI plugin for catalog products — create a priced product from flags

原始使用文档

@fluid-app/fluid-cli-products

Fluid CLI plugin for catalog products.

npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-products
fluid login
fluid products create --title "Beet Powder" --price 29.99 --sku BEET-12 --yes
fluid products create --title "Beet Powder" --price 29.99 --country CA --publish --yes

create makes one product with one variant, priced in one country the company sells in (--country, an ISO code; it defaults to the company's only country, or else its default country). --price is in that country's currency, with no more decimal places than the currency keeps (none for JPY, three for KWD): Fluid rounds a price to those before saving it, so create refuses a price it would change. The product stays a draft unless you pass --publish. --image-url sets the product's main image and its first gallery image. To sell in a country the company doesn't have yet, open it first with fluid countries open from @fluid-app/fluid-cli-localization.

Before creating, it looks for a product with exactly the same SKU (or, without --sku, the same title, ignoring case). If one exists it prints alreadyExists: true with that product and changes nothing. The check reads the first 100 search hits, so it can miss a product created moments ago, or one far down a long list of similar names. If product search isn't answering, it creates nothing and says so, rather than risk a duplicate.

The signed-in account needs permission to view the company's countries as well as to edit products.

Every command prints JSON; failures print a JSON error on stderr and exit non-zero. create changes live configuration, so it asks for confirmation unless you pass --yes.

版本与发布记录

@fluid-app/fluid-cli-products 共发布 605 个版本,首次发布于 2026/10/22;过去 12 个月发布了 605 个版本。

版本发布日期距今
0.1.603latest2026/11/15今天
0.1.6022026/11/15今天
0.1.6012026/11/15今天
0.1.6002026/11/141 天前
0.1.5992026/11/141 天前
0.1.5982026/11/141 天前

关于 @fluid-app/fluid-cli-products 的常见问题

@fluid-app/fluid-cli-products 是什么?

Fluid CLI plugin for catalog products — create a priced product from flags

如何安装 @fluid-app/fluid-cli-products?

在项目目录运行 npm install @fluid-app/fluid-cli-products,或使用 pnpm add / yarn add / bun add。

@fluid-app/fluid-cli-products 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fluid-app/fluid-cli-products 支持 ESM 还是 CommonJS?

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

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

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

@fluid-app/fluid-cli-products 可以商用吗?

@fluid-app/fluid-cli-products 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@fluid-app/fluid-cli-products 的下载量有多少?

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

@fluid-app/fluid-cli-products 还在维护吗?

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