licell 0.10.17 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -168,7 +168,7 @@ Licell has three main state layers:
168
168
  | Type | Default location | Purpose |
169
169
  |------|------------------|---------|
170
170
  | Global auth | `~/.licell-cli/auth.json` | Alibaba Cloud credentials and default region |
171
- | Project state | `<project>/.licell/project.json` | app name, envs, network, deploy state |
171
+ | Project state | `<project>/.licell/project.json` | app name, envs, network, deploy state; can also be a workspace file for multiple components in one repo |
172
172
  | MCP project config | `<project>/.mcp.json` | MCP discovery for Claude / Codex / Cursor |
173
173
 
174
174
  Compatibility notes:
@@ -176,6 +176,38 @@ Compatibility notes:
176
176
  - Licell still supports some legacy `~/.ali-cli/*` paths
177
177
  - current canonical global path is `~/.licell-cli/*`
178
178
 
179
+ ### Workspace / Monorepo
180
+
181
+ If one repository contains multiple deployable directories (for example `apps/web` for a static site
182
+ plus `apps/api` for an FC API), prefer a workspace-style root `.licell/project.json`:
183
+
184
+ ```json
185
+ {
186
+ "defaultComponent": "api",
187
+ "components": {
188
+ "web": {
189
+ "path": "apps/web",
190
+ "appName": "demo-web",
191
+ "deployType": "static",
192
+ "dist": "dist",
193
+ "domain": "www.example.com"
194
+ },
195
+ "api": {
196
+ "path": "apps/api",
197
+ "appName": "demo-api",
198
+ "deployType": "api",
199
+ "runtime": "nodejs22",
200
+ "entry": "src/index.ts",
201
+ "target": "prod"
202
+ }
203
+ }
204
+ }
205
+ ```
206
+
207
+ - Running `licell deploy` inside `apps/web` resolves the `web` component automatically.
208
+ - Running `licell deploy` inside `apps/api` resolves the `api` component automatically.
209
+ - After a successful deploy, Licell now persists stable deploy intent back into the matched component (for example `domain`, `domainSuffix`, `entry`, `dist`, `target`, `enableCdn`, `enableSSL`, `useVpc`) instead of only writing a very small subset of fields.
210
+
179
211
  ## Team Auth Distribution
180
212
 
181
213
  When only a small set of people in a team directly hold high-privilege AK/SK credentials, it is often cleaner to separate “authorization” from “daily usage”:
@@ -258,6 +290,7 @@ If you want Claude Code, Codex, Cursor, or other agents to call Licell directly
258
290
 
259
291
  ```bash
260
292
  licell setup
293
+ licell setup --agent codex
261
294
  licell setup --agent codex --global
262
295
  licell setup --agent claude --global
263
296
  ```
@@ -296,8 +329,13 @@ If you want the agent to have a richer task-oriented instruction surface inside
296
329
  ```bash
297
330
  licell skills init codex
298
331
  licell skills init claude
332
+ licell skills init codex --global
299
333
  ```
300
334
 
335
+ By default, `skills init` writes into the current project. Use `--global` only when you explicitly want user-level global skills.
336
+
337
+ `licell setup` is the interactive wrapper, but it reuses the same underlying skills write flow.
338
+
301
339
  Skills, MCP, help, and docs are meant to stay aligned through the shared command model.
302
340
 
303
341
  ---
package/README.md CHANGED
@@ -180,13 +180,45 @@ Licell 有三类核心状态:
180
180
  | 类型 | 默认位置 | 说明 |
181
181
  |------|----------|------|
182
182
  | 全局认证 | `~/.licell-cli/auth.json` | 阿里云凭证与默认 region |
183
- | 项目状态 | `<project>/.licell/project.json` | appName、环境变量、网络、部署状态 |
183
+ | 项目状态 | `<project>/.licell/project.json` | appName、环境变量、网络、部署状态;也可在 repo 根切换为 workspace 形式管理多个 component |
184
184
 
185
185
  兼容性说明:
186
186
 
187
187
  - Licell 仍兼容历史上的 `~/.ali-cli/auth.json` 等旧路径
188
188
  - 当前主路径以 `~/.licell-cli/*` 为准
189
189
 
