Researched and scripted by lcandy2.
English | 中文
Enable Gemini in Chrome, AI Powered History search, and DevTools AI Innovations in Google Chrome—without cleaning data or reinstalling.
Tiny Python helper that enables Chrome's built-in AI features by patching your local profile data (variations_country, variations_permanent_consistency_country, and is_glic_eligible)—no browser flags required.
- Python
3.13+(see.python-version/pyproject.toml) - Google Chrome installed (Stable/Canary/Dev/Beta)
- Install uv (once):
- Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - macOS & Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh - See uv installation docs for more options.
- Windows:
- Install deps (creates venv automatically):
uv sync. - Run the script:
uv run main.py. - Chrome will close while patching; after it restarts, press Enter to finish.
- Create and activate a venv.
- Install deps:
python -m pip install psutil. - Run:
python main.py.
- Finds Chrome user data for Stable/Canary/Dev/Beta on Windows, macOS, and Linux.
- Kills top-level Chrome processes to avoid file locks, then brings them back.
- Sets all
is_glic_eligibletotrueinLocal State(recursive search). - Sets
variations_countryto"us"inLocal State. - Sets
variations_permanent_consistency_countryto["<version>", "us"]inLocal State. - Restarts any Chrome builds that were running before the patch.
- The script expects
User Data/Local Stateto exist; if it's missing, the run can fail (launch Chrome once to generate it). - Chrome restart only happens if the executable path can be detected from running processes.
- On macOS, process detection is name-based (
Google Chrome*) and may terminate more than just the "top-level" app process. - On Linux, process detection expects an executable name of
chrome; if your build uses a different name, Chrome may not be closed (and files may remain locked).
- The script writes to your existing Chrome profile; back up
User Dataif you want a safety net. - Run as the same OS user who owns the Chrome profile to ensure write access.
- Not affiliated with Google—use at your own risk.
Please credit this project when reposting or creating derivative works.