@funky-dev/cli

中文文档
0.2.0发布于 2026/11/11MIT零依赖构建来源已验证近 30 天下载 2301

Manage Funky agents as code

原始使用文档
文档目录6 节
  1. Install
  2. Quick start
  3. Agent files
  4. Authentication
  5. Development
  6. Releasing

funky

Manage Funky Cloud agents as code. Describe each agent in a YAML file, then funky apply creates or updates it — like Terraform, for agent configs.

Install

npm install -g @funky-dev/cli    # or, without installing: npx @funky-dev/cli login

Or download a binary for macOS, Linux or Windows from the latest release, or, with Go installed:

go install github.com/funkyhq/cli/cmd/funky@latest

funky --version shows the installed version.

Quick start

funky login      # opens your browser: sign in, pick a project, approve this machine
funky init       # creates agents/
$EDITOR agents/researcher.yaml
funky apply      # shows the plan, asks, then creates or updates

Agent files

One file per agent config in agents/. The fields are the API's agent config fields:

# agents/researcher.yaml
inference:
  provider: anthropic
  model: claude-sonnet-5
  maxTokens: 2048
systemPrompt: You are an autonomous agent in a fresh Linux sandbox.
network:
  type: allowlist
  domains: [github.com]
packages:
  pip: [pandas==2.2.0]
setupCommands: []
credentials: []
resources: { cpuCount: 4, memoryMB: 4096 }
metadata: { team: research }

inference, systemPrompt and network are required; the rest default to empty. resources sizes the agent's sandbox in vCPUs and MiB of memory; a field left out is the default, 2 vCPUs and 1024 MiB.

An agent is named by its file name, or by a name: field. The name is stored in the config's metadata as funky.dev/name, which is how the next apply finds the config to update.

funky apply:

  • creates configs for new files, updates configs whose file changed (sending only the changed fields, so each apply adds at most one version), and leaves the rest alone;
  • pins each update to the version it planned against, so a config edited elsewhere in the meantime fails with a conflict instead of being overwritten;
  • never archives anything: removing a file leaves its config in place.

Flags: --dry-run shows the plan only; --auto-approve skips the confirmation.

Authentication

funky login signs the CLI in as you, in one project — run it again to switch projects. The login lasts 90 days, lives in your OS keychain, and can be revoked with funky logout or from Settings in the web app. funky whoami shows who and where the CLI is acting.

On a machine without a browser, funky login --no-browser prints a link and asks for the code the page shows.

In CI, set FUNKY_API_KEY to a key from https://platform.funky.dev/api-keys instead; it takes precedence over a login.

Development

go test ./...
go run ./cmd/funky --help

FUNKY_API_URL, FUNKY_CONSOLE_URL and FUNKY_PLATFORM_URL point the CLI at non-production services; FUNKY_CONFIG_DIR moves where the login is saved.

Releasing

Push a version tag; the release workflow builds every platform with GoReleaser, publishes a GitHub release, then publishes @funky-dev/cli to npm (npm/publish.mjs; each platform's binary is its own version, like 0.1.1-darwin-arm64, which the main version installs as an optional dependency):

git tag v0.1.0 && git push origin v0.1.0

A tag with a suffix (v0.2.0-rc.1) becomes a pre-release, on npm's next tag. To try the build locally: goreleaser release --snapshot --clean && node npm/publish.mjs --dry-run (output in dist/).

版本与发布记录

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

版本发布日期距今
0.2.0latest2026/11/114 天前
0.2.0-win32-arm64win32-arm642026/11/114 天前
0.2.0-darwin-arm64darwin-arm642026/11/114 天前
0.2.0-darwin-x64darwin-x642026/11/114 天前
0.2.0-win32-x64win32-x642026/11/114 天前
0.2.0-linux-arm64linux-arm642026/11/114 天前

其他发布通道:linux-x64 → 0.2.0-linux-x64,linux-arm64 → 0.2.0-linux-arm64,win32-x64 → 0.2.0-win32-x64,darwin-x64 → 0.2.0-darwin-x64,darwin-arm64 → 0.2.0-darwin-arm64,win32-arm64 → 0.2.0-win32-arm64。

关于 @funky-dev/cli 的常见问题

@funky-dev/cli 是什么?

Manage Funky agents as code

如何安装 @funky-dev/cli?

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

@funky-dev/cli 支持 TypeScript 吗?

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

@funky-dev/cli 需要什么版本的 Node.js?

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

@funky-dev/cli 可以商用吗?

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

@funky-dev/cli 的下载量有多少?

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

@funky-dev/cli 还在维护吗?

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