Skip to content

v0.3.0 — window resize CLI

Choose a tag to compare

@lipex360x lipex360x released this 28 May 13:28
e9cfc09

Adds window-resize capability to the web-view CLI and library. Closes #8.

What's new

# pre-launch — initial window size (replaces the previously hardcoded 1920x1080)
web-view start --window-size 1280x720

# post-launch — resize a running Chrome (OS window, default)
web-view resize --width 1280 --height 720

# page-viewport override only (does not touch the OS window)
web-view resize --width 800 --height 600 --viewport

Every other runtime flag follows the existing patterns: --port auto-resolves when a single CDP Chrome is running, --tab <index|substring> reuses navigate semantics, --quiet/-q silences the one-line success ack.

Library helpers

New cdp/_window.py module:

cdp.set_window_size(page, *, width=1280, height=720)
# OS-level resize via CDP Browser.setWindowBounds. The user sees the
# Chrome window physically change size on their desktop.

cdp.set_viewport(page, *, width=1280, height=720)
# Page-rendering viewport override via Playwright's set_viewport_size.
# Useful for responsive-layout testing without touching the OS window.

cdp.start_chrome now accepts window_size=(W, H) to control the initial size.

Surface

  • Root web-view -h lists 7 commands (start | list | stop | navigate | snap | do | resize) — under the 8-command cap from ADR 0001.
  • Per-command help: web-view resize -h carries Examples + Port-selection + Tab-selection + Persistence-behaviour blocks.

Install

uv tool install --reinstall git+https://github.com/lipex360x/web-view@v0.3.0

Or upgrade an existing install:

uv tool upgrade web-view

What's next

Issue #9 — tab management (web-view tab new/close/switch). Library helpers already exist (cdp.open_tab / close_tab / switch_to_tab); only CLI surface is missing. Targets v0.4.0.