Skip to main content

CLI for browser sessions and interactable element actions

Project description

browseable

browseable is a Unix-style CLI backed by a local daemon that keeps browser sessions alive between commands.

What it does

  • API 1 (elements): given a session, list interactable form/navigation elements.
  • API 2 (action): given a session, perform an action (click, type, or interact).

The daemon holds browser + page state so each CLI command is short-lived.

Install

uv sync
uv run playwright install chromium

Quick start

# Optional convenience.
alias browseable='uv run browseable'

# 1) start daemon
browseable daemon start

# 2) create a session (returns session ID)
browseable session create https://example.com/signup

# 3) list elements for that session
browseable elements <session_id>

# 4) focus an element
browseable action <session_id> click 2

# 5) type into an element
browseable action <session_id> type 3 "my@email.com"

# 6) open interactive browser window for the same session
browseable action <session_id> interact

# 7) close session + stop daemon
browseable session close <session_id>
browseable daemon stop

Commands

browseable daemon start|run|status|stop
browseable session create <url>
browseable session close <session_id>
browseable elements <session_id> [--json]
browseable action <session_id> click <element_or_index> [--timeout-ms]
browseable action <session_id> type <element_or_index> <text> [--timeout-ms]
browseable action <session_id> interact [--timeout-ms]

interact focuses the session in a real browser window. If daemon started headless, interact promotes the session into a headed browser context.

BROWSEABLE_DAEMON_URL can override the daemon address if needed.

Daemon JSON API

The daemon exposes local HTTP endpoints:

  • POST /sessions with {"url":"..."} -> create session.
  • GET /sessions/<session_id>/elements -> list interactable elements.
  • POST /sessions/<session_id>/actions with {"action":"click"|"type","element_id":"...","text":"..."}.
  • POST /sessions/<session_id>/actions with {"action":"interact"} -> promote/focus session in a headed browser window.
  • DELETE /sessions/<session_id> -> close session.

E2E Example

Run the telemetry register flow:

uv run scripts/e2e_telemetry_register.sh

GitHub Workflows

  • /.github/workflows/ci.yml: compile + CLI smoke checks on push/pull_request.
  • /.github/workflows/publish-testpypi.yml: manual publish to TestPyPI.
  • /.github/workflows/publish-pypi.yml: publish to PyPI on v* tags (or manual dispatch).

How to Publish to PyPI

  1. Create package projects:
  2. Configure Trusted Publishing on each project:
    • Owner/repo: your GitHub repo.
    • Workflow file:
      • TestPyPI: .github/workflows/publish-testpypi.yml
      • PyPI: .github/workflows/publish-pypi.yml
    • Environment name:
      • TestPyPI: testpypi
      • PyPI: pypi
  3. Test release on TestPyPI by running Publish to TestPyPI (workflow dispatch).
  4. Release to PyPI:
    • Bump version in pyproject.toml.
    • Commit and push.
    • Tag and push vX.Y.Z (must match pyproject.toml version).
  5. Verify install:
python -m pip install browseable==0.1.1

Optional Manual Publish (No GitHub Actions)

uv build
uvx twine check dist/*
uvx twine upload dist/*

For manual upload, create a PyPI API token and use TWINE_USERNAME=__token__ and TWINE_PASSWORD=<token> (or ~/.pypirc).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browseable-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browseable-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file browseable-0.1.0.tar.gz.

File metadata

  • Download URL: browseable-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for browseable-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e4e6398f22a885519c86e4a7d62abdbcce6bd2fc34f32884b0e56b199066e3e
MD5 708f1fd231fee99beb9bab51d2cad951
BLAKE2b-256 d85a6ee5a44edb67d5768a3284c2765e9ba95e8367b672fa5b5642a85b68ae52

See more details on using hashes here.

Provenance

The following attestation bundles were made for browseable-0.1.0.tar.gz:

Publisher: publish-pypi.yml on TheBuilderJR/browseable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file browseable-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: browseable-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for browseable-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc8cc69f17ef02dd2037068de630f94543a27655ee9d4c927149bc43da561aac
MD5 8238e72cbad20f74cb0bfa5bfaaf30a0
BLAKE2b-256 051f6b73527adabd5d0e687242790ab72894f7c2ba3f2dce9a213859434e1e52

See more details on using hashes here.

Provenance

The following attestation bundles were made for browseable-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on TheBuilderJR/browseable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page