Skip to content

Repository files navigation

AutoPattern

Record browser actions and replay them with AI-powered automation.

AutoPattern includes:

  • Chrome extension to capture workflow events
  • FastAPI backend to convert events into actionable tasks
  • CLI for chat-mode or server-only execution
  • Browser automation using Playwright + browser-use
  • Gemini integration for workflow interpretation

Requirements

  • macOS / Linux / Windows
  • Python 3.13+
  • Chrome

Installation (Recommended for Users)

Use pipx for a global CLI with isolated dependencies.

brew install pipx
pipx ensurepath
pipx install autopattern

Run:

autopattern

Developer Setup (Working on this Repo)

Use uv for fast, isolated local development.

cd backend
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

Run locally:

autopattern
# or
autopattern --server

Run tests:

pytest

Configuration

Create backend/automation/.env:

GOOGLE_API_KEY=your_key_here
LLM_MODEL=gemini-flash-latest
HEADLESS=false

Notes:

  • GOOGLE_API_KEY is required
  • LLM_MODEL and HEADLESS are optional

Usage

Chat mode (default)

autopattern

Server mode

autopattern --server

One-shot task

autopattern --task "Open GitHub and search for browser-use"

Packaging / Release

Build:

cd backend
python -m build

Artifacts are created in backend/dist/.


Dependency Policy

  • Runtime dependencies are version-ranged in backend/pyproject.toml
  • browser-use is pinned to stable 0.11.x range:
    • browser-use>=0.11.0,<0.12.0
  • Use pipx for user installs, uv for development

Troubleshooting

CLI asks API key repeatedly

Ensure .env exists at:

backend/automation/.env

Clean restart of dev environment

cd backend
deactivate 2>/dev/null || true
rm -rf .venv
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

License

MIT

Releases

Packages

Contributors

Languages