@flowriki/agent

中文文档
0.1.0-beta.72发布于 2026/10/19SEE LICENSE IN LICENSEES Module近 30 天下载 2048

Run Flowriki UI tests on your own computer. Connects this machine to your Flowriki account.

原始使用文档
文档目录7 节
  1. Requires
  2. Use
  3. Write tests with Claude
  4. What you do not need
  5. Serving a local checkout
  6. Where things are kept
  7. Which Flowriki this talks to

@flowriki/agent

Runs your Flowriki UI tests on your own computer. The browser under test and your project files stay on this machine.

Requires

  • Node.js 22.13 or newer. Flowriki uses node:sqlite, which older versions do not have. node --version tells you.
  • npm (ships with Node).

Use

npx @flowriki/agent@latest connect     # approve this computer in your browser
npx @flowriki/agent@latest start       # run it — stays in the foreground

start keeps running until you stop it. Closing the terminal stops the agent; nothing is installed as a background service.

npx @flowriki/agent@latest status      # connected? what is prepared?
npx @flowriki/agent@latest doctor      # diagnose setup problems
npx @flowriki/agent@latest disconnect  # forget this computer's credential

Write tests with Claude

The agent is also an MCP server, so Claude Code or Claude Desktop can write Flowriki tests for you, on your own Claude plan. Claude drives a browser on this computer, each step is performed before it is kept, and what it writes is saved to a new branch for you to review and publish in the dashboard.

Connect this computer first (connect above), then add Flowriki to Claude:

claude mcp add flowriki -- npx -y @flowriki/agent@latest mcp

For Claude Desktop, add this to its MCP settings (claude_desktop_config.json):

{ "mcpServers": { "flowriki": { "command": "npx", "args": ["-y", "@flowriki/agent@latest", "mcp"] } } }

Then ask, for example: "Write a Flowriki test that signs up and verifies the email". Claude reads your project's features, sign-in profiles and helpers, and uses them. You do not run mcp yourself — Claude starts it. It works alongside start, in a browser window of its own.

It keeps itself up to date. @latest starts the newest Flowriki each time Claude connects, and while Claude stays connected Flowriki checks for a newer release every half hour and switches over to it between tasks — never while a flow is being written. The next answer says it was updated; if the new release brings new tools and Claude does not offer them yet, start a new Claude session (in the terminal version of Claude Code, /mcp then Reconnect also works). The agent you run with start says when it is behind: npm install -g @flowriki/agent@latest, then restart it.

What you do not need

No checkout of Flowriki, and nothing to build. connect and start are the whole installation.

For recording, running and debugging from the dashboard you do not need a checkout of the project under test either: the service reads the flow from your connected repository and sends it with the command, so this machine can be one that has never cloned anything.

Serving a local checkout

Optional, and for one case: working against files on this machine rather than what is committed.

npx @flowriki/agent@latest start --project /path/to/checkout

Repeat --project for several. They are remembered, so later runs need no arguments. Each folder identifies itself from the .flowriki/project.json committed when its repository was connected — you never pass a project id.

One dashboard action still needs one: verifying unsaved steps from the flow editor, which reads the flow from a checkout rather than being sent it. It says so plainly when there is none. Recording, running and debugging do not.

Where things are kept

Credentials and project mappings live outside the npm cache, so upgrading or clearing the cache does not lose them:

Windows%APPDATA%\Flowriki
macOS~/Library/Application Support/Flowriki
Linux$XDG_STATE_HOME/flowriki or ~/.local/state/flowriki

FLOWRIKI_HOME overrides it.

Which Flowriki this talks to

Production, unless you say otherwise. --service <url> (or FLOWRIKI_SERVICE_URL) points at another one — our own dev and staging environments, or a self-hosted install.

Credentials are kept per service, so a production credential is never sent to a development one, and connecting to a second does not disturb the first. doctor prints which environment answered.

This is not the site your tests run against. That is a project setting in the dashboard, and changing it never requires connecting this machine again.

For a terminal where Flowriki should not open the default browser, use npx @flowriki/agent connect --no-open and open the printed approval link yourself. Approval is still required.

版本与发布记录

@flowriki/agent 共发布 65 个版本,首次发布于 2026/09/11;过去 12 个月发布了 65 个版本。

版本发布日期距今
0.1.0-beta.72latest2026/10/1927 天前
0.1.0-beta.712026/10/1927 天前
0.1.0-beta.702026/10/1927 天前
0.1.0-beta.692026/10/1928 天前
0.1.0-beta.682026/10/1928 天前
0.1.0-beta.672026/10/1828 天前

其他发布通道:beta → 0.1.0-beta.39。

关于 @flowriki/agent 的常见问题

@flowriki/agent 是什么?

Run Flowriki UI tests on your own computer. Connects this machine to your Flowriki account.

如何安装 @flowriki/agent?

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

@flowriki/agent 支持 TypeScript 吗?

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

@flowriki/agent 支持 ESM 还是 CommonJS?

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

@flowriki/agent 需要什么版本的 Node.js?

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

@flowriki/agent 可以商用吗?

@flowriki/agent 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@flowriki/agent 的下载量有多少?

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

@flowriki/agent 还在维护吗?

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