Skip to content

Enable Gemini in Chrome, AI Powered History search, DevTools Al Innovations in Google Chrome without cleaning data and reinstall.

License

Notifications You must be signed in to change notification settings

lcandy2/enable-chrome-ai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enable Chrome AI ✨

Researched and scripted by lcandy2.

Twitter

English | 中文

Enable Gemini in Chrome, AI Powered History search, and DevTools AI Innovations in Google Chrome—without cleaning data or reinstalling.

Google Chrome Gemini in Chrome

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.

✅ Requirements

  • Python 3.13+ (see .python-version / pyproject.toml)
  • Google Chrome installed (Stable/Canary/Dev/Beta)

⚡️ Quick Start (uv)

  1. 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.
  2. Install deps (creates venv automatically): uv sync.
  3. Run the script: uv run main.py.
  4. Chrome will close while patching; after it restarts, press Enter to finish.

⚡️ Quick Start (pip)

  1. Create and activate a venv.
  2. Install deps: python -m pip install psutil.
  3. Run: python main.py.

🔧 What Happens

  • 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_eligible to true in Local State (recursive search).
  • Sets variations_country to "us" in Local State.
  • Sets variations_permanent_consistency_country to ["<version>", "us"] in Local State.
  • Restarts any Chrome builds that were running before the patch.

⚠️ Caveats / Known Limitations

  • The script expects User Data/Local State to 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).

🛟 Notes

  • The script writes to your existing Chrome profile; back up User Data if 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.

📜 License

Please credit this project when reposting or creating derivative works.

🙏 Acknowledgments

About

Enable Gemini in Chrome, AI Powered History search, DevTools Al Innovations in Google Chrome without cleaning data and reinstall.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%