@clipen/clipen-cli 1.0.10 → 1.1.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 CHANGED
@@ -7,7 +7,7 @@
7
7
  **Let AI do the cutting. You decide how it's cut.**
8
8
 
9
9
  Pick an editing template, hand over your footage, and Clipen edits the film with the Claude Code or Codex you already use.<br />
10
- Leave notes on the timeline as you watch, and the AI follows them. Nothing is uploaded; it all happens on your Mac.
10
+ Leave notes on the timeline as you watch, and the AI follows them. Speech recognition and video processing run on your Mac; AI editing uses your selected Claude Code or Codex service.
11
11
 
12
12
  **English** · [繁體中文](README.zh-TW.md)
13
13
 
@@ -23,11 +23,12 @@ Leave notes on the timeline as you watch, and the AI follows them. Nothing is up
23
23
 
24
24
  ```bash
25
25
  npx @clipen/clipen-cli # install
26
+ # Open a new Terminal after installation
26
27
  cd the-folder-for-your-projects
27
28
  clipen claude # or clipen codex
28
29
  ```
29
30
 
30
- The workbench opens in your browser: create a project, point it at your footage folder, pick a template and press Start.
31
+ After installation, open a new Terminal before running `clipen`. Keep the workbench’s Terminal running. In the browser, confirm your AI provider is connected, then create a project, point it at your footage folder, pick a template and press Start.
31
32
 
32
33
  ## Features
33
34
 
@@ -37,13 +38,11 @@ A template sets how the story is told, the pace, and the look of captions and gr
37
38
 
38
39
  <img src=".github/assets/templates.jpg" alt="The nine editing templates built into Clipen" />
39
40
 
40
- You can add templates others share or make your own. A template is just text and reference images, in the same format as Agent Skills; start from [`examples/skills`](examples/skills).
41
-
42
41
  ### 📝 Review notes
43
42
 
44
43
  Leave a note at any moment as you watch: Change, Remove, Keep, Play up, Place or Sound. A note can point at a whole shot or at one caption or graphic; send them and the AI works through each one and reports back.
45
44
 
46
- Only what needs your decision, or what Clipen truly cannot do, is left open, and it carries over to the next round.
45
+ Unresolved notes remain visible for the next round. Review the AI’s replies and results before accepting a revision.
47
46
 
48
47
  ### ✏️ Fix it yourself
49
48
 
@@ -51,24 +50,24 @@ For small things you don't want to wait for the AI on, change them directly and
51
50
 
52
51
  - **Captions**: change the words, mark the word to stress, change the delivery
53
52
  - **Graphics**: drag, stretch or move title cards and place labels to another track, or retype their text
54
- - **Made a mistake**: <kbd>⌘Z</kbd> undoes and <kbd>⇧⌘Z</kbd> redoes; every round of edits is kept as a version you can go back to
53
+ - **Made a mistake**: <kbd>⌘Z</kbd> undoes and <kbd>⇧⌘Z</kbd> redoes; version history lets you review and restore earlier saved results
55
54
 
56
- Thirteen Chinese and Japanese typefaces are included, and every graphic the AI makes shares one look; what you change by hand is kept the next time the AI edits.
55
+ Thirteen Chinese and Japanese typefaces are included, and every graphic the AI makes shares one look; review the details you changed by hand after each AI revision.
57
56
 
58
- ### 🔒 Stays on your computer
57
+ ### 🔒 Local processing and AI services
59
58
 
60
- - Speech recognition runs locally; transcripts and captions never leave your Mac
59
+ - Speech recognition and video processing run locally. AI editing can provide your brief, review notes, footage-related text (including transcript excerpts), and image snapshots to the selected AI tool. This content may be sent to its service under that provider’s data policies
61
60
  - The AI is called only after you confirm on screen, using Claude Code's or Codex's own sign-in and plan
62
- - Music comes from licensed sources and is credited automatically
63
- - Download the MP4 and post it
61
+ - Clipen records source and license information for selected music. Check the track’s terms for your intended use before publishing
62
+ - Export an MP4, review the result, and confirm you have permission to publish the footage and music
64
63
 
65
64
  ## Requirements
