@fireblocks/fireblocks-cli

中文文档
16.1.0发布于 2026/11/10MITTypeScriptES Module构建来源已验证近 30 天下载 2296

Agent-first CLI for Fireblocks infrastructure. Execute any Fireblocks API operation from the command line.

原始使用文档
文档目录18 节
  1. Install
  2. Homebrew (macOS)
  3. npm (macOS / Linux / Windows)
  4. Standalone installers
  5. Versioning
  6. Quick start
  7. Commands
  8. fireblocks configure — Manage credentials
  9. fireblocks whoami — Show current profile
  10. fireblocks <namespace> <action> — API operations
  11. fireblocks help-index — Discover the API
  12. Authentication
  13. Approvals and security
  14. Output and errors
  15. AI agents
  16. Complementary to MCP (AI Link)
  17. Contributing
  18. License

@fireblocks/fireblocks-cli

Command-line interface for the Fireblocks API. Configure once, invoke any Fireblocks operation from your terminal or AI agent.

Commands are generated from the Fireblocks OpenAPI spec, so every endpoint is reachable and new endpoints appear automatically when the CLI updates. Authentication and JWT request signing are handled for you.

Install

Homebrew (macOS)

brew tap fireblocks/fireblocks-cli
brew install fireblocks-cli

npm (macOS / Linux / Windows)

npm install -g @fireblocks/fireblocks-cli

Standalone installers

Download the latest release for your platform from GitHub Releases. No Node.js required.

macOS

ArchitectureInstallerTarball
ARM64 (Apple Silicon)fireblocks-v*-arm64.pkgfireblocks-v*-darwin-arm64.tar.gz
x64 (Intel)fireblocks-v*-x64.pkgfireblocks-v*-darwin-x64.tar.gz

Windows

ArchitectureInstallerTarball
x64fireblocks-v*-x64.exefireblocks-v*-win32-x64.tar.gz

Note: If the installer shows "PATH not updated" during installation, your system PATH exceeds Windows' 1024-character limit. Use npm install -g @fireblocks/fireblocks-cli instead, or manually add C:\Program Files\fireblocks\bin to your PATH after installing.

Linux

Architecture.deb (Ubuntu / Debian)Tarball
x64fireblocks-v*-amd64.debfireblocks-v*-linux-x64.tar.gz
ARM64fireblocks-v*-arm64.debfireblocks-v*-linux-arm64.tar.gz

Tarballs are also available as .tar.xz for smaller downloads.

To verify a download, compare the sha256 shown on the release page against:

# macOS / Linux
sha256sum <downloaded-file>
# macOS alternative
shasum -a 256 <downloaded-file>

Versioning

This CLI follows semantic versioning, with one exception: commands that call operations in the ea (Early Availability, EA) lifecycle state. EA operations are not generally available and may not be accessible to all customers. They can change or break before they reach GA.

Quick start

# 1. Configure your API key and secret (from the Fireblocks Console)
fireblocks configure

# 2. Verify credentials
fireblocks whoami

# 3. Make a request
fireblocks vaults get-paged-vault-accounts

# 4. Discover the API
fireblocks help-index

Commands

fireblocks configure — Manage credentials

Interactive setup that stores your API key ID and RSA secret in ~/.config/fireblocks/config.json. For agents and CI, use env vars or flags instead (see Authentication).

fireblocks configure                       # set up the default profile
fireblocks configure --profile profile-name     # named profile for multi-env setups
fireblocks configure --set-default=profile-name # switch the default profile without re-entering credentials

When configuring a second profile you are asked whether to make it the default. The config always stores the baseUrl explicitly so the file is self-describing.

fireblocks whoami — Show current profile

Prints the default profile name, masked API key, and base URL from the local config file. No API call is made.

fireblocks whoami

Example output:

{
  "defaultProfile": "default",
  "apiKey": "apiKey",
  "baseUrl": "https://api.fireblocks.io"
}

fireblocks <namespace> <action> — API operations

Commands are generated from the Fireblocks OpenAPI spec. OpenAPI path parameters become required flags (kebab-case); query parameters become optional flags. Write ops take the body as --data '<json>'.

# Reads
fireblocks vaults get-paged-vault-accounts
fireblocks vaults get-vault-account --vault-account-id 0

# Writes (include --no-confirm for non-interactive)
fireblocks transactions create-transaction \
  --data '{"assetId":"BTC","amount":"0.01","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \
  --no-confirm

# Idempotent retries
fireblocks transactions create-transaction \
  --data '{...}' \
  --idempotency-key "$(uuidgen)" --no-confirm

Global flags:

FlagEnv VarPurpose
--api-keyFIREBLOCKS_API_KEYAPI key ID
--secret-keyFIREBLOCKS_SECRET_KEY / FIREBLOCKS_SECRET_KEY_PATHRSA private key (PEM string or path)
--base-urlFIREBLOCKS_BASE_URLOverride endpoint (default https://api.fireblocks.io, sandbox https://sandbox-api.fireblocks.io)
--profileNamed config profile
--dataJSON body for write operations
--idempotency-keyUUID for safe retries of write operations
--no-confirmSkip confirmation prompt on writes
--dry-runPrint the assembled request without sending
--debugLog request/response details to stderr
--outputOutput format: json (default) or yaml

fireblocks help-index — Discover the API

help-index prints a compact JSON manifest of every resource and action the CLI exposes — under 2K tokens for the full catalog. Designed for agents: one call gives enough to plan, without loading per-resource docs upfront.

fireblocks help-index                              # all resources and actions
fireblocks vaults --help                           # detail for one namespace
fireblocks vaults get-vault-account --help         # detail for one action
fireblocks vaults get-vault-account --dry-run      # preview the request

Progressive disclosure: start narrow with --help, widen to help-index only when you need to find something.

Authentication

Credentials resolve in this order (highest priority first):

  1. CLI flags: --api-key, --secret-key
  2. Environment variables: FIREBLOCKS_API_KEY + (FIREBLOCKS_SECRET_KEY | FIREBLOCKS_SECRET_KEY_PATH)
  3. Config profile: ~/.config/fireblocks/config.json (select with --profile <name>)

fireblocks configure is interactive-only. Agents and CI must use flags or env vars.

Approvals and security

Write operations run against your workspace's Transaction Authorization Policy (TAP). The CLI submits requests; TAP decides whether they require co-signer or admin approval. The CLI is not a security boundary — TAP is. Treat CLI credentials with the same care you'd treat any key into a custody platform.

Output and errors

  • stdout: JSON data only
  • stderr: lifecycle warnings, debug logs, and errors

Lifecycle warnings. When a response reports a non-GA lifecycle state (ea, deprecated or closed), the CLI prints one line to stderr naming the operation. The state is read from the Fireblocks-Lifecycle-State response header, so it is accurate whatever CLI version you have installed:

Warning: Operation 'getWebhooks' is in EA (Early Availability) and is not generally available. It may change or break before it reaches GA.

For deprecated operations it includes the sunset date, plus the replacement and migration guide when the API provides them. A closed operation is normally answered with 410 Gone, which needs no warning; if it still responds (your workspace has a temporary exception), the CLI warns that the operation has been closed and your access may be revoked. The warning is informational: stdout and the exit code are unchanged, and it also appears on error responses. To suppress it, set FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING to any value other than 0 or false:

export FIREBLOCKS_SDK_SUPPRESS_LIFECYCLE_WARNING=1

Errors are structured JSON on stderr:

{"code": 5, "status": 429, "message": "Rate limit exceeded", "request_id": "abc-123", "retry_after": 30}

Exit codes:

CodeMeaning
0Success
1Client error (400/409/422)
2Usage/parse error
3Auth error (401/403)
4Not found (404)
5Rate limited (429) — retry after retry_after seconds
6Server error (500+)
7Timeout (30s)

AI agents

The CLI is designed to be driven by coding agents (Claude Code, Cursor, Devin). Install the CLI, then drop SKILL.md into your agent's skills directory. Agents will:

  • Discover operations via help-index
  • Compose workflows by piping JSON between commands
  • Retry intelligently using exit codes and retry_after
# List vault accounts, filter with jq, pipe to the next command
fireblocks vaults get-paged-vault-accounts \
  | jq -r '.accounts[] | select(.assets[].balance > 0) | .id'

For agent workflows that benefit from typed tool schemas, use Fireblocks AI Link MCP. Use the CLI for leaf operations, scripts, and any time ambient schema tokens aren't worth the context cost. The two are designed to coexist.

Contributing

Issues and PRs welcome at github.com/fireblocks/fireblocks-cli.

License

MIT

版本与发布记录

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

版本发布日期距今
16.1.0latest2026/11/104 天前
16.0.02026/11/0410 天前
15.2.02026/10/2817 天前
15.1.02026/10/2025 天前
15.0.02026/10/131 个月前
14.0.02026/10/061 个月前

关于 @fireblocks/fireblocks-cli 的常见问题

@fireblocks/fireblocks-cli 是什么?

Agent-first CLI for Fireblocks infrastructure. Execute any Fireblocks API operation from the command line.

如何安装 @fireblocks/fireblocks-cli?

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

@fireblocks/fireblocks-cli 支持 TypeScript 吗?

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

@fireblocks/fireblocks-cli 支持 ESM 还是 CommonJS?

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

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

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

@fireblocks/fireblocks-cli 可以商用吗?

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

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

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

@fireblocks/fireblocks-cli 还在维护吗?

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