190
+ ### Workspace / Monorepo
191
+
192
+ 当同一个 repo 里有多个可部署目录(例如 `apps/web` 静态站 + `apps/api` FC API)时,
193
+ 推荐在 repo 根维护一份 workspace 形态的 `.licell/project.json`:
194
+
195
+ ```json
196
+ {
197
+ "defaultComponent": "api",
198
+ "components": {
199
+ "web": {
200
+ "path": "apps/web",
201
+ "appName": "demo-web",
202
+ "deployType": "static",
203
+ "dist": "dist",
204
+ "domain": "www.example.com"
205
+ },
206
+ "api": {
207
+ "path": "apps/api",
208
+ "appName": "demo-api",
209
+ "deployType": "api",
210
+ "runtime": "nodejs22",
211
+ "entry": "src/index.ts",
212
+ "target": "prod"
213
+ }
214
+ }
215
+ }
216
+ ```
217
+
218
+ - 在 `apps/web` 目录执行 `licell deploy` 时,会自动解析到 `web` component。
219
+ - 在 `apps/api` 目录执行 `licell deploy` 时,会自动解析到 `api` component。
220
+ - deploy 成功后,Licell 会把稳定重跑所需的 deploy intent(如 `domain` / `domainSuffix` / `entry` / `dist` / `target` / `enableCdn` / `enableSSL` / `useVpc`)回写到对应 component,而不是只写少量字段。
221
+
190
222
  ## 团队授权分发(推荐)
191
223
 
192
224
  当团队中只有少数人直接持有高权限 AK/SK 时,可以把“授权”和“使用”分开:
@@ -284,8 +316,13 @@ licell deploy --type api --output json
284
316
  ```bash
285
317
  licell skills init codex
286
318
  licell skills init claude
319
+ licell skills init codex --global
287
320
  ```
288
321
 
322
+ 默认会把 skills 写入当前项目;只有显式传 `--global` 时,才会写到用户级全局技能目录。
323
+
324
+ `licell setup` 是交互式包装命令,底层仍然复用同一套 skills 写入逻辑。
325
+
289
326
  Skills 与 catalog、help、README 共享同一套命令描述体系,所以更容易保持一致。
290
327
 
291
328
  ---
@@ -575,13 +612,20 @@ licell e2e cleanup <runId>
575
612
  | 命令 | 说明 | 关键选项 |
576
613
  |------|------|----------|
577
614
  | `licell login` | 配置阿里云凭证 | `--account-id`, `--ak`, `--sk` |
578
- | `licell auth export [passkey]` | 加密打包当前 licell 全局凭证状态到私有 OSS,并生成 restore token | `--bucket`, `--expires-hours` |
615
+ | `licell auth export [passkey]` | 加密打包当前 licell 全局凭证状态到私有 OSS,并生成 restore token | `--bucket`, `--expires`, `--expires-hours` |
616
+ | `licell auth inspect <token>` | 解析并查看 restore token 的内容与有效期 | — |
579
617
  | `licell auth repair` | 修复凭证权限(推荐:用超级 AK/SK 自动补齐 licell 最小权限并继续使用) | `--account-id`, `--ak`, `--sk` |
580
618
  | `licell auth restore <token> [passkey]` | 使用 restore token + passkey 一键恢复 licell 全局凭证状态 | `--yes` |
581
619
  | `licell logout` | 清除本地凭证 | — |
582
620
  | `licell whoami` | 查看当前登录身份 | — |
583
621
  | `licell switch` | 切换默认 region | `--region` |
584
622
  | `licell init` | 初始化 FC 项目(空目录生成脚手架,已有项目写入 licell 配置) | `--runtime`, `--kind`, `--app` |
623
+ | `licell bootstrap` | 把已确认的部署方案初始化到 `.licell/project.json` / `.licell/state.json` | `--component`, `--path`, `--type` |
624
+ | `licell workspace discover` | 扫描 repo,给出候选 components 与部署提案 | — |
625
+ | `licell workspace doctor` | 在 workspace / monorepo 根目录诊断全部或指定 component | `--component`, `--runtime`, `--entry` |
626
+ | `licell workspace init` | 在 repo 根目录创建或更新 licell workspace component | `--component`, `--path`, `--type` |
627
+ | `licell workspace list` | 列出当前 repo / workspace 中可部署的 components | `--component` |
628
+ | `licell workspace migrate` | 把旧单项目 `.licell/project.json` 升级成兼容旧版的 workspace/component 格式 | `--component`, `--path`, `--default` |
585
629
  | `licell config domain [suffix]` | 查看或设置全局默认域名后缀 | `--unset` |
586
630
 
587
631
  #### Delivery Workflow
@@ -594,36 +638,39 @@ licell e2e cleanup <runId>
594
638
 
595
639
  | 命令 | 说明 | 关键选项 |
596
640
  |------|------|----------|
597
- | `licell deploy` | 一键极速打包部署 | `--type`, `--entry`, `--dist` |
641
+ | `licell deploy` | 一键极速打包部署 | `--component`, `--type`, `--entry` |
598
642
  | `licell deploy check` | 本地预检 FC API 入口与 runtime 约束(建议 deploy 前执行) | `--runtime`, `--entry`, `--docker-daemon` |
643
+ | `licell deploy plan` | 基于 `.licell/project.json` 生成部署计划(不执行云端变更) | `--component`, `--include`, `--exclude` |
599
644
  | `licell deploy spec [runtime]` | 查看 FC API 部署规格(给 Agent/开发者在 deploy 前对照) | `--all` |
600
- | `licell task config [name]` | 查看任务函数的异步调用配置 | `--target` |
601
- | `licell task info <taskId> [name]` | 查看单个异步任务详情 | `--target` |
602
- | `licell task invoke [name]` | 异步调用任务函数 | `--target`, `--payload`, `--file` |
603
- | `licell task list [name]` | 查看任务函数的异步任务列表 | `--target`, `--status`, `--prefix` |
604
- | `licell task stop <taskId> [name]` | 停止正在运行的异步任务 | `--target` |
605
- | `licell task config rm [name]` | 删除任务函数的异步调用配置 | `--target`, `--yes` |
606
- | `licell task config set [name]` | 写入任务函数的异步调用配置 | `--target`, `--enable`, `--disable` |
607
- | `licell release list` | 查看函数版本列表 | `--limit` |
608
- | `licell release promote [versionId]` | 发布并切流到目标别名 | `--target` |
609
- | `licell release prune` | 清理历史函数版本(默认仅预览) | `--keep`, `--apply`, `--yes` |
610
- | `licell release rollback <versionId>` | 回滚到指定函数版本 | `--target` |
611
- | `licell logs` | 查看云端日志(默认实时流式) | `--once`, `--window`, `--lines` |
612
- | `licell fn info [name]` | 查看函数详情 | `--target` |
613
- | `licell fn invoke [name]` | 调用函数(同步) | `--target`, `--payload`, `--file` |
645
+ | `licell task config [name]` | 查看任务函数的异步调用配置 | `--component`, `--target` |
646
+ | `licell task info <taskId> [name]` | 查看单个异步任务详情 | `--component`, `--target` |
647
+ | `licell task invoke [name]` | 异步调用任务函数 | `--component`, `--target`, `--payload` |
648
+ | `licell task list [name]` | 查看任务函数的异步任务列表 | `--component`, `--target`, `--status` |
649
+ | `licell task stop <taskId> [name]` | 停止正在运行的异步任务 | `--component`, `--target` |
650
+ | `licell task config rm [name]` | 删除任务函数的异步调用配置 | `--component`, `--target`, `--yes` |
651
+ | `licell task config set [name]` | 写入任务函数的异步调用配置 | `--component`, `--target`, `--enable` |
652
+ | `licell release list` | 查看函数版本列表 | `--component`, `--limit` |
653
+ | `licell release promote [versionId]` | 发布并切流到目标别名 | `--component`, `--target` |
654
+ | `licell release prune` | 清理历史函数版本(默认仅预览) | `--component`, `--keep`, `--apply` |
655
+ | `licell release rollback <versionId>` | 回滚到指定函数版本 | `--component`, `--target` |
656
+ | `licell logs query [query]` | SLS project/logstore/query 一次性检索日志 | `--project`, `--store`, `--region` |
657
+ | `licell logs tail [query]` | SLS project/logstore/query 持续跟随日志流 | `--project`, `--store`, `--region` |
658
+ | `licell fn info [name]` | 查看函数详情 | `--component`, `--target` |
659
+ | `licell fn invoke [name]` | 调用函数(同步) | `--component`, `--target`, `--payload` |
614
660
  | `licell fn list` | 查看函数列表 | `--limit`, `--prefix` |
615
- | `licell fn rm [name]` | 删除函数 | `--force`, `--yes` |
616
- | `licell fn domain bind <domain>` | 绑定或更新 FC 自定义域名(资源级,不默认改 DNS) | `--function`, `--target`, `--path` |
661
+ | `licell fn logs [name]` | 查看函数日志(默认实时流式) | `--component`, `--once`, `--window` |
662
+ | `licell fn rm [name]` | 删除函数 | `--component`, `--force`, `--yes` |
663
+ | `licell fn domain bind <domain>` | 绑定或更新 FC 自定义域名(资源级,不默认改 DNS) | `--function`, `--component`, `--target` |
617
664
  | `licell fn domain info <domain>` | 查看 FC 自定义域名详情 | — |
618
665
  | `licell fn domain list` | 查看 FC 自定义域名列表 | `--limit`, `--prefix` |
