@berthos / cli
这个 berth 命令:scaffold,运行,测试和部署常驻应用程序,检查您的机器是否可以强制执行,并将应用程序连接到任何MCP客户端。
泊位 在沙盒中运行人工智能代理的工具。每个工具在类中声明它可以接触什么 berth.yml manifest, Linux内核(Landlock和seccomp)执行它。
npm install -g @berthos/cli
需要Node.js 22.19+。在带有KVM的苹果芯片Mac或Linux上,这就是全部:每个沙箱都是一个启动Berth自己内核的小型VM,因此执行不依赖于您的机器,而且是第一个 berth dev 下载它(大约140 MB,每个文件都根据sha256进行检查)。没有KVM的英特尔mac、Windows和Linux使用Docker代替 berth test 和 berth deploy 构建一个容器镜像,所以他们需要Docker在任何地方(文档)。
使用
berth doctor # can this machine enforce?
berth init my-app # scaffold a resident app
cd my-app
berth dev # boot it in a sandbox, reload on save
berth test # build the production image and check every export
berth mcp --app my-app # serve its exports as MCP tools over stdio
命令
| 命令 | 它是做什么的 |
|---|---|
berth init [name] | 搭建一个常驻应用程序(--template, --registry) |
berth dev | 在本地沙盒中使用热加载启动应用程序(--apps 添加配套应用程序, --runtime docker|vm 选择沙盒) |
berth test | 构建生产镜像,检查导出契约,运行应用程序的测试(--json) |
berth doctor | 检查此机器是否可以强制执行功能 |
berth mcp --app <name> | 将应用程序的导出公开为MCP工具(--only, --warm, --no-boot) |
berth rpc <app> --export <name> | 直接调用一个导出(--input 将JSON) |
berth vm install|status|stop|logs | 安装和管理本地microVM运行时(文档) |
berth os up|down|status | 保持沙盒运行,以便代码可以立即重新连接到它 |
berth attest <runId> | 生成运行的证明记录 |
berth audit list|verify | 显示审计跟踪,或检查其散列链 |
berth snapshot create|list|restore|fork | 检查点和恢复沙盒 |
berth deploy --fleet=<e2b|daytona|k8s> | 部署到远程提供程序 |
berth fleet status|scale, berth logs | 管理和跟踪已部署的实例 |
berth publish --registry=<url> | 将应用程序发布到 berth-registry |
berth tls init | 生成本地CA和服务器证书 |
运行 berth <command> --help 每一面旗帜。部署需要在CLI旁边安装匹配的适配器: @berthos/adapter-e2b, @berthos/adapter-daytona 或者 @berthos/adapter-k8s.
berth agent run, berth crew run 和 berth eval 驱动实验性代理框架,该框架尚未发布。它们只能从一个克隆的仓库中工作。