@yandy0725/mediagen-cli 0.3.0 → 0.3.1

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 CHANGED
@@ -254,11 +254,21 @@ download and 600 s per video download. For video that budget is the *whole* poll
254
254
  window, not one request: each create or poll gets 60 s, so a hung request cannot eat
255
255
  the budget, and the download has its own 600 s and is not counted against it.
256
256
 
257
- Working from an agent? `mediagen skill install --dir <skills dir>` puts
258
- `skills/mediagen/SKILL.md` where your agent already looks — e.g. `--dir ~/.claude/skills` — and
259
- re-running it after an upgrade replaces the old copy. The skill describes what this CLI does,
260
- which tool to prefer when the project already generates media another way, and the rules that
261
- keep a paid request from being wasted.
257
+ Working from an agent? Inside pi, install the skill as a pi package:
258
+
259
+ ```bash
260
+ pi install npm:@yandy0725/mediagen-cli
261
+ ```
262
+
263
+ That delivers `skills/mediagen/SKILL.md` only: pi never puts the `mediagen` command on
264
+ `PATH`, so the CLI still comes from `npm install -g @yandy0725/mediagen-cli`. For any other
265
+ agent, `mediagen skill install --dir <skills dir>` puts the same file where that agent
266
+ already looks — e.g. `--dir ~/.claude/skills` — and re-running it after an upgrade replaces
267
+ the old copy. Use one route, not both: pi loads skills by name, so the two copies collide — the
268
+ directory you copied wins and pi only reports a `name "mediagen" collision` warning, which
269
+ means a stale copy silently shadows the upgraded package. The skill describes what this CLI
270
+ does, which tool to prefer when the project already generates media another way, and the
271
+ rules that keep a paid request from being wasted.
262
272
 
263
273
  ---
264
274
 
package/README.zh-CN.md CHANGED
@@ -229,10 +229,18 @@ OpenAI 兼容端点(`compatible-mode`)只在业务空间专属域名上提
229
229
  `timeout_seconds` 是**整个轮询窗口**,不是单次请求:建任务与每次轮询各自 60 秒,这样一个挂住
230
230
  的请求吃不掉预算;下载另有 600 秒,不计入预算。
231
231
 
232
- 在 Agent 里用?`mediagen skill install --dir <技能目录>` 会把这个包自带的
233
- `skills/mediagen/SKILL.md` 装到你 agent 已经在读的位置(例如 `--dir ~/.claude/skills`),升级后
234
- 重跑一次即可覆盖旧版本。这份技能说明这个 CLI 能做什么、项目已有别的生成工具时该用哪个,
235
- 以及哪些规则能避免白花钱。
232
+ 在 Agent 里用?在 pi 里,把这份技能当成 pi 包安装:
233
+
234
+ ```bash
235
+ pi install npm:@yandy0725/mediagen-cli
236
+ ```
237
+
238
+ 它只送 `skills/mediagen/SKILL.md`:pi 不会把 `mediagen` 命令放进 `PATH`,命令仍来自
239
+ `npm install -g @yandy0725/mediagen-cli`。其他 agent 用 `mediagen skill install --dir <技能目录>`
240
+ 把同一个文件装到它已经在读的位置(例如 `--dir ~/.claude/skills`),升级后重跑一次即可覆盖。
241
+ 两条路线只选一条:pi 按技能名加载,两份同名技能会冲突——复制出来的那份胜出,pi 只给一条
242
+ name "mediagen" collision 警告,于是旧副本会静默盖住升级后的包。这份技能说明这个 CLI
243
+ 能做什么、项目已有别的生成工具时该用哪个,以及哪些规则能避免白花钱。
236
244
 
237
245
  ---
238
246
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yandy0725/mediagen-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Non-interactive image generation and editing, plus short video generation, for agents: qwen-image, doubao/seedream, doubao/seedance, MiniMax H3, files on disk, JSON output.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,7 +11,13 @@
11
11
  "dist",
12
12
  "skills"
13
13
  ],
14
+ "pi": {
15
+ "skills": [
16
+ "./skills"
17
+ ]
18
+ },
14
19
  "keywords": [
20
+ "pi-package",
15
21
  "cli",
16
22
  "image",
17
23
  "image-generation",
@@ -42,6 +42,15 @@ project has, or when the user asks for it by name.
42
42
 
43
43
  ## Setup, once
44
44
 
45
+ This skill carries no binary: `mediagen` must already be on `PATH`, and the pi package that
46
+ delivered this skill does not put it there. If `command -v mediagen` prints nothing:
47
+
48
+ ```bash
49
+ npm install -g @yandy0725/mediagen-cli
50
+ ```
51
+
52
+ Then one pass per machine:
53
+
45
54
  ```bash
46
55
  mediagen config show # any command writes and validates config.toml on first use
47
56
  mediagen login --api-key sk-... # the key for the default provider; --provider <name> for another