cline-kit 0.1.0 → 0.1.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to this project are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); dictionary data changes are versioned inside
5
5
  each `dictionaries/<locale>.json` rather than here.
6
6
 
7
+ ## [0.1.2] - 2026-09-21
8
+
9
+ ### Added
10
+
11
+ - `ckit locales` — lists the interface languages that ship with the kit (code, native name, string
12
+ count, dictionary version, `*` on the active one) and `ckit locales <code>` switches to one. Language
13
+ choice used to be reachable only through `ckit config --dictionary=<code>`, which no one finds without
14
+ reading the middle of the README; the old flag still works and writes the same field.
15
+ - `ckit install` prints the current language and the switch command every time, and the first successful
16
+ `ckit start` says it once (`hintLanguageShown` in `%APPDATA%\cline-kit\config.json`).
17
+ - `scripts/cli-locale-switch-check.js` — drives the CLI as a subprocess and probes the live DOM, so the
18
+ check covers the command a user types rather than the internal config write.
19
+
20
+ ### Changed
21
+
22
+ - `npm test` is 25 checks: the new one asserts every bundled locale appears in `ckit locales`, that
23
+ `--help` documents each command, and that an unknown code fails instead of storing a broken language.
24
+
25
+ ## [0.1.1] - 2026-09-20
26
+
27
+ ### Changed
28
+
29
+ - First npm publication is live: `cline-kit@0.1.0` was bootstrapped with a one-time granular token
30
+ that was deleted immediately afterwards, and the package now carries an **OIDC trusted publisher**
31
+ (`chentaoxing / Cline-kit / release.yml`). Every later version is published by the release
32
+ workflow itself - no npm token or repository secret exists or is needed.
33
+ - `publishConfig` pins `registry.npmjs.org` so a contributor whose `.npmrc` points at a mirror cannot
34
+ publish to the wrong place.
35
+
7
36
  ## [0.1.0] - 2026-09-20
8
37
 
9
38
  First public release. Windows only.
@@ -49,8 +78,8 @@ First public release. Windows only.
49
78
  - `ckit audit` — walks the screens over CDP, filters hidden-but-mounted panels by hit-testing each node,
50
79
  and reports only strings the dictionary does not cover.
51
80
  - `ckit.cmd` so a release-zip download has an entry point without a global install.
52
- - CI: `npm test` plus a CLI smoke pass on tag, a portable Windows zip artifact, and npm publish gated on
53
- an `NPM_TOKEN` secret.
81
+ - CI: `npm test` plus a CLI smoke pass on tag, a portable Windows zip artifact, and `npm publish` through
82
+ npm's OIDC trusted publishing - the repository holds no npm credential.
54
83
 
55
84
  ### Changed
56
85
 
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 chentaoxing
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 chentaoxing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -13,9 +13,9 @@ Every project you registered but have not opened yet is simply invisible. `cline
13
13
  them listed, with the same styling as the native groups, and lets you switch into an empty project
14
14
  straight from the sidebar.
15
15
 
16
- **Secondary feature:** UI locale packs (简体中文 today; 繁體中文 / 日本語 / 한국어 / Tiếng Việt use the
17
- same format). Locales exist because the same injection channel can carry them — they are not what the
18
- project is for.
16
+ **Secondary feature:** UI locale packs five ship: 简体中文 (reference, proofread), plus 繁體中文 /
17
+ 日本語 / 한국어 / Tiếng Việt. Locales exist because the same injection channel can carry them — they
18
+ are not what the project is for.
19
19
 
20
20
  ## The sidebar problem
21
21
 
@@ -57,7 +57,7 @@ or both.
57
57
 
58
58
  Three routes, same tool. All of them need Node.js on `PATH`; none of them touch `cline-app.exe`.
59
59
 
60
- **1. npm (recommended, once the package is published)**
60
+ **1. npm (recommended)**
61
61
 
62
62
  ```bash
63
63
  npm install -g cline-kit
@@ -81,13 +81,14 @@ ckit.cmd start
81
81
  git clone https://github.com/chentaoxing/Cline-kit.git
82
82
  cd cline-kit
83
83
  npm install -g . # or call it directly: node src/cli.js <command>
84
- npm test # 22 checks, no dependencies
84
+ npm test # 25 checks, no dependencies
85
85
  ```
86
86
 
87
87
  Then in every case:
88
88
 
89
89
  ```bash
