The rise of large language model agents has created a demand for reliable web automation that can operate without constant human supervision.

Traditional tools like Selenium often require heavyweight grids, browser extensions, or complex configuration that slows down agent workflows.

Browser-automation-cli introduces a lightweight daemon-client model that runs a persistent Chromium process in the background.

By separating the daemon (the long-lived browser) from the CLI client, the tool maintains cookies, localStorage, and IndexedDB across invocations.

This persistent session eliminates the need to repeat login steps, dramatically reducing latency for agents that perform repetitive tasks.

The CLI avoids browser extensions, remote-debugging protocols, and heavyweight SDKs, relying only on a Python interpreter and subprocess communication.

Installation is simple via pip, and the executable can be added to the PATH with a single line in the shell profile.

By default the daemon runs Chromium in headless mode, ideal for servers and CI pipelines, but can be switched to visible mode for debugging.

Sessions are isolated Chromium user data directories that persist to disk, allowing agents to treat the web as a stateful API after an initial login.

The snapshot command extracts a token-efficient, plain-text summary of a page, perfect for feeding into language models without blowing context limits.

Element targeting is strict-by-default; CSS selectors must match exactly one element, and alternative strategies like text, ARIA role, label, and placeholder are provided.

All commands return JSON on success and a non-zero exit code on failure, making integration into scripts, agent frameworks, and audit pipelines straightforward.