Skip to main content

unix-chrome-cli

Connect to the chrome dev socket running via unix domain socket.

Motivation

I don't like having privileged services run on localhost. In theory, you could run everything in docker / network jails but it is a pain. Unix domain sockets are a nice alternative to TCP ip sockets with limited access.

Using netns-jail (by me) you can route traffic that would go through TCP ip on localhost through a unix domain socket. Once you have done this, this tool lets you connect to chrome's development socket through unix domain sockets.

Alternatives

You don't need to use this at all. You could just let things run on localhost and connect to this. Ther are then a variety of tools you can use. You can use playwright. You can use selenium.

You could make a similar netns style wrapper with socat running in it to redirect TCP connections to unix domain socket.

Installation

pipx install unix-chrome-cli

Usage

Start chrome in a jail with a unix domain socket port.

netns-jail --nat --dns --forward /tmp/chrome.sock:localhost:9222 -- google-chrome --user-data-dir=/tmp/cj --remote-debugging-port=9222

Connect uchrome set-socket /tmp/chrome.sock

You can then run various commands.

  • uchrome go url
  • uchrome back
  • uchrome dom

LLM use

You can then use this with something like claude code.

Metadata

Release files for unix-chrome-cli 0.1.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 unix-chrome-cli 0.1.0
File Size Uploaded Provenance Actions
unix_chrome_cli-0.1.0.tar.gz 5.9 kB Without provenance Details for unix_chrome_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unix-chrome-cli 0.1.0
File Interpreter ABI Platform Actions
unix_chrome_cli-0.1.0-py3-none-any.whl Python 3 none any Details for unix_chrome_cli-0.1.0-py3-none-any.whl

Total release size: 12.3 kB

Release files / unix_chrome_cli-0.1.0.tar.gz

Download URL unix_chrome_cli-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fcd0af0c845bd578b6486e501136eda96c1de9d59fbde0068e0e6e6d62233f8a
BLAKE2b-256 checksum
How to use checksums
4d735b1eeb232ac65f3e3e5d542f58ccbdb7456874f5d6414f5ca3bc8f2e3e04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / unix_chrome_cli-0.1.0-py3-none-any.whl

Download URL unix_chrome_cli-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b322cfbccb66f833caa5fb26a1394c645bd60b32598e5dbb754cb257f88647a1
BLAKE2b-256 checksum
How to use checksums
b839c835c40a26f5aa7a7ad1c296fd4e20867aa37434a58711379394cc1e05fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for unix-chrome-cli 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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