{"_id":"@dylan-dong/ezent-cli-for-agent","_rev":"3-6ea6a62e492d8b87d5b9915611dd94ea","name":"@dylan-dong/ezent-cli-for-agent","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.1":{"name":"@dylan-dong/ezent-cli-for-agent","version":"0.2.1","_id":"@dylan-dong/ezent-cli-for-agent@0.2.1","maintainers":[{"name":"bamboomoon","email":"yuezhulove@gmail.com"}],"bin":{"ezent":"dist/index.js"},"dist":{"shasum":"fa5deed5b4bda17ccc6a458dc7c70c671318f9c3","tarball":"https://registry.npmjs.org/@dylan-dong/ezent-cli-for-agent/-/ezent-cli-for-agent-0.2.1.tgz","fileCount":3,"integrity":"sha512-hp/++VwY8FF/+4x3kAjYlUo19BkbVNnxZylOOOftLuidQDWH4UVP5E2pYSyBu6vHWVrkbLrJ6fPghiCMsLyKCw==","signatures":[{"sig":"MEYCIQD0gYlBv9KefTZYuit4s8W7pO2i+JZMB7Wn4x6d2vFrsQIhAMUWKthIi5ucwiowpHxoi6NETv1jgER9ujQFXUMbtpMC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66368},"type":"module","engines":{"node":">=18"},"_npmUser":{"name":"bamboomoon","email":"yuezhulove@gmail.com"},"_npmVersion":"10.8.2","description":"Ezent platform CLI for AI Agent (config mutations disabled)","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.23.8","conf":"^13.0.1","chalk":"^5.3.0","ofetch":"^1.4.1","commander":"^12.1.0","cli-table3":"^0.6.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ezent-cli-for-agent_0.2.1_1776411644078_0.7003399868668212","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@dylan-dong/ezent-cli-for-agent","version":"0.2.2","_id":"@dylan-dong/ezent-cli-for-agent@0.2.2","maintainers":[{"name":"bamboomoon","email":"yuezhulove@gmail.com"}],"bin":{"ezent":"dist/index.js"},"dist":{"shasum":"9106fe3c4d0cb35e484de414736eb292bebac524","tarball":"https://registry.npmjs.org/@dylan-dong/ezent-cli-for-agent/-/ezent-cli-for-agent-0.2.2.tgz","fileCount":3,"integrity":"sha512-3ThGeucckXfPvaKFE/ms/bxA5Bz5172uxR0x05zAkJwPCnXTfgjx6V773JjCsSzoL48VOxvU7zgkAoA6gsOOMg==","signatures":[{"sig":"MEUCIF03NWNjA3Z9HkHiEvVWS2I/QyTJEt+hl4nvzXr0qW2FAiEA5kdxK/2rnYnyNnD8IIiBNYIcBd7pOwvGE01lS+ZeQLM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66668},"type":"module","engines":{"node":">=18"},"_npmUser":{"name":"bamboomoon","email":"yuezhulove@gmail.com"},"_npmVersion":"10.8.2","description":"Ezent platform CLI for AI Agent (config mutations disabled)","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.23.8","conf":"^13.0.1","chalk":"^5.3.0","ofetch":"^1.4.1","commander":"^12.1.0","cli-table3":"^0.6.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ezent-cli-for-agent_0.2.2_1776416476316_0.5250313448978288","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@dylan-dong/ezent-cli-for-agent","version":"0.2.3","type":"module","description":"Ezent platform CLI for AI Agent (config mutations disabled)","bin":{"ezent":"dist/index.js"},"dependencies":{"chalk":"^5.3.0","cli-table3":"^0.6.5","commander":"^12.1.0","conf":"^13.0.1","ofetch":"^1.4.1","undici":"^7.25.0","zod":"^3.23.8"},"engines":{"node":">=18"},"_id":"@dylan-dong/ezent-cli-for-agent@0.2.3","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-0WKZASFNB9rEvJuVU3xq8vY2Zs2Q7gqFs3NxkR+uGOz6SPrIZHix7DVYjHWp6FEBt2m64w7qK7Ny1j923dvb7w==","shasum":"1338d130cc2213b0b62da12d08cb78f2329054f8","tarball":"https://registry.npmjs.org/@dylan-dong/ezent-cli-for-agent/-/ezent-cli-for-agent-0.2.3.tgz","fileCount":3,"unpackedSize":66937,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICyxK8eg+Nz0lWWh1tWFTVyIR6NdGzLY/7SfeLi3g8baAiBQ5PnTuSjj6RVsIn0XSgvx4r1PjVNlqT4DVCts5nTnpA=="}]},"_npmUser":{"name":"bamboomoon","email":"yuezhulove@gmail.com"},"directories":{},"maintainers":[{"name":"bamboomoon","email":"yuezhulove@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ezent-cli-for-agent_0.2.3_1776417989021_0.2173957509286828"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-17T07:40:43.950Z","modified":"2026-04-17T09:26:29.287Z","0.2.1":"2026-04-17T07:40:44.224Z","0.2.2":"2026-04-17T09:01:16.464Z","0.2.3":"2026-04-17T09:26:29.156Z"},"description":"Ezent platform CLI for AI Agent (config mutations disabled)","maintainers":[{"name":"bamboomoon","email":"yuezhulove@gmail.com"}],"readme":"# @dylan-dong/ezent-cli\n\nEzent 平台 CLI 工具，供 AI Agent 和开发者通过命令行操作平台 API。\n\n## 安装\n\n```bash\n# 全局安装\nnpm install -g @dylan-dong/ezent-cli\n\n# 或免安装执行\nnpx @dylan-dong/ezent-cli <command>\n```\n\n## 快速开始\n\n```bash\n# 1. 配置\nezent config set token <your-token>\nezent config set enterpriseId <your-enterprise-id>\nezent config set appId <your-app-id>\n\n# 2. 验证\nezent user me\n\n# 3. 使用\nezent dict list\nezent entity datasources\nezent app list\n```\n\n## 命令列表\n\n| 命令 | 说明 |\n|---|---|\n| `ezent config` | 配置管理 |\n| `ezent user` | 用户/部门/角色查询 |\n| `ezent app` | 应用搜索/详情 |\n| `ezent dict` | 数据字典 CRUD |\n| `ezent entity` | 数据源/实体模型/数据 CRUD |\n| `ezent env` | 环境变量管理 |\n| `ezent i18n` | 多语言管理 |\n| `ezent orch` | 服务编排（查询/创建/调试/发布/执行） |\n| `ezent workflow` | 工作流/审批 |\n| `ezent image` | 图片资源 |\n| `ezent print` | 打印模板 |\n| `ezent export-data` | 数据导出 |\n\n每个命令均支持 `--help` 查看详细参数。\n\n## 全局参数\n\n```bash\nezent --token <token> --enterprise-id <id> --app-id <id> --env <env> <command>\n```\n\n| 参数 | 说明 |\n|---|---|\n| `--token` | 覆盖 token |\n| `--enterprise-id` | 覆盖 enterpriseId |\n| `--app-id` | 覆盖 appId |\n| `--env` | 覆盖环境（DEV / TEST / PROD） |\n\n这些全局参数仅对当前命令生效，不会写回持久化配置。\n\n## 配置项\n\n| 配置项 | 说明 | 默认值 |\n|---|---|---|\n| `baseUrl` | API 地址 | 按构建环境 |\n| `token` | 认证 token | - |\n| `enterpriseId` | 企业 ID | - |\n| `appId` | 应用 ID | - |\n| `env` | 环境 | `DEV` |\n| `autoYes` | 写操作跳过 `--yes` 检查（仅可在交互终端开启） | `false` |\n\n## 写操作安全门禁（0.2.0+）\n\n所有写命令（创建 / 修改 / 删除 / 发布 / `orch execute` / `workflow start` / `export-data create` 等）必须带 `--yes` 才能执行：\n\n```bash\nezent dict delete --id 123 --yes    # ✅\nezent dict delete --id 123          # ❌ exit 2\n```\n\n本机信任环境下可以持久化开启跳过：\n\n```bash\nezent config set autoYes true\n```\n\n开启过程需要**交互式终端**下 stdin 敲入大写 `YES` 确认，非交互环境（CI / Claude Code / 管道 shell）直接拒绝。开启后每条写命令仍会在 stderr 打一行提醒：`⚠️  autoYes enabled, write confirmation skipped for \"...\"`。\n\n> ⚠️ 没有环境变量后门。CI 场景请在每条命令里显式写 `--yes`。\n\n## Agent 模式（多租户隔离）\n\n为防止 AI Agent 通过 `config set` 修改持久化配置导致多租户数据互相污染，项目提供了独立的 Agent 构建包：\n\n| | `@dylan-dong/ezent-cli` | `@dylan-dong/ezent-cli-for-agent` |\n|---|---|---|\n| 命令名 | `ezent` | `ezent` |\n| `config set/delete` | 可用 | 编译时禁用，exit 2 |\n| config 只读（`list/get/path`） | 可用 | 可用 |\n| 构建 | `npm run build:prod` | `npm run build:agent` |\n| 发布 | `npm publish` | `bash scripts/publish-agent.sh` |\n\n**安装 Agent 版本：**\n\n```bash\nnpm install -g @dylan-dong/ezent-cli-for-agent\n```\n\nAgent 版本中 `config set` 和 `config delete` 在编译时被禁用，运行时不存在任何可修改的开关。AI Agent 必须通过全局参数传入凭证：\n\n```bash\nezent --token <token> --enterprise-id <id> --app-id <id> --env <env> <command>\n```\n\n## 发布\n\n```bash\n# 发布正常版本\nnpm publish --access public\n\n# 发布 Agent 版本\nbash scripts/publish-agent.sh\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}