Skip to main content

🎭 PlayForge

A Playwright recorder that turns browser actions into reusable Page Object code.

PlayForge records clicks, fills, selects, and reads from a browser session, then writes the result out as Python code you can keep using. It is meant for the boring part of browser automation: set up a page, click through the flow once, and get a generated page object you can reuse instead of hand-writing locators over and over.

The project is designed to run as a normal CLI after installation. Install it globally, point it at a URL, interact with the page, and let it capture the flow. When you quit, it writes the generated code to disk.

✨ Features

  • 🎬 Browser Recording: Capture real user actions from a live page, including clicks, fills, selects, and text reads.
  • 🧩 Page Object Generation: Turn recorded workflows into Python page objects with reusable methods.
  • 🧹 Workflow Splitting: Split one recording session into multiple generated methods when a flow gets too long.
  • 🪵 Structured Logging: Uses structlog for simple, consistent CLI and runtime logs.
  • ⚡ CLI Ready: Install it globally and run playforge --help or playforge <url>.

📥 Installation

pip install playforge
playwright install

Or, to install directly from source:

pip install .
playwright install

If you want to use it from a local checkout while developing, install it in editable mode:

pip install -e .
playwright install

You need playwright install so Playwright downloads an actual browser. Without that, the CLI can install fine but has nothing to launch.

🚀 Quick Start

playforge https://example.com

The recorder opens a browser window, waits for you to interact with the page, and collects actions until you quit. Use split in the terminal if you want to break the recording into another generated method.

Help

playforge --help

Output file

playforge https://example.com -o generated_page.py

What gets recorded

PlayForge watches for:

  • clicks on buttons, links, and other interactive elements
  • fills on input fields and text areas
  • select changes
  • double-click reads on readable text elements

Each captured workflow becomes a method in the generated page object. Repeated actions are collapsed where possible so the output stays usable instead of turning into a wall of duplicate steps.

🐍 Requirements

  • Python 3.10+
  • playwright
  • structlog
  • ruff

🤝 Contributing

Issues and pull requests are welcome. If you hit a weird recorder edge case, open an issue with the page flow and the generated output.


Built with ❤️ for browser automation and code generation. MIT Licensed.

Metadata

Release files for playforge 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for playforge 1.3.0
File Size Uploaded
playforge-1.3.0.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for playforge 1.3.0
File Interpreter ABI Platform
playforge-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.5 kB

Release files / playforge-1.3.0.tar.gz

Download URL playforge-1.3.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a7829c03647eb757be9507a6df1b68312c32801bb6b7a719bc4c26d2ce908ebc
BLAKE2b-256 checksum
How to use checksums
3dd553628dbae251f41146a15184a17d655a6ab26c439557930329fb916563a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / playforge-1.3.0-py3-none-any.whl

Download URL playforge-1.3.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb5d3436014686775cd27b6a5c4b2c04d87569cd26417d53224332a04ad484a0
BLAKE2b-256 checksum
How to use checksums
3afa0868c9a1157d0ae3741139fbad0760fba60959c7cac98abfcf1e7ecf9f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page