Skip to content

Instantly share code, notes, and snippets.

@timsonner
Created May 21, 2026 06:40
Show Gist options
  • Select an option

  • Save timsonner/44f02204168ee95c1d9c34cace91d747 to your computer and use it in GitHub Desktop.

Select an option

Save timsonner/44f02204168ee95c1d9c34cace91d747 to your computer and use it in GitHub Desktop.
Google Gemini computer_use Playwright demo

Google Gemini and Playwright / computer_use demo

1. Clone Google's official computer-use-preview repository

git clone https://github.com/google-gemini/computer-use-preview.git
cd computer-use-preview

2. Set up a local Python virtual environment

python3 -m venv .venv
# source .venv/bin/activate
./venv/Scripts/Activate

3. Install the dependencies

python3 -m pip install -r requirements.txt

4. Install Playwright (the browser automation tool) and Chromium

add 'C:\Users\<user>\AppData\Local\Python\pythoncore-3.14-64\Scripts' to path, open new shell
playwright install-deps chrome
playwright install chrome
playwright install

5. Add your Gemini API Key (Get one from Google AI Studio)

# export GEMINI_API_KEY="YOUR_ACTUAL_API_KEY"
$env:GEMINI_API_KEY="YOUR_ACTUAL_API_KEY"

6. Run Query

python main.py --env="playwright" --query="Go to http://timsonner.com, find the terminal and type 'osint 1.2.3.4' after that, hit enter, then follow the links to spur and proxyinfo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment