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.0.1

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.0.1
File Size Uploaded
playforge-1.0.1.tar.gz 12.1 kB Details

Built distribution (wheel)

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

Total release size: 26.0 kB

Release files / playforge-1.0.1.tar.gz

Download URL playforge-1.0.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d10dfce9fbd67bde05790a00655af444561a48cbc8f17409e28ea30b5b22f73b
BLAKE2b-256 checksum
How to use checksums
cd3a9f14f27bb1e162f2fffc80da8de7a3a4613bde7c06ff60ab222d53b9cbe1
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 Aug 26, 2026.

Transparency log

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

Download URL playforge-1.0.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7784e7abfe12a0410ec23073a3afeeb5c58a88c83ab345c7b566d62bf4431244
BLAKE2b-256 checksum
How to use checksums
eebdd782b774470b6fd75cf0f12aeef223d0ffb7b7759a2b808ce51d3ca4fee9
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 Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.0

2 release files

This release

1.0.1 This release

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