90
90
  ckit doctor # confirms the overlay is live inside the running window
91
+ ckit locales # optional: list / switch the interface language
91
92
  ```
92
93
 
93
94
  `ckit install` locates the Cline shortcut in the Start Menu / Desktop, saves its original target in
@@ -106,11 +107,27 @@ then gives you the enhanced sidebar. If you would rather keep your own launcher,
106
107
  | `ckit attach` | Inject once into a Cline you started yourself (`--port=N`), without owning the shortcut |
107
108
  | `ckit features` | List feature plugins and whether each is on |
108
109
  | `ckit feature enable\|disable <id>` | Toggle a feature (applies within ~4 s, no restart) |
110
+ | `ckit locales` | List the bundled interface languages |
111
+ | `ckit locales <code>` | Switch language — e.g. `ckit locales ja` (applies within ~4 s, no restart) |
109
112
  | `ckit install` / `uninstall` | Repoint / restore your Cline shortcut |
110
113
  | `ckit update` | Pull the latest locale dictionary from GitHub (`--force` to check now) |
111
114
  | `ckit audit` | Walk the UI and list strings still in English |
112
115
  | `ckit dict` | Dictionary statistics and the local override path |
113
- | `ckit config` | Inspect or set `--cline-path`, `--port`, `--auto-update=on\|off` |
116
+ | `ckit config` | Inspect or set `--cline-path`, `--port`, `--auto-update=on\|off`, `--dictionary=<code>` |
117
+
118
+ ### Choosing a language
119
+
120
+ Language is a per-install choice, and Cline has no language setting of its own, so the kit exposes it:
121
+
122
+ ```bash
123
+ ckit locales # what ships, how many strings each covers, which one is active
124
+ ckit locales ja # switch; the open window changes within ~4 s, no restart
125
+ ckit locales zh-CN # back to the reference dictionary
126
+ ```
127
+
128
+ `ckit install` prints the current language and this command, and the first `ckit start` says it once.
129
+ `ckit config --dictionary=<code>` is the same write if you prefer the generic config command. Once a
130
+ non-default locale is selected, `ckit update` hot-updates *that* dictionary.
114
131
 
115
132
  ## Features
116
133
 
@@ -128,9 +145,9 @@ then gives you the enhanced sidebar. If you would rather keep your own launcher,
128
145
  30 pattern rules, built by combining a UI walk with extraction from the app's own source. Five
129
146
  dictionaries ship: **zh-CN** (reference, proofread against the running app), **zh-TW**, **ja**,
130
147
  **ko**, **vi** - complete but machine-assisted and *not* reviewed by native speakers, so a pull
131
- request fixing a term is genuinely welcome. Switch with `ckit config --dictionary=ja`; the change
132
- applies to the open window without a reload, and `ckit update` follows the locale you picked.
133
- Authoring guide: [`docs/dictionary-pipeline.zh-CN.md`](docs/dictionary-pipeline.zh-CN.md).
148
+ request fixing a term is genuinely welcome. Pick one with `ckit locales` see
149
+ [Choosing a language](#choosing-a-language). Authoring guide:
150
+ [`docs/dictionary-pipeline.zh-CN.md`](docs/dictionary-pipeline.zh-CN.md).
134
151
 
135
152
  ## Limitations
136
153
 
@@ -143,6 +160,9 @@ then gives you the enhanced sidebar. If you would rather keep your own launcher,
143
160
  repointed) has no debug port to attach to, so you get plain Cline.
144
161
  * **Cline updates can break things.** If the app renames a label, the locale leaves it in English; if
145
162
  it restructures the sidebar, `sidebar-groups` needs updating. Run `ckit audit` and open an issue.
163
+ * **The language switch is in the kit, not in Cline.** Cline has no language setting, so there is no
164
+ gear icon to find it under: `ckit locales` is the picker (and `ckit install` / the first `ckit start`
165
+ point at it).
146
166
  * **Per-model description blurbs stay English** — free-form text from a remote provider catalogue.
147
167
  * **Same-named projects.** Cline's own group headers expose only the folder name, never the path, so if
148
168
  the registry holds two different `LLM` folders and one already has a native group, the kit cannot tell
package/README.zh-CN.md CHANGED
@@ -10,8 +10,8 @@
10
10
  在界面上根本不存在。cline-kit 把所有已登记项目常驻列出,样式与原生分组一致,并且可以直接从侧边栏
11
11
  切进一个还没有会话的项目。
12
12
 
13
- **附属功能:** 界面语言包(目前简体中文;繁體中文 / 日本語 / 한국어 / Tiếng Việt 用同一套格式)。
14
- 语言包之所以在这里,是因为同一条注入通道顺带能承载它——它不是这个项目存在的理由。
13
+ **附属功能:** 界面语言包,随包 5 份:**zh-CN**(基准,逐条对着界面校过)、繁體中文 / 日本語 /
14
+ 한국어 / Tiếng Việt。语言包之所以在这里,是因为同一条注入通道顺带能承载它——它不是这个项目存在的理由。
15
15
 
16
16
  ## 要解决的问题
17
17
 
@@ -52,7 +52,7 @@ ckit start
52
52
 
53
53
  三条路都是同一个工具,都要求 `PATH` 里有 Node.js,都不碰 `cline-app.exe`。
54
54
 
55
- **1. npm(推荐,发布后适用)**
55
+ **1. npm(推荐)**
56
56
 
57
57
  ```bash
