Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

more claude code permissions tweaks and set up python env

Nick Sweeting464a51512f86
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index cbff38bba..cd0ab61f7 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -19,17 +19,59 @@ jobs:
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
+ actions: read
contents: read
pull-requests: read
- issues: read
id-token: write
+ discussions: write
+ issues: write
env:
- IS_SANDBOX: 1
+ IS_SANDBOX: '1'
+ IN_DOCKER: 'true'
+ BROWSER_USE_CLOUD_SYNC: 'false'
+ ANONYMIZED_TELEMETRY: 'false'
+ BROWSER_USE_LOGGING_LEVEL: 'DEBUG'
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
+ PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
+ GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
+ GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
+ - uses: actions/checkout@v4
+ - uses: astral-sh/setup-uv@v6
with:
- fetch-depth: 1
+ enable-cache: true
+ activate-environment: true
+
+ - run: uv sync --dev --all-extras
+
+ - name: Detect installed Playwright version
+ run: echo "PLAYWRIGHT_VERSION=$(uv pip list --format json | jq -r '.[] | select(.name == "playwright") | .version')" >> $GITHUB_ENV
+
+ # - name: Cache chrome binaries
+ # uses: actions/cache@v4
+ # with:
+ # path: |
+ # /tmp/google-chrome-stable_current_amd64.deb
+ # key: ${{ runner.os }}-${{ runner.arch }}-chrome-stable
+
+ # - name: Install Chrome stable binary
+ # run: |
+ # sudo apt-get update -qq \
+ # && sudo curl -o "/tmp/google-chrome-stable_current_amd64.deb" --no-clobber "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \
+ # && sudo apt-get install -y "/tmp/google-chrome-stable_current_amd64.deb" -f
+ # - run: patchright install chrome --with-deps
+ # - run: playwright install chrome --with-deps
+
+ - name: Cache chromium binaries
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/ms-playwright
+ key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-chromium
+
+ - run: playwright install chromium --with-deps
+ # - run: patchright install chromium --with-deps
- name: Run Claude Code
id: claude
@@ -42,6 +84,11 @@ jobs:
Bash(uv run ruff:*)
Bash(uv run pyright:*)
Bash(uv run pre-commit:*)
+ Bash(uv pip:*)
+ Bash(uv add:*)
+ Bash(uv sync --all-extras --dev)
+ Bash(.venv/bin/*:*)
+ Bash(.venv/bin/python:*)
Bash(sed:*)
Bash(rg:*)
Bash(jq:*)