licell 0.10.2 → 0.10.6
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 +451 -0
- package/README.md +381 -605
- package/dist/licell.js +298 -183
- package/package.json +3 -1
package/README.en.md
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# Licell CLI (`licell`)
|
|
2
|
+
|
|
3
|
+
[中文 README](./README.md)
|
|
4
|
+
|
|
5
|
+
Licell is an Alibaba Cloud deployment and operations CLI designed for both humans and AI agents.
|
|
6
|
+
|
|
7
|
+
It is not just a bag of cloud commands. It is organized around one primary delivery flow:
|
|
8
|
+
|
|
9
|
+
- one main entry: `deploy`
|
|
10
|
+
- one project state file: `.licell/project.json`
|
|
11
|
+
- one set of atomic resource commands: `fn` / `oss` / `dns` / `domain`
|
|
12
|
+
- one agent-facing surface: `--help` / `--output json` / `mcp` / `skills`
|
|
13
|
+
|
|
14
|
+
Default region is `cn-hangzhou`. For agent automation, it is strongly recommended to use a dedicated test account or isolated region instead of sharing a production environment directly.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What Licell Is
|
|
19
|
+
|
|
20
|
+
If you imagine a Vercel-like CLI experience for Alibaba Cloud, that is roughly what Licell aims to be:
|
|
21
|
+
|
|
22
|
+
- **Human-friendly**: `init -> deploy -> release -> rollback`
|
|
23
|
+
- **Agent-friendly**: self-describing commands, structured help, structured output, MCP, and skills
|
|
24
|
+
- **Architecture-friendly**: workflow commands produce outcomes, atomic commands expose precise resource control
|
|
25
|
+
|
|
26
|
+
Licell currently covers:
|
|
27
|
+
|
|
28
|
+
- FC API deployment and release
|
|
29
|
+
- OSS static site deployment
|
|
30
|
+
- custom domains, HTTPS, CDN, DNS
|
|
31
|
+
- ACR / Docker image deployment
|
|
32
|
+
- serverless database and cache helpers
|
|
33
|
+
- MCP / skills / JSON output / shared-doc generation for agent automation
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Core Design
|
|
38
|
+
|
|
39
|
+
### 1. Workflow-first
|
|
40
|
+
|
|
41
|
+
For most cases, start with outcome-oriented commands:
|
|
42
|
+
|
|
43
|
+
- `licell deploy --type api`
|
|
44
|
+
- `licell deploy --type static`
|
|
45
|
+
- `licell domain app bind`
|
|
46
|
+
- `licell domain static bind`
|
|
47
|
+
- `licell release promote`
|
|
48
|
+
- `licell release rollback`
|
|
49
|
+
|
|
50
|
+
These commands are designed to reduce manual orchestration.
|
|
51
|
+
|
|
52
|
+
### 2. Atomic commands underneath
|
|
53
|
+
|
|
54
|
+
When you need exact control, drop down to resource-level commands:
|
|
55
|
+
|
|
56
|
+
- `licell fn domain ...`
|
|
57
|
+
- `licell oss domain ...`
|
|
58
|
+
- `licell dns records ...`
|
|
59
|
+
- `licell oss ...`
|
|
60
|
+
- `licell fn ...`
|
|
61
|
+
|
|
62
|
+
These are better for:
|
|
63
|
+
|
|
64
|
+
- debugging
|
|
65
|
+
- custom automation
|
|
66
|
+
- agent plans that need precise, step-by-step control
|
|
67
|
+
|
|
68
|
+
### 3. One command registry, many surfaces
|
|
69
|
+
|
|
70
|
+
Licell's latest architecture treats commands as executable and self-describing.
|
|
71
|
+
|
|
72
|
+
The same shared command metadata drives:
|
|
73
|
+
|
|
74
|
+
- CLI `--help`
|
|
75
|
+
- structured help
|
|
76
|
+
- MCP tool catalog
|
|
77
|
+
- skills scaffolding
|
|
78
|
+
- generated README sections
|
|
79
|
+
- agent surface docs
|
|
80
|
+
- shell completion
|
|
81
|
+
|
|
82
|
+
That means command-surface changes can converge across help, MCP, skills, and docs instead of drifting apart.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Installation
|
|
87
|
+
|
|
88
|
+
### Recommended: install script
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
curl -fsSL https://github.com/agents-infrastructure/licell/releases/latest/download/install.sh | bash
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then run:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
licell
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Running bare `licell` is the quickest way to enter the first-run flow.
|
|
101
|
+
|
|
102
|
+
### Other installation sources
|
|
103
|
+
|
|
104
|
+
You can also use:
|
|
105
|
+
|
|
106
|
+
- npm installation, if you already manage CLI tools in a Node environment
|
|
107
|
+
- GitHub Release standalone artifacts, if you want pinned binary distribution
|
|
108
|
+
|
|
109
|
+
Upgrade behavior depends on how Licell was installed.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 3-Minute Quick Start
|
|
114
|
+
|
|
115
|
+
### For humans
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
licell login --region cn-hangzhou
|
|
119
|
+
licell init --runtime nodejs22
|
|
120
|
+
licell deploy --type api --target preview
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### For agents / automation
|
|
124
|
+
|
|
125
|
+
Recommended sequence:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
licell deploy spec nodejs22 --output json
|
|
129
|
+
licell deploy check --runtime nodejs22 --entry src/index.ts --output json
|
|
130
|
+
licell deploy --type api --runtime nodejs22 --entry src/index.ts --target preview --output json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This avoids “deployment succeeded but runtime contract is broken” style failures.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Configuration and State Model
|
|
138
|
+
|
|
139
|
+
Licell has three main state layers:
|
|
140
|
+
|
|
141
|
+
| Type | Default location | Purpose |
|
|
142
|
+
|------|------------------|---------|
|
|
143
|
+
| Global auth | `~/.licell-cli/auth.json` | Alibaba Cloud credentials and default region |
|
|
144
|
+
| Project state | `<project>/.licell/project.json` | app name, envs, network, deploy state |
|
|
145
|
+
| MCP project config | `<project>/.mcp.json` | MCP discovery for Claude / Codex / Cursor |
|
|
146
|
+
|
|
147
|
+
Compatibility notes:
|
|
148
|
+
|
|
149
|
+
- Licell still supports some legacy `~/.ali-cli/*` paths
|
|
150
|
+
- current canonical global path is `~/.licell-cli/*`
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Agent Interfaces
|
|
155
|
+
|
|
156
|
+
### 1. Structured help
|
|
157
|
+
|
|
158
|
+
Licell help is designed for both humans and agents.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
licell --help
|
|
162
|
+
licell domain app --help
|
|
163
|
+
licell deploy spec --help
|
|
164
|
+
licell domain app bind --help --output json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Recommended usage:
|
|
168
|
+
|
|
169
|
+
- humans: normal `--help`
|
|
170
|
+
- agents: `--help --output json`
|
|
171
|
+
|
|
172
|
+
### 2. Structured output with `--output json`
|
|
173
|
+
|
|
174
|
+
Almost every command except `licell mcp serve` supports structured JSON output:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
licell deploy --type api --output json
|
|
178
|
+
licell domain app bind api.example.com --output json
|
|
179
|
+
licell oss info my-bucket --output json
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Typical fields include:
|
|
183
|
+
|
|
184
|
+
- `stage`
|
|
185
|
+
- `type` (`event` / `result` / `error`)
|
|
186
|
+
- `error.code`
|
|
187
|
+
- `error.category`
|
|
188
|
+
- `retryable`
|
|
189
|
+
- `provider.requestId`
|
|
190
|
+
|
|
191
|
+
### 3. MCP
|
|
192
|
+
|
|
193
|
+
If you want Claude Code, Codex, Cursor, or other agents to call Licell directly as a tool, MCP is the most natural integration path.
|
|
194
|
+
|
|
195
|
+
#### Recommended: start with setup
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
licell setup
|
|
199
|
+
licell setup --agent codex --global
|
|
200
|
+
licell setup --agent claude --global
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### Initialize MCP in a project
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
licell mcp init
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Typical generated config:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"mcpServers": {
|
|
214
|
+
"licell": {
|
|
215
|
+
"command": "licell",
|
|
216
|
+
"args": ["mcp", "serve"]
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### Start the MCP server manually
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
licell mcp serve
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Note: `mcp serve` uses stdio JSON-RPC. Do **not** pass `--output json` there.
|
|
229
|
+
|
|
230
|
+
### 4. Skills
|
|
231
|
+
|
|
232
|
+
If you want the agent to have a richer task-oriented instruction surface inside the repo, generate skills:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
licell skills init codex
|
|
236
|
+
licell skills init claude
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Skills, MCP, help, and docs are meant to stay aligned through the shared command model.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Recommended Workflows
|
|
244
|
+
|
|
245
|
+
## FC API deployment
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
licell deploy spec nodejs22
|
|
249
|
+
licell deploy check --runtime nodejs22 --entry src/index.ts
|
|
250
|
+
licell deploy --type api --runtime nodejs22 --entry src/index.ts --target preview
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Common resource tuning:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
licell deploy --type api \
|
|
257
|
+
--runtime nodejs22 \
|
|
258
|
+
--entry src/index.ts \
|
|
259
|
+
--target preview \
|
|
260
|
+
--memory 1024 \
|
|
261
|
+
--vcpu 1 \
|
|
262
|
+
--timeout 60
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Common domain variants:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# auto-generate <appName>.<suffix>
|
|
269
|
+
licell deploy --type api --runtime nodejs22 --entry src/index.ts --domain-suffix your-domain.xyz --ssl
|
|
270
|
+
|
|
271
|
+
# full explicit domain
|
|
272
|
+
licell deploy --type api --runtime nodejs22 --entry src/index.ts --domain api.your-domain.xyz --ssl
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Recommended agent sequence:
|
|
276
|
+
|
|
277
|
+
1. `deploy spec`
|
|
278
|
+
2. `deploy check`
|
|
279
|
+
3. `deploy`
|
|
280
|
+
4. `release promote` / `rollback` when needed
|
|
281
|
+
|
|
282
|
+
## Static site deployment
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
licell deploy --type static --dist dist
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
When you provide a domain, Licell switches into the static-domain workflow:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
licell deploy --type static --dist dist --domain-suffix your-domain.xyz
|
|
292
|
+
# or
|
|
293
|
+
licell deploy --type static --dist dist --domain static.your-domain.xyz
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
That workflow may include:
|
|
297
|
+
|
|
298
|
+
- OSS upload
|
|
299
|
+
- CDN enablement
|
|
300
|
+
- DNS CNAME convergence
|
|
301
|
+
- HTTPS issuance and CDN edge cert configuration
|
|
302
|
+
|
|
303
|
+
## Release, rollback, environments
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
licell release list
|
|
307
|
+
licell release promote --from preview --to prod
|
|
308
|
+
licell rollback
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
If an agent manages both preview and production, it is safer to keep `release` as an explicit second step after deployment instead of letting every deploy mutate production immediately.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Understanding the Domain Model
|
|
316
|
+
|
|
317
|
+
This is the part that may look “a bit busy” at first glance, but the layering is intentional.
|
|
318
|
+
|
|
319
|
+
### Workflow layer: outcome-oriented
|
|
320
|
+
|
|
321
|
+
| Command | Best for | Purpose |
|
|
322
|
+
|---------|----------|---------|
|
|
323
|
+
| `licell domain app bind` | humans / agents | bind a domain to an FC app, optionally orchestrating DNS / SSL / CDN |
|
|
324
|
+
| `licell domain static bind` | humans / agents | bind a domain to a static site, optionally orchestrating CDN / DNS / SSL |
|
|
325
|
+
| `licell deploy --type static --domain ...` | humans / agents | get a working static domain outcome directly |
|
|
326
|
+
|
|
327
|
+
### Atomic layer: resource-oriented
|
|
328
|
+
|
|
329
|
+
| Command | Purpose |
|
|
330
|
+
|---------|---------|
|
|
331
|
+
| `licell fn domain ...` | manage FC custom domain bindings |
|
|
332
|
+
| `licell oss domain token/bind/unbind` | manage OSS native-domain verification and binding |
|
|
333
|
+
| `licell dns records ...` | manage DNS records precisely |
|
|
334
|
+
|
|
335
|
+
Rule of thumb:
|
|
336
|
+
|
|
337
|
+
- **want the outcome** -> start with `domain app/static` or `deploy`
|
|
338
|
+
- **want exact control** -> drop to `fn domain`, `oss domain`, `dns records`
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Examples and Tutorials
|
|
343
|
+
|
|
344
|
+
### Scenario guides
|
|
345
|
+
|
|
346
|
+
1. [5-minute first deployment](./docs/scenarios/01-quick-start.md)
|
|
347
|
+
2. [Agent-driven deployment](./docs/scenarios/02-ai-driven-deployment.md)
|
|
348
|
+
3. [Domains, HTTPS, and CDN](./docs/scenarios/03-domain-and-https.md)
|
|
349
|
+
4. [Database and cache workflows](./docs/scenarios/04-database-and-cache.md)
|
|
350
|
+
5. [Preview / production environment management](./docs/scenarios/05-environments-and-releases.md)
|
|
351
|
+
|
|
352
|
+
### Example projects
|
|
353
|
+
|
|
354
|
+
- `examples/node22-express-api`
|
|
355
|
+
- `examples/python313-flask-api`
|
|
356
|
+
- `examples/docker-bun-hono-api`
|
|
357
|
+
- `examples/static-oss-site`
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Testing, CI, and Real-Cloud Validation
|
|
362
|
+
|
|
363
|
+
Licell verification is split into three layers.
|
|
364
|
+
|
|
365
|
+
### 1. Default CI
|
|
366
|
+
|
|
367
|
+
GitHub Actions runs:
|
|
368
|
+
|
|
369
|
+
- `typecheck`
|
|
370
|
+
- generated-doc checks
|
|
371
|
+
- stable unit tests and integration-core tests
|
|
372
|
+
|
|
373
|
+
GitHub Actions does **not** run real cloud resource e2e by default, and does **not** run slow process-level CLI integration tests by default.
|
|
374
|
+
|
|
375
|
+
### 2. Local integration tests
|
|
376
|
+
|
|
377
|
+
For real CLI process behavior such as rendered help, flags, and structured output:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
bun run test:integration
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### 3. Real cloud verification
|
|
384
|
+
|
|
385
|
+
When you want a pre-release validation pass against real Alibaba Cloud resources:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
licell e2e run
|
|
389
|
+
licell e2e run --suite full
|
|
390
|
+
licell e2e list
|
|
391
|
+
licell e2e cleanup <runId>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Notes:
|
|
395
|
+
|
|
396
|
+
- `e2e run --suite full` covers a broader set of resource CRUD and workflow chains
|
|
397
|
+
- these checks are intentionally kept out of default GitHub Actions because they depend on real cloud accounts, domain control, certificate issuance, and external convergence timing
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Quick Command Map
|
|
402
|
+
|
|
403
|
+
Use `licell --help` for the current command surface.
|
|
404
|
+
|
|
405
|
+
High-value starting points:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
# identity and bootstrap
|
|
409
|
+
licell login
|
|
410
|
+
licell setup
|
|
411
|
+
licell mcp init
|
|
412
|
+
licell skills init codex
|
|
413
|
+
|
|
414
|
+
# deploy safety rails
|
|
415
|
+
licell deploy spec nodejs22
|
|
416
|
+
licell deploy check --runtime nodejs22 --entry src/index.ts
|
|
417
|
+
|
|
418
|
+
# deployment
|
|
419
|
+
licell deploy --type api --runtime nodejs22 --entry src/index.ts --target preview
|
|
420
|
+
licell deploy --type static --dist dist
|
|
421
|
+
|
|
422
|
+
# workflow domains
|
|
423
|
+
licell domain app bind api.example.com --target preview --ssl
|
|
424
|
+
licell domain static bind static.example.com --bucket my-bucket --ssl
|
|
425
|
+
|
|
426
|
+
# atomic resources
|
|
427
|
+
licell fn domain list
|
|
428
|
+
licell oss domain token my-bucket static.example.com
|
|
429
|
+
licell dns records list example.com
|
|
430
|
+
|
|
431
|
+
# release and cleanup
|
|
432
|
+
licell release list
|
|
433
|
+
licell release promote --from preview --to prod
|
|
434
|
+
licell e2e run --suite full --cleanup
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Related Docs
|
|
440
|
+
|
|
441
|
+
- Chinese README: `README.md`
|
|
442
|
+
- Agent surface reference: `docs/reference/agent-surfaces.md`
|
|
443
|
+
- Scenario guides: `docs/scenarios/`
|
|
444
|
+
- Example projects: `examples/`
|
|
445
|
+
|
|
446
|
+
The easiest way to understand modern Licell is to think of it as an **agent-first deployment runtime on top of Alibaba Cloud**:
|
|
447
|
+
|
|
448
|
+
- workflow-first
|
|
449
|
+
- atomic commands underneath
|
|
450
|
+
- self-describing command surface
|
|
451
|
+
- convergence across MCP, skills, help, and docs
|