58
58
  npm install -g cline-kit
@@ -73,13 +73,14 @@ ckit.cmd start
73
73
  git clone https://github.com/chentaoxing/Cline-kit.git
74
74
  cd cline-kit
75
75
  npm install -g . # 或直接用:node src/cli.js <命令>
76
- npm test # 22 项无依赖自检
76
+ npm test # 25 项无依赖自检
77
77
  ```
78
78
 
79
79
  装完统一确认一次:
80
80
 
81
81
  ```bash
82
82
  ckit doctor # 直接问运行中的窗口:增强层到底进没进去
83
+ ckit locales # 可选:看有哪些语言、换语言
83
84
  ```
84
85
 
85
86
  `ckit install` 会在开始菜单 / 桌面找到 Cline 快捷方式,把原始目标备份进 `%APPDATA%\cline-kit\config.json`,
@@ -97,12 +98,27 @@ ckit doctor # 直接问运行中的窗口:增强层到底进没进
97
98
  | `ckit attach` | 往你自己启动、已开调试端口的 Cline 注入一次(`--port=N`),不接管快捷方式 |
98
99
  | `ckit features` | 列出功能插件与开关状态 |
99
100
  | `ckit feature enable\|disable <id>` | 开关某个插件(约 4 秒生效,无需重启) |
101
+ | `ckit locales` | 列出随包发行的界面语言、字符串数与当前语言 |
102
+ | `ckit locales <语言>` | 切换语言,如 `ckit locales ja`(约 4 秒生效,无需重启) |
100
103
  | `ckit install` / `uninstall` | 改写 / 还原 Cline 快捷方式 |
101
104
  | `ckit update` | 从 GitHub 拉取最新语言词典(`--force` 立即检查) |
102
105
  | `ckit audit` | 走查界面,列出仍是英文的字符串 |
103
106
  | `ckit dict` | 词典统计与本地覆盖文件路径 |
104
107
  | `ckit config` | 查看或设置 `--cline-path`、`--port`、`--auto-update=on\|off`、`--dictionary=<语言>`、`--hide=<路径>` |
105
108
 
109
+ ### 选择语言
110
+
111
+ Cline 自己没有语言设置,所以选择权在工具这一侧:
112
+
113
+ ```bash
114
+ ckit locales # 看有哪些语言、各覆盖多少条、当前用的是哪一个(* 号标记)
115
+ ckit locales ja # 切换;正在打开的窗口约 4 秒内跟着变,不用重启
116
+ ckit locales zh-CN # 换回基准词典
117
+ ```
118
+
119
+ `ckit install` 每次都会打印当前语言和这条命令,第一次 `ckit start` 成功后也会提示一次。
120
+ `ckit config --dictionary=<语言>` 是等价的写法。选定非默认语言后,`ckit update` 热更新的就是那一份。
121
+
106
122
  ## 功能
107
123
 
108
124
  `ckit features` 看实时列表。
@@ -116,8 +132,8 @@ ckit doctor # 直接问运行中的窗口:增强层到底进没进
116
132
  工具标识和代码。语料为 476 条词条 + 30 条规则,来源是「界面走查 + 从应用自身源码提取」两路合并。
117
133
  现在随包附带 5 份词典:**zh-CN**(基准,逐条对着运行中的界面校对过)、**zh-TW**、**ja**、**ko**、
118
134
  **vi** —— 后四份条目齐全但属于机器辅助翻译、未经母语者审校,术语有偏差欢迎提 PR 直接改。
119
- 切换:`ckit config --dictionary=ja`,正在打开的窗口**不需要重启或刷新**就会跟着变;
120
- `ckit update` 也只更新你选的那一份。制作流程见
135
+ 切换:`ckit locales`(列出并切换)或 `ckit locales ja`,正在打开的窗口**不需要重启或刷新**就会跟着变;
136
+ `ckit update` 也只更新你选的那一份。详见[选择语言](#选择语言)。制作流程见
121
137
  [`docs/dictionary-pipeline.zh-CN.md`](docs/dictionary-pipeline.zh-CN.md)。
122
138
 
123
139
  ## 已知限制
@@ -129,6 +145,8 @@ ckit doctor # 直接问运行中的窗口:增强层到底进没进
129
145
  得到的是原版界面。
130
146
  * **Cline 升级可能失效。** 文案改了,语言包会留英文;侧边栏结构改了,`sidebar-groups` 需要跟进。
131
147
  跑一次 `ckit audit` 并开 issue。
148
+ * **语言开关在工具这一侧,不在 Cline 里。** Cline 没有语言设置,所以界面里找不到那个齿轮:
149
+ `ckit locales` 就是选择器(`ckit install` 和第一次 `ckit start` 都会提示它)。
132
150
  * **模型下方的一句英文简介不覆盖**——来自云端目录的自由文本,条数随服务商变化。
133
151
  * **同名项目。** Cline 自己的分组标题只有文件夹名、没有路径,所以登记表里出现两个不同盘符下的 `LLM`
134
152
  且其中一个已有原生分组时,无法判断哪一个才是它。此时两行都列出(带上级目录区分),并且不在这种行里
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cline-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Desktop enhancement kit for the Cline desktop app (Windows): keeps every registered project visible in the sidebar, and adds optional UI locale packs (zh-CN, zh-TW, ja, ko, vi). Runtime overlay - no binary patching.",
5
5
  "keywords": [
6
6
  "cline",
package/src/cli.js CHANGED
@@ -2,8 +2,9 @@
2
2
  "use strict";
3
3
  // Cline-kit - desktop enhancement kit for the Cline desktop app.
4
4
  // Flagship feature: keep every registered project visible in the sidebar.
5
- // Optional: UI locale packs (zh-CN today; zh-TW / ja / ko / vi follow the same data format).
5
+ // Optional: UI locale packs (zh-CN reference; zh-TW / ja / ko / vi ship the same key set).
6
6
  const cfg = require("./config");
7
+ const fs = require("fs");
7
8
 
8
9
  function guard() {
9
10
  if (typeof WebSocket !== "function") {
@@ -26,6 +27,7 @@ Usage: ckit <command> [options]
26
27
  uninstall Restore the original shortcuts
27
28
  features List feature plugins and whether each is on
28
29
  feature Toggle a plugin: ckit feature enable|disable <id>
30
+ locales List the UI languages that ship with the kit, and switch between them
29
31
  update Fetch the latest locale dictionary from GitHub (skipped when offline)
30
32
  audit Walk the UI and list strings still without a translation
31
33
  dict Dictionary stats and the local override file path
@@ -40,13 +42,16 @@ Main feature
40
42
  Optional feature
41
43
  locale packs dictionaries/<locale>.json - whole-string replacement only, so provider names,
42
44
  model names and code cannot be mangled. Bundled: zh-CN (reference, 476 entries),
43
- zh-TW, ja, ko, vi. Choose one: ckit config --dictionary=ja (ckit update then
44
- follows that locale). Only zh-CN is proofread against the running app.
45
+ zh-TW, ja, ko, vi. Pick one with 'ckit locales' (lists + switches); the older
46
+ 'ckit config --dictionary=ja' does the same. 'ckit update' then follows that
47
+ locale. Only zh-CN is proofread against the running app.
45
48
 
46
49
  Examples:
47
50
  ckit start
48
51
  ckit install
49
52
  ckit features
53
+ ckit locales
54
+ ckit locales ja
50
55
  ckit feature disable sidebar-groups
51
56
  ckit config --cline-path "D:\\Programs\\Cline\\cline-app.exe"
52
57
  `;
