@e2b/cli

中文文档
2.23.0发布于 2026/10/28MIT构建来源已验证近 30 天下载 32.9万

CLI for managing e2b sandbox templates

原始使用文档
文档目录3 节
  1. 1. Install the CLI
  2. 2. Authenticate
  3. 3. Check out docs

E2B Logo

E2B CLI

This CLI tool allows you to build manager your running E2B sandbox and sandbox templates. Learn more in our documentation.

1. Install the CLI

Using Homebrew (on macOS)

brew install e2b

Using NPM

npm install -g @e2b/cli

2. Authenticate

e2b auth login

[!NOTE] To authenticate without the ability to open the browser (e.g. in CI/CD), provide E2B_API_KEY as an environment variable. You can find your API key in the API Keys tab in the E2B dashboard. Then use the CLI like this: E2B_API_KEY=e2b_... e2b template create.

3. Check out docs

Visit our CLI documentation to learn more.

版本与发布记录

@e2b/cli 共发布 200 个版本,首次发布于 2023/09/18;过去 12 个月发布了 50 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.23.0latest2026/10/2816 天前
2.22.32026/10/2123 天前
2.22.22026/10/2024 天前
2.22.02026/10/131 个月前
2.21.22026/10/091 个月前
2.21.12026/10/051 个月前

其他发布通道:beta → 1.2.0-beta.3,rc → 2.0.0-rc.0。

关于 @e2b/cli 的常见问题

@e2b/cli 是什么?

CLI for managing e2b sandbox templates

如何安装 @e2b/cli?

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

@e2b/cli 支持 TypeScript 吗?

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

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

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

@e2b/cli 可以商用吗?

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

@e2b/cli 的下载量有多少?

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

@e2b/cli 还在维护吗?

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