619
666
  | `licell fn domain unbind <domain>` | 解绑 FC 自定义域名 | `--cleanup-dns`, `--yes` |
620
- | `licell env list` | 查看云端环境变量 | `--target`, `--show-values` |
621
- | `licell env pull` | 拉取云端环境变量 | `--target` |
622
- | `licell env rm <key>` | 删除云端环境变量(并同步本地 .licell/project.json) | `--yes` |
623
- | `licell env set <key> <value>` | 设置云端环境变量(并同步本地 .licell/project.json) | |
624
- | `licell domain app bind <domain>` | 为当前应用编排 DNS、函数域名与可选 SSL | `--ssl`, `--ssl-force-renew`, `--target` |
667
+ | `licell env list` | 查看云端环境变量 | `--component`, `--target`, `--show-values` |
668
+ | `licell env pull` | 拉取云端环境变量 | `--component`, `--target` |
669
+ | `licell env rm <key>` | 删除云端环境变量(并同步本地 .licell/project.json) | `--component`, `--yes` |
670
+ | `licell env set <key> <value>` | 设置云端环境变量(并同步本地 .licell/project.json) | `--component` |
671
+ | `licell domain app bind <domain>` | 为当前应用编排 DNS、函数域名与可选 SSL | `--component`, `--ssl`, `--ssl-force-renew` |
625
672
  | `licell domain app unbind <domain>` | 解绑当前应用域名,并清理 FC custom domain / DNS CNAME | `--yes` |
626
- | `licell domain static bind <domain>` | 为静态站点编排 CDN、DNS 与可选 HTTPS | `--bucket`, `--ssl`, `--ssl-force-renew` |
673
+ | `licell domain static bind <domain>` | 为静态站点编排 CDN、DNS 与可选 HTTPS | `--component`, `--bucket`, `--ssl` |
627
674
  | `licell domain static unbind <domain>` | 解绑静态站点域名,并清理 CDN / DNS | `--yes` |
628
675
  | `licell dns records add <domain>` | 添加域名解析记录 | `--rr`, `--type`, `--value` |
629
676
  | `licell dns records list [domain]` | 查看域名解析记录 | `--limit` |
@@ -688,10 +735,13 @@ licell e2e cleanup <runId>
688
735
 
689
736
  | 命令 | 说明 | 关键选项 |
690
737
  |------|------|----------|
691
- | `licell doctor` | 诊断本机 licell 登录态、云端权限/目标资源/域名入口、项目配置与部署前置条件 | `--runtime`, `--entry`, `--docker-daemon` |
738
+ | `licell doctor` | 诊断本机 licell 登录态、云端权限/目标资源/域名入口、项目配置与部署前置条件 | `--component`, `--all-components`, `--runtime` |
692
739
  | `licell catalog` | 输出共享 CLI 命令目录,供 Agent / 自动化发现命令、选项和结构化契约 | `--root-command`, `--command-key` |
693
- | `licell skills init [agent]` | AI Agent 生成 licell skills(claude / codex) | `--project-root`, `--force` |
694
- | `licell setup` | 安装后引导:配置 AI Agent skills | `--agent`, `--global`, `--project-root` |
740
+ | `licell ci init github` | 生成 GitHub Actions deploy-only workflow(只调用 licell,不负责编译) | `--apply`, `--force`, `--workflow` |
741
+ | `licell ci init gitlab` | 生成 GitLab CI deploy-only pipeline(只调用 licell,不负责编译) | `--apply`, `--force`, `--pipeline` |
742
+ | `licell skills init [agent]` | 为 AI Agent 生成 licell skills(claude / codex) | `--global`, `--project-root`, `--force` |
743
+ | `licell setup` | 安装后引导:交互式配置 AI Agent skills | `--agent`, `--global`, `--project-root` |
744
+ | `licell state show` | 查看当前 repo 的 `.licell/state.json` | `--component` |
695
745
  | `licell completion [shell]` | 输出 shell 补全脚本(bash/zsh) | `--engine` |
696
746
  | `licell upgrade` | 按当前安装来源升级 licell | `--channel`, `--target-version`, `--repo` |
697
747
  | `licell e2e cleanup [runId]` | 清理指定 E2E run 产生的资源 | `--manifest`, `--keep-workspace`, `--yes` |
@@ -761,7 +811,7 @@ licell deploy --type api --target preview
761
811
  ### 我希望 Agent 自动、安全地部署
762
812
 
763
813
  ```bash
764
- licell setup --agent codex --global
814
+ licell setup --agent codex
765
815
  licell catalog --output json
766
816
  licell deploy spec nodejs22 --output json
767
817
  licell deploy check --runtime nodejs22 --entry src/index.ts --output json