npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chrome-gemini-repair

v0.1.1

Published

Installer for the Chrome Gemini Repair Codex skill.

Downloads

292

Readme

Chrome Gemini Repair

English | 中文

这是一个小型 Codex skill 和 macOS 修复脚本,用来恢复 Chrome 里的 Gemini in ChromeAsk Gemini 工具栏按钮、Glic、Chrome AI innovations,以及 AI 驱动的历史记录搜索。适用于 Chrome 更新后只显示 Help me write、Gemini 侧边栏消失,或者相关入口被隐藏的情况。

本项目与 Google 无关。脚本会修改本机 Chrome profile 状态。运行前建议先阅读脚本内容,并保留脚本输出的备份路径。

功能

  • 修改 profile 文件前退出 Chrome。
  • 备份 Local StateDefault/Preferences 和 Chrome 语言默认值。
  • is_glic_eligible 设为 true
  • variations_country 设为 us
  • variations_permanent_consistency_country 设为 [<Last Version>, "us"]
  • 添加 Glic 相关 labs experiments,例如 glic@1glic-side-panel@1glic-actor@1glic-pre-warming@1
  • 可选择把 Chrome 语言设为 en-US
  • 重新启动 Chrome 前读回 Local State,如果国家状态没有写成 us 会提前失败。
  • 重新启动 Chrome,并打开 chrome://settings/ai 方便肉眼验证。
  • 结束时再做一次 dry check,并打印关键字段的 before -> after

安装为 Codex Skill

使用 npx 安装:

npx chrome-gemini-repair install

安装器会把这个 skill 复制到:

~/.codex/skills/chrome-gemini-repair

如果使用自定义 Codex home:

CODEX_HOME=/path/to/codex npx chrome-gemini-repair install

也可以直接把这个仓库 clone 到 Codex skills 目录:

git clone https://github.com/walnut-a/chrome-gemini-repair.git ~/.codex/skills/chrome-gemini-repair

然后对 Codex 说:

Use $chrome-gemini-repair to repair Gemini in Chrome.

直接运行

在仓库根目录运行:

scripts/repair-chrome-gemini.sh --dry-run
scripts/repair-chrome-gemini.sh

修复输出会包含最终 dry check。关键结果应该类似:

variations_country: cn -> us
variations_permanent_consistency_country: ['148.0.7778.97', 'cn'] -> ['148.0.7778.97', 'us']

如果想保留当前 Chrome 语言设置:

scripts/repair-chrome-gemini.sh --keep-language

如果要修复其他 Chrome 渠道版本:

scripts/repair-chrome-gemini.sh --channel beta
scripts/repair-chrome-gemini.sh --channel dev
scripts/repair-chrome-gemini.sh --channel canary
scripts/repair-chrome-gemini.sh --channel all

发布

这个包已经准备好通过 GitHub Actions 使用 npm Trusted Publishing。

在 npm 包设置里只需要配置一次 trusted publisher:

Package: chrome-gemini-repair
Repository: walnut-a/chrome-gemini-repair
Workflow: .github/workflows/npm-publish.yml
Environment: 留空

以后发布新版本时,更新 package.json 版本号,提交到 main,再推一个版本 tag:

git tag v0.1.2
git push origin main v0.1.2

验证

成功运行后,chrome://settings/ai 里应该能看到:

  • Gemini in Chrome
  • History search, powered by AI
  • Help me write
  • Ask Gemini 工具栏按钮

点击 Ask Gemini 后,应该打开由 gemini.google.com/glic 支持的 chrome://glic/ 侧边栏。

注意事项

  • 脚本仅支持 macOS。
  • 不要在 Chrome 正在运行时修改 Local State,否则 Chrome 可能会覆盖 profile 里的改动。
  • 判断 Chrome 是否还开着时,脚本会忽略 chrome_crashpad_handler 这类辅助进程。
  • Chrome 启动后可能会移除不可用的实验 flags,这是正常现象。
  • English (en-US) 是这个修复方式目前最可靠的启用语言。较新的 Chrome 灰度可能会在启用后支持更多语言。
  • 备份文件会写入 ~/.codex/backups/chrome-gemini-repair/

参考来源

这个仓库把本机调试流程和以下公开资料中的做法整理成了可重复运行的修复流程:

License

MIT。详见 LICENSE