@flood-md/cli

中文文档
0.2.13发布于 2026/11/14MITES Module构建来源已验证近 30 天下载 2959

Connect Flood to React and Next.js projects.

原始使用文档

@flood-md/cli

npx @flood-md/cli init [--dry-run] connects an existing React/Next.js npm project. npx @flood-md/cli doctor checks package versions and agent file presence.

Version 0.2.11 adds read-only JSON discovery. Use the CLI version matching flood.json; source availability does not mean the candidate is published.

npx @flood-md/[email protected] info
npx @flood-md/[email protected] catalog --kind workflow --group composition
npx @flood-md/[email protected] read component:data-table
npx @flood-md/[email protected] read recipe:table-bulk-actions

info distinguishes connected, bundle-only, version-mismatch and missing-packages states. catalog/read refuse mismatched or incomplete connected installations. All three commands return JSON; failures return structured JSON on stderr and a nonzero exit code. They do not install, modify host files or fetch remote guides. The npx runner itself may fetch the explicitly selected package.

catalog filters by kind, group and literal metadata search. Default pages contain at most 12 entries; --limit accepts 1–50, within a 16 KiB output budget. Follow nextCursor; a changed query or catalog invalidates an old cursor. read returns one known ID, at most 10,000 Unicode code points by default (maximum 40,000). Follow nextOffset using --offset to finish instructions; --links-offset pages optional links separately. Required prerequisites are explicit in requires.

Copied guides default to project-owned content, identified by source, customized and hashes. --source package compares canonical content without overwriting. Missing/linked project copies fail explicitly. A modified flood/catalog.json cannot redirect reads. See Agent knowledge for the complete protocol and limits.

Requires Node 22.12+. Installs matching tokens, React and agent packages; creates flood.json and every owned guide listed in the matching agent manifest: DESIGN.md, rules.json and manifest.json under flood/, plus SKILL.md and focused references under .agents/skills/flood-ui/. Version 0.2.3 includes the expanded bundle and spacing reference. Refuses existing owned files or linked destinations. Does not rewrite source code, client settings or AGENTS.md. After init, import @flood-md/react/styles.css once at the application root. Wrap new interfaces in FloodRoot from @flood-md/react to select the dark foundations profile. Read the installed flood/DESIGN.md for the matching API. Read the skill's routing reference for the task/source/check matrix. Doctor checks the complete guide set and package alignment; it does not validate application behavior, CSS imports or agent compliance. Merge customized guide upgrades deliberately; init has no overwrite mode.

Init and doctor reject linked project-directory ancestry. Init also requires a regular nonlinked package.json (including no hardlinks), validates its project object and React dependency, and rechecks paths after npm before owned writes. These checks do not sandbox npm or stop an external process from racing filesystem changes; run installs only in a trusted project and inspect npm failures.

版本与发布记录

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

版本发布日期距今
0.2.13latest2026/11/141 天前
0.2.122026/11/132 天前
0.2.112026/11/115 天前
0.2.102026/10/3115 天前
0.2.92026/10/3017 天前
0.2.82026/10/2719 天前

关于 @flood-md/cli 的常见问题

@flood-md/cli 是什么?

Connect Flood to React and Next.js projects.

如何安装 @flood-md/cli?

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

@flood-md/cli 支持 TypeScript 吗?

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

@flood-md/cli 支持 ESM 还是 CommonJS?

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

@flood-md/cli 需要什么版本的 Node.js?

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

@flood-md/cli 可以商用吗?

@flood-md/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@flood-md/cli 的下载量有多少?

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

@flood-md/cli 还在维护吗?

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