@@ -62,6 +67,22 @@ function parseFlags(argv) {
62
67
  return { flags, rest };
63
68
  }
64
69
 
70
+ // Language choice is a per-install decision, so say where to change it once per
71
+ // setup path instead of hiding it in the README. Returns nothing; prints itself.
72
+ function languageTip(conf, showOnce) {
73
+ if (showOnce) {
74
+ if (conf.hintLanguageShown) return;
75
+ conf.hintLanguageShown = true;
76
+ cfg.write(conf);
77
+ }
78
+ const dict = require("./dict");
79
+ let codes = [];
80
+ try { codes = dict.available(); } catch (e) { codes = []; }
81
+ const current = conf.dictionary || "zh-CN";
82
+ console.log(`Interface language: ${current} (bundled: ${codes.join(", ") || current})`);
83
+ console.log(" list / switch with: ckit locales e.g. ckit locales ja");
84
+ }
85
+
65
86
  async function main() {
66
87
  guard();
67
88
  const argv = process.argv.slice(2);
@@ -80,6 +101,7 @@ async function main() {
80
101
  console.log(out.debugPortAlive
81
102
  ? `Cline is up (port ${out.port}, path from ${out.source}) and the overlay is loaded.`
82
103
  : `Warning: Cline started but port ${out.port} is not answering; the overlay may not be loaded.`);
104
+ if (out.debugPortAlive) languageTip(conf, true);
83
105
  if (!out.debugPortAlive) process.exitCode = 1;
84
106
  return;
85
107
  }
@@ -136,6 +158,7 @@ async function main() {
136
158
  r.shortcuts.forEach((s) => console.log(" " + s));
137
159
  console.log("Launcher: " + r.launcher);
138
160
  console.log("Open Cline from those shortcuts from now on; `ckit uninstall` restores them.");
161
+ languageTip(cfg.read(), false);
139
162
  return;
140
163
  }
141
164
 
@@ -192,6 +215,36 @@ async function main() {
192
215
  return;
193
216
  }
194
217
 
218
+ if (cmd === "locales" || cmd === "locale") {
219
+ const dict = require("./dict");
220
+ const conf2 = cfg.read();
221
+ const have = dict.available();
222
+ const target = argv.slice(1).filter((a) => !a.startsWith("--"))[0];
223
+ if (target) {
224
+ if (!have.includes(target)) {
225
+ console.error(`Unknown locale "${target}". Bundled: ${have.join(", ")}`);
226
+ process.exitCode = 1;
227
+ return;
228
+ }
229
+ conf2.dictionary = target;
230
+ cfg.write(conf2);
231
+ console.log(`Language -> ${target} (the injector applies it within ~4 s, no restart needed)`);
232
+ console.log("Cline must be running through cline-kit for the open window to change; otherwise it");
233
+ console.log("applies the next time you start it with `ckit start`.");
234
+ return;
235
+ }
236
+ console.log("Bundled UI languages (switch with: ckit locales <code>):\n");
237
+ for (const code of have) {
238
+ const d = JSON.parse(fs.readFileSync(dict.bundledPath(code), "utf8"));
239
+ const n = Object.keys(d.entries || {}).length;
240
+ const active = (conf2.dictionary || "zh-CN") === code;
241
+ console.log(` ${active ? "* " : " "}${code.padEnd(7)} ${(d.label || "").padEnd(12)} ${String(n).padStart(4)} strings v${d.version}`);
242
+ }
243
+ console.log("\nOnly zh-CN is proofread against the running app; the others are complete but not");
244
+ console.log("reviewed by native speakers - see dictionaries/ if you want to fix a term.");
245
+ return;
246
+ }
247
+
195
248
  if (cmd === "dict") {
196
249
  console.log(JSON.stringify(require("./payload").info(conf), null, 2));
197
250
  console.log("Local override file (highest priority): " + cfg.localDictFile(conf.dictionary));
package/src/config.js CHANGED
@@ -73,7 +73,9 @@ const DEFAULTS = {
73
73
  shortcutPath: null,
74
74
  autostart: false,
75
75
  lastUpdateCheck: 0,
76
- remoteVersion: null
76
+ remoteVersion: null,
77
+ // one-off: `ckit start` points at `ckit locales` the first time it succeeds
78
+ hintLanguageShown: false
77
79
  };
78
80
 
79
81
  function read() {