@fluid-app/fluid-cli-connect

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

Fluid CLI plugin for Fluid Connect — connect Exigo, InfoTrax, ByDesign, or Pillars, set credentials, data mappings, and sync settings

原始使用文档

@fluid-app/fluid-cli-connect

Fluid CLI plugin for Fluid Connect: link a back-office platform (Exigo, InfoTrax, ByDesign, or Pillars) to Fluid, then set its credentials, data mappings, and sync settings.

npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-connect
fluid login
fluid connect list                                   # each provider and whether it's installed
fluid connect install exigo --yes                    # install the droplet, creating the connection
fluid connect credentials exigo --yes \
  --set api.company=acme --set api.username=api_user --set api.password=... \
  --set mssql.dataserver=sql.example.com --set mssql.database=acme \
  --set mssql.username=reader --set mssql.password=...
fluid connect show exigo                             # state, supported mappings, every setting
fluid connect unmapped exigo --auto-map --yes        # map exact name matches, list what's left
fluid connect mappings exigo customer_type --options # Fluid's and Exigo's values to map
fluid connect map exigo customer_type --yes --set source_type_slug=rep --set target_type_id=2
fluid connect settings exigo --yes --defaults        # take every default
fluid connect settings exigo --yes --set order.refund_handling=hold
fluid connect status exigo --range 24h               # sync health: success rate, tier, failures by category

Set up interactively

fluid connect walk exigo     # or: fluid setup run connect-exigo

walk runs the whole setup in the terminal, one question at a time:

  1. Installs the provider if it isn't installed, after you confirm.
  2. Asks each credential (passwords and tokens are typed hidden; Exigo also asks the environment, and the sandbox ID outside production). Fluid tests the connection before saving; if the provider refuses, its reason is shown and the questions are asked again, with Enter keeping what you typed. On a connected provider, you can keep the saved credentials.
  3. Maps what's unmapped. Exigo first offers to map exact name matches, then gives a searchable list of Exigo's values; for the others you type the provider's value. Answer * to send every remaining value of that type to one value. Ranks and ship methods get a note and an optional row by hand.
  4. Settings: keep them as they are, put them all back to the defaults, or go through the common settings, each with its label, description, default, and options.
  5. Prints a summary, and the result as JSON.

Every answer is saved as you give it, through the same calls as the commands above. Type < to go back (a changed mapping replaces the row it saved), > to skip, and ? for the menu: jump to a part, change an answer, finish, or stop. Run walk again later to pick up what's left. In a script, use the commands above with --yes; walk needs a terminal.

Commands

unmapped lists, per mapping type, the Fluid values that have no row and no * fallback. done: true means nothing is left. Ranks and ship methods come back as check_by_hand because the API doesn't list Fluid's values for them. --auto-map works for Exigo only, since it is the one provider whose values the API lists. It adds a row wherever a Fluid value's name matches exactly one Exigo value, and leaves ambiguous names for a person.

A new connection already starts on the default settings. settings --defaults puts them back, all at once or one at a time with --only order.refund_handling.

Values passed with --set end up in your shell history and are visible in process listings. For passwords and tokens, prefer fluid connect walk, which asks for them without echoing. credentials keeps every value as typed (a password like 123456 stays a string), and creates the connection if installing the droplet hasn't yet. unmapped exits non-zero when a mapping type couldn't be checked.

status reads the provider's sync status from Fluid (/api/company/v2026-10/connect/integrations): the dashboard's success rate, tier, synced, held, quarantined and skipped counts, and the top failure categories, for --range 60m, 24h (the default), 7d or 30d. It carries counts and category codes, never error text. A provider the company hasn't installed prints the same result as list. When Fluid can't read the status, it exits non-zero with the error's status and code: 404 not_found, 409 not_connected (fluid-integrations has no record of the installation), 502 backend_unavailable or backend_rejected, or 503 connect_unconfigured (Fluid has no API host for the integration). It needs the droplets.view permission.

Every command prints JSON; failures print a JSON error on stderr and exit non-zero. A failed credential test prints the provider's reason in details. Commands that change live configuration ask for confirmation unless you pass --yes.

The CLI talks to two services with the same Fluid API token: api.fluid.app to install the droplet and read status, and fluid-integrations for everything else. Set FLUID_INTEGRATIONS_BASE to point at another fluid-integrations host.

The walkthroughs for each provider, including data mapping and the common settings, are the Connect guided setups at https://docs.fluid.app/setup.

版本与发布记录

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

版本发布日期距今
0.1.712latest2026/11/15今天
0.1.7112026/11/15今天
0.1.7102026/11/15今天
0.1.7092026/11/141 天前
0.1.7082026/11/141 天前
0.1.7072026/11/141 天前

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

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

Fluid CLI plugin for Fluid Connect — connect Exigo, InfoTrax, ByDesign, or Pillars, set credentials, data mappings, and sync settings

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

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

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

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

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

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

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

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

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

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

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

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

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

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