jimeng-cli 0.2.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.md ADDED
@@ -0,0 +1,91 @@
1
+ # jimeng-cli
2
+
3
+ [![npm version](https://img.shields.io/npm/v/jimeng-cli.svg)](https://www.npmjs.com/package/jimeng-cli)
4
+
5
+ 即梦/CapCut 图像与视频生成工具集,提供 CLI 与 MCP Server(stdio)。
6
+
7
+ ## 要求
8
+
9
+ - Node.js 18+
10
+ - npm
11
+
12
+ ## 快速开始
13
+
14
+ ```bash
15
+ npm install
16
+ npm run build
17
+ node dist/cli/index.js models list --json
18
+ ```
19
+
20
+ ## 配置
21
+
22
+ ### Token Pool(推荐)
23
+
24
+ 默认文件:`configs/token-pool.json`(可通过 `TOKEN_POOL_FILE` 覆盖)
25
+
26
+ ```bash
27
+ cp configs/token-pool.example.json configs/token-pool.json
28
+ ```
29
+
30
+ 可用环境变量:
31
+
32
+ - `TOKEN_POOL_ENABLED`
33
+ - `TOKEN_POOL_FILE`
34
+ - `TOKEN_POOL_HEALTHCHECK_INTERVAL_MS`
35
+ - `TOKEN_POOL_FETCH_CREDIT`
36
+ - `TOKEN_POOL_AUTO_DISABLE`
37
+ - `TOKEN_POOL_AUTO_DISABLE_FAILURES`
38
+ - `TOKEN_POOL_STRATEGY`:`random` 或 `round_robin`
39
+
40
+ ## CLI
41
+
42
+ 查看帮助:
43
+
44
+ ```bash
45
+ node dist/cli/index.js --help
46
+ ```
47
+
48
+ 常用示例:
49
+
50
+ ```bash
51
+ node dist/cli/index.js models list --region us --json
52
+ node dist/cli/index.js image generate --prompt "a red fox in snow" --wait
53
+ node dist/cli/index.js image edit --prompt "blend into poster" --image https://example.com/a.jpg --image https://example.com/b.jpg
54
+ node dist/cli/index.js video generate --prompt "ocean wave at sunset" --wait
55
+ node dist/cli/index.js task wait --task-id <task_id> --type video --json
56
+ ```
57
+
58
+ ## MCP Server
59
+
60
+ `jimeng-mcp` 通过 stdio 启动,供 MCP Client(如 Codex / Claude Desktop)接入。
61
+
62
+ 环境变量:
63
+
64
+ - `JIMENG_API_TOKEN`(可选)
65
+ - `MCP_HTTP_TIMEOUT_MS`(默认 `120000`)
66
+ - `MCP_ENABLE_ADVANCED_TOOLS`(默认 `true`)
67
+ - `MCP_REQUIRE_RUN_CONFIRM`(默认 `true`)
68
+
69
+ 启动:
70
+
71
+ ```bash
72
+ npm run build
73
+ node dist/mcp/index.js
74
+ ```
75
+
76
+ ## 开发
77
+
78
+ ```bash
79
+ npm run dev
80
+ ```
81
+
82
+ 其他脚本:
83
+
84
+ - `npm run type-check`
85
+ - `npm run mcp:dev`
86
+ - `npm run mcp:smoke`
87
+ - `npm run cli:smoke`
88
+
89
+ ## 许可证
90
+
91
+ GPL-3.0