66
65
 
67
66
  - A Mac with Apple silicon (M series)
68
- - [Node.js](https://nodejs.org) 20.12 or later
67
+ - [Node.js](https://nodejs.org) 20.12 or later, running natively as `arm64`
69
68
  - [Claude Code](https://claude.com/claude-code) or the [Codex CLI](https://github.com/openai/codex), signed in
70
69
 
71
- It installs in one line, with nothing else to set up:
70
+ Once the prerequisites above are ready, run this in an interactive Terminal and follow the confirmation prompts:
72
71
 
73
72
  ```sh
74
73
  npx @clipen/clipen-cli
@@ -76,8 +75,8 @@ npx @clipen/clipen-cli
76
75
 
77
76
  - **Everything in one folder**: `~/Library/Application Support/Clipen` holds the runtime, the speech model (about 3 GB), the browser that draws the graphics, and ffmpeg, downloaded only when your Mac has none
78
77
  - **Leaves your other software alone**: it installs, upgrades or changes none of the tools you already have, and never needs sudo
79
- - **One line of setup**: it adds a PATH line to `~/.zshrc` so you can type `clipen`
80
- - **One line to remove**: `clipen uninstall` deletes all of the above, that line included; your projects, footage and exports are kept
78
+ - **Shell command setup**: it adds a managed PATH block to `~/.zshrc` (or `~/.bash_profile` for bash on macOS) so you can type `clipen`
79
+ - **One line to remove**: `clipen uninstall` deletes all of the above, the managed PATH block included; your projects, footage and exports are kept
81
80
 
82
81
  | Command | What it does |
83
82
  | --- | --- |
@@ -95,4 +94,6 @@ Projects live in a `.clipen` folder inside the folder you open; your footage sta
95
94
 
96
95
  ## License
97
96
 
98
- [MIT](LICENSE) © [GMAN](https://github.com/IMGMANISME). The bundled fonts are under the SIL Open Font License; see [`src/clipen/rendering/fonts`](src/clipen/rendering/fonts).
97
+ MIT © [GMAN](https://github.com/IMGMANISME)
98
+
99
+ The bundled fonts are under the SIL Open Font License; see [`src/clipen/rendering/fonts`](src/clipen/rendering/fonts).
package/README.zh-TW.md CHANGED
@@ -7,7 +7,7 @@
7
7
  **讓 AI 幫你剪,讓你決定怎麼剪。**
8
8
 
9
9
  選一個剪輯樣板、交出自己的素材,Clipen 用你已經在用的 Claude Code 或 Codex 剪出影片;<br />
10
- 看片時在時間線上留下注記,AI 就照著改。素材不上傳,全部在你的 Mac 上完成。
10
+ 看片時在時間線上留下注記,AI 就照著改。語音辨識與影片處理在 Mac 上執行;AI 剪輯使用你選擇的 Claude Code 或 Codex 服務。
11
11
 
12
12
  [English](README.md) · **繁體中文**
13
13
 
@@ -23,11 +23,12 @@
23
23
 
24
24
  ```bash
25
25
  npx @clipen/clipen-cli # 安裝
26
+ # 安裝完成後重新開啟 Terminal
26
27
  cd 要存放作品的資料夾
27
28
  clipen claude # 或 clipen codex
28
29
  ```
29
30
 
30
- 瀏覽器會打開工作台:建立作品、指定毛片資料夾、選一個樣板,按「開始製作」。
31
+ 安裝完成後先重新開啟 Terminal,再啟動工作台,並保持 Terminal 執行。瀏覽器開啟後確認 AI 已連接,再建立作品、指定毛片資料夾、選一個樣板,按「開始製作」。
31
32
 
32
33
  ## 功能
33
34
 
@@ -37,13 +38,11 @@ clipen claude # 或 clipen codex
37
38
 
38
39
  <img src=".github/assets/templates.jpg" alt="Clipen 內建的九種剪輯樣板" />
39
40
 
40
- 也可以加入別人分享或自己做的樣板。樣板只有文字和參考圖,格式和 Agent Skills 相同,可以從 [`examples/skills`](examples/skills) 開始改。
41
-
42
41
  ### 📝 審片注記
43
42
 
44
43
  邊看邊在時間點留注記:要修改、拿掉、這樣可以、加強爆點、地點補充、聲音。注記可以指向整個鏡頭,也可以指向某個字幕或元件,送出後 AI 會逐筆處理並回覆。
45
44
 
46
- 只有需要你決定、或 Clipen 確實做不到的事才會留下「未處理」,而且會帶到下一次修改。
45
+ 尚未解決的注記會保留到下一輪。接受修改前,請確認 AI 的回覆與實際成果。
47
46
 
48
47
  ### ✏️ 自己動手改
49
48
 
@@ -51,24 +50,24 @@ clipen claude # 或 clipen codex
51
50
 
52
51
  - **字幕**:改字、標出要強調的字、換語氣
53
52
  - **元件**:字卡、地點標示等直接拖曳、拉長、疊到另一軌,或改上面的字
54
- - **改錯了**:<kbd>⌘Z</kbd> 回上一步、<kbd>⇧⌘Z</kbd> 重做;每次製作與修改都留下版本,可以回到任何一版
53
+ - **改錯了**:<kbd>⌘Z</kbd> 回上一步、<kbd>⇧⌘Z</kbd> 重做;透過版本紀錄檢視與還原先前已儲存的成果
55
54
 
56
- 內附 13 套中日文字型,AI 做的每個元件都套用同一組外觀;你手動改過的地方,AI 下次修改會保留。
55
+ 內附 13 套中日文字型,AI 做的每個元件都套用同一組外觀;每次 AI 修改後,請確認先前手動調整的細節。
57
56
 
58
- ### 🔒 留在你的電腦上
57
+ ### 🔒 本機處理與 AI 服務
59
58
 
60
- - 語音辨識在本機執行,逐字稿與字幕不離開你的 Mac
59
+ - 語音辨識與影片處理在本機執行。AI 剪輯可能將需求、審片注記、素材相關文字(包含逐字稿片段)與畫面快照交給所選 AI 工具;這些內容可能傳送至該服務,適用其資料政策
61
60
  - 只有你在畫面上確認後才呼叫 AI,用的是 Claude Code 或 Codex 自己的登入與額度
62
- - 配樂從有授權的來源挑選,出處會自動標註
63
- - 下載 MP4,直接發佈
61
+ - Clipen 記錄所選配樂的來源與授權資訊;發佈前仍應確認該曲目的條款適用於你的用途
62
+ - 匯出 MP4,檢查成果,並確認有權發佈所使用的素材與音樂
64
63
 
65
64
  ## 安裝需求
66
65
 
67
66
  - Apple 晶片(M 系列)的 Mac
68
- - [Node.js](https://nodejs.org) 20.12 以上
67
+ - [Node.js](https://nodejs.org) 20.12 以上,以原生 `arm64` 執行
69
68
  - 已登入的 [Claude Code](https://claude.com/claude-code) 或 [Codex CLI](https://github.com/openai/codex)
70
69
 
71
- 安裝只要一行,過程中不需要另外安裝任何東西:
70
+ 備妥上述必要環境後,在互動式 Terminal 執行下列指令,並依提示確認安裝:
72
71
 
73
72
  ```sh
74
73
  npx @clipen/clipen-cli
@@ -76,8 +75,8 @@ npx @clipen/clipen-cli
76
75
 
77
76
  - **全部放在一個資料夾**:`~/Library/Application Support/Clipen`,包括執行環境、語音辨識模型(約 3 GB)、繪製畫面用的瀏覽器,以及 Mac 上沒有時才下載的 ffmpeg
78
77
  - **不動你電腦上的其他程式**:不安裝、不升級、不修改你已經有的任何工具,也不需要 sudo
79
- - **只改一行設定**:在 `~/.zshrc` 加一行 PATH,讓你能直接輸入 `clipen`
80
- - **一行移除**:`clipen uninstall` 會刪掉上面這些,連同那一行設定;作品、毛片與匯出檔會保留
78
+ - **指令路徑設定**:在 `~/.zshrc`(macOS bash 則為 `~/.bash_profile`)加入管理的 PATH 區塊,讓你能直接輸入 `clipen`
79
+ - **一行移除**:`clipen uninstall` 會刪掉上面這些,連同管理的 PATH 設定區塊;作品、毛片與匯出檔會保留
81
80
 
82
81
  | 指令 | 做什麼 |
83
82
  | --- | --- |
@@ -95,4 +94,6 @@ npx @clipen/clipen-cli
95
94
 
96
95
  ## 授權
97
96
 
98
- [MIT](LICENSE) © [GMAN](https://github.com/IMGMANISME)。內附字型採用 SIL Open Font License,見 [`src/clipen/rendering/fonts`](src/clipen/rendering/fonts)。
97
+ MIT © [GMAN](https://github.com/IMGMANISME)
98
+
99
+ 內附字型採用 SIL Open Font License,見 [`src/clipen/rendering/fonts`](src/clipen/rendering/fonts)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipen/clipen-cli",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "description": "Let AI edit your videos with Claude Code or Codex, then revise them with review notes on the timeline",
5
5
  "keywords": [
6
6
  "video-editing",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "clipen"
7
- version = "1.0.10"
7
+ version = "1.1.0"
8
8
  description = "Let AI cut your video with Claude Code or Codex, and review it with notes on the timeline"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,3 +1,3 @@
1
1
  """Clipen product package."""
2
2
 
3
- __version__ = "1.0.10"
3
+ __version__ = "1.1.0"
package/src/clipen/cli.py CHANGED
@@ -17,6 +17,7 @@ from clipen.workspace import (
17
17
  WorkspaceError,
18
18
  inspect_workspace_projects,
19
19
  prepare_workspace,
20
+ remember_workspace,
20
21
  )
21
22
 
22
23
 
@@ -64,6 +65,8 @@ def _main(arguments: Sequence[str] | None) -> int:
64
65
  terminal.intro(f"Clipen {__version__}")
65
66
  with terminal.spinner(tr("正在啟動 Clipen", "Starting Clipen")) as spinner:
66
67
  inspection = inspect_workspace_projects(workspace)
68
+ instance_root = data_root / "workspace-instances" / workspace.workspace_id
69
+ remember_workspace(instance_root, workspace)
67
70
  attempt_root = data_root / "provider-attempts"
68
71
  attempt_root.mkdir(mode=0o700, parents=True, exist_ok=True)
69
72
  spinner.update(tr(f"正在連接 {descriptor.display_name}", f"Connecting to {descriptor.display_name}"))
@@ -83,7 +86,7 @@ def _main(arguments: Sequence[str] | None) -> int:
83
86
  static_root=repo_root / "apps" / "web" / "dist",
84
87
  attempt_root=attempt_root,
85
88
  projects_root=workspace.projects_root,
86
- instance_root=data_root / "workspace-instances" / workspace.workspace_id,
89
+ instance_root=instance_root,
87
90
  asr_requirements=repo_root / "requirements" / "asr-runtime.txt",
88
91
  ),
89
92
  provider,
@@ -155,6 +155,27 @@ def prepare_workspace(current_directory: Path) -> WorkspacePaths:
155
155
  )
156
156
 
157
157
 
158
+ def remember_workspace(instance_root: Path, workspace: WorkspacePaths) -> None:
159
+ """Note where this workspace lives, so a later Clipen can list the workspaces it has opened.
160
+
161
+ Best effort: the record only helps find workspaces again, so failing to write it never stops Clipen."""
162
+ try:
163
+ instance_root.mkdir(mode=0o700, parents=True, exist_ok=True)
164
+ if instance_root.is_symlink() or not instance_root.is_dir():
165
+ return
166
+ _atomic_json(
167
+ instance_root / "workspace.json",
168
+ {
169
+ "schema": _WORKSPACE_SCHEMA,
170
+ "workspace_id": workspace.workspace_id,
171
+ "path": str(workspace.root),
172
+ "last_opened_at": _utc_now(),
173
+ },
174
+ )
175
+ except OSError:
176
+ pass
177
+
178
+
158
179
  def _read_project(database: Path) -> tuple:
159
180
  """The integrity check, schema version and project id, read without changing the project.
160
181