@agentrific/server

中文文档
0.14.0发布于 2026/10/24ES Module近 30 天下载 2254

Self-hosted control plane for long-running coding agents

原始使用文档
文档目录5 节
  1. Install and start
  2. Claude Code
  3. Connect your phone
  4. Useful commands
  5. Access and permissions

Agentrific Server

Run coding agents on your computer or server, and control them from the Agentrific iOS and Android apps. Start work, follow progress, send instructions and review results from your phone while the agents run on your own machine.

This package installs the Agentrific server and the agentrific command-line tool for macOS and Linux. The mobile apps connect to your server; your repositories, model accounts and agent processes stay on that machine. A paired device can disconnect and reconnect without ending a running agent session.

With Agentrific you can:

  • Manage tasks and agent sessions across your Git repositories.
  • Run coding tasks in separate Git worktrees.
  • Follow live progress and send follow-up instructions from your phone.
  • Attach images and files to give agents context.
  • Pair multiple devices with the same server and revoke access when needed.

Learn more at agentrific.com.

Install and start

You'll need Node.js 22.19 or newer, Git, and Pi on the machine that will run your agents. Install Pi and connect your model accounts using the same OS account that will run the server. See the model setup guide.

OpenTunnel is bundled and is the default HTTPS connection, with no separate tunnel binary or account. Alternatively, install Tailscale on the server and phone, or cloudflared on the server. You can also use an existing HTTPS tunnel or reverse proxy. Agentrific does not install these tools for you. See the connection setup guide.

npm install -g @agentrific/server
agentrific init
agentrific start

The server defaults to port 4318 and stores its configuration and state in ~/.agentrific. Its initial projects folder is ~/projects; you can choose a different folder in the app's server settings.

Claude Code

If Claude Code is installed and logged in under the server's OS account, Agentrific automatically adds a Claude Code model connection. Run claude auth login if login is required, then refresh the model list. The server checks PATH, ~/.local/bin/claude and ~/.claude/local/claude; it also respects CLAUDE_CONFIG_DIR.

Like Pipeline, this connection uses pi-claude-agent-sdk and the official Claude Agent SDK child with your existing CLI login. Pi still owns tools, task history and agent execution. The SDK supplies its compatible Claude executable and handles credential refresh; Agentrific does not copy credentials into Pi or send them to clients. Inherited Claude/Anthropic environment configuration still applies.

When no default has been saved, a ready Claude Code connection becomes the default for new sessions using the first Sonnet model in its catalogue. Saved defaults and existing session selections are preserved. Installed but unauthenticated models appear unavailable with login guidance. Set AGENTRIFIC_CLAUDE_CODE=off before starting the server to disable discovery.

Development runs compile the bridge before starting. Its CLI-login and session-isolation adaptations are compiled into the published package, so npm installations do not depend on a workspace-only Yarn patch.

Connect your phone

Open the Agentrific app on iOS or Android. In the server terminal, accept the default OpenTunnel connection or choose Tailscale Serve, Cloudflare Tunnel, or an existing HTTPS endpoint, then press p to display a pairing QR code. Scan it in the app and enter the separately printed six-digit PIN.

Already paired in the web app? Open Settings → Pair device to generate a QR code and separate PIN for another device. Invitations expire after five minutes and can be used once. The server must have a public HTTPS URL configured (AGENTRIFIC_PUBLIC_URL); restart after changing it. Only share invitations with trusted devices: pairing grants access to run agents as the server’s host user.

Once paired, select a project, create a task and start an agent. The server runs the work and streams progress back to your device. Use HTTPS for remote connections; your phone must be able to reach the configured server address.

See the server setup and pairing guide for connection options and configuration.

Useful commands

agentrific --help          # Show commands and options
agentrific start --connection local # Start without a public phone connection
agentrific status         # Show server status
agentrific pair           # Print a fresh pairing QR code and PIN
agentrific devices        # List paired devices
agentrific update --check # Check for a newer server release

Access and permissions

Devices must pair before accessing server commands and events. Coding agents execute with the server user's permissions, so run the server under an account with access only to the repositories and credentials you intend to use.

版本与发布记录

@agentrific/server 共发布 26 个版本,首次发布于 2026/10/01;过去 12 个月发布了 26 个版本。

版本发布日期距今
0.14.0latest2026/10/2415 天前
0.13.12026/10/2117 天前
0.13.02026/10/2117 天前
0.12.02026/10/2018 天前
0.11.02026/10/1919 天前
0.10.32026/10/1721 天前

关于 @agentrific/server 的常见问题

@agentrific/server 是什么?

Self-hosted control plane for long-running coding agents

如何安装 @agentrific/server?

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

@agentrific/server 支持 TypeScript 吗?

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

@agentrific/server 支持 ESM 还是 CommonJS?

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

@agentrific/server 需要什么版本的 Node.js?

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

@agentrific/server 可以商用吗?

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

@agentrific/server 的下载量有多少?

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

@agentrific/server 还在维护吗?

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