glic-kit 1.0.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/LICENSE +22 -0
- package/README.md +80 -0
- package/dist/index.js +315 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 诺墨
|
|
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.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# glic-kit
|
|
2
|
+
|
|
3
|
+
Chrome Gemini AI 一键解锁工具 — 跨平台、多版本、TUI 交互。
|
|
4
|
+
|
|
5
|
+
## 功能
|
|
6
|
+
|
|
7
|
+
- ✅ 支持 macOS / Windows / Linux 三大操作系统
|
|
8
|
+
- ✅ 支持 Chrome 正式版、Beta、Dev、Canary 全渠道
|
|
9
|
+
- ✅ 一键解锁 Gemini in Chrome (Glic) 功能
|
|
10
|
+
- ✅ 默认 TUI 交互模式,可视化选择修复
|
|
11
|
+
- ✅ 支持纯 CLI 参数,适合脚本/自动化
|
|
12
|
+
- ✅ 自动备份,支持还原
|
|
13
|
+
- ✅ 原子写入,修改前验证
|
|
14
|
+
|
|
15
|
+
## 快速开始
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 一键解锁(自动检测并修复所有已安装的 Chrome)
|
|
19
|
+
npx glic-kit
|
|
20
|
+
|
|
21
|
+
# 仅检查状态(不修改)
|
|
22
|
+
npx glic-kit check
|
|
23
|
+
|
|
24
|
+
# 修复所有渠道
|
|
25
|
+
npx glic-kit fix --all
|
|
26
|
+
|
|
27
|
+
# 只修复 stable 版
|
|
28
|
+
npx glic-kit fix --channel stable
|
|
29
|
+
|
|
30
|
+
# 保留 Chrome 语言设置
|
|
31
|
+
npx glic-kit fix --all --keep-language
|
|
32
|
+
|
|
33
|
+
# 还原备份
|
|
34
|
+
npx glic-kit restore
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 原理
|
|
38
|
+
|
|
39
|
+
Chrome 通过 `Local State` 文件中的以下字段控制 Gemini in Chrome 功能的可用性:
|
|
40
|
+
|
|
41
|
+
| 字段 | 作用 | 修改后 |
|
|
42
|
+
|------|------|--------|
|
|
43
|
+
| `variations_country` | 地区标识 | `"cn"` → `"us"` |
|
|
44
|
+
| `variations_permanent_consistency_country` | 永久地区锁定 | `["版本号", "cn"]` → `["版本号", "us"]` |
|
|
45
|
+
| `is_glic_eligible` | 功能资格开关 | `false` → `true` |
|
|
46
|
+
|
|
47
|
+
此外还会注入 Glic 相关的 Labs 实验 flags,并将 Chrome 语言设置为 `en-US`。
|
|
48
|
+
|
|
49
|
+
## 注意事项
|
|
50
|
+
|
|
51
|
+
- ⚠️ 修改前必须关闭 Chrome(工具会自动处理)
|
|
52
|
+
- ⚠️ 仅解决客户端配置问题,用户仍需通过代理/VPN 连接到支持地区的 IP
|
|
53
|
+
- ⚠️ Chrome 启动后可能重新服务端同步数据,如遇问题请重新运行工具
|
|
54
|
+
- ⚠️ 企业管理员锁定的 Chrome 不适用此方案
|
|
55
|
+
|
|
56
|
+
## CLI 参数
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
glic-kit [command] [options]
|
|
60
|
+
|
|
61
|
+
Commands:
|
|
62
|
+
(default) 进入 TUI 交互模式
|
|
63
|
+
check 仅检查状态,不修改
|
|
64
|
+
fix 执行修复
|
|
65
|
+
restore 还原备份
|
|
66
|
+
|
|
67
|
+
Options:
|
|
68
|
+
--channel <name> 指定渠道 (stable|beta|dev|canary|all)
|
|
69
|
+
--keep-language 保留 Chrome 语言设置
|
|
70
|
+
--skip-experiments 跳过 labs experiments 注入
|
|
71
|
+
--no-launch 修复后不自动启动 Chrome
|
|
72
|
+
--dry-run 仅模拟,不实际修改
|
|
73
|
+
--json 以 JSON 格式输出
|
|
74
|
+
-v, --verbose 详细输出
|
|
75
|
+
-h, --help 显示帮助
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT
|