Metadata-Version: 2.4
Name: domrun
Version: 0.1.0
Summary: Python CLI and SDK helpers for Domrun Browser, MCP registries, and GPT/Codex automation workflows.
Author: Domrun
License-Expression: MIT
Project-URL: Homepage, https://github.com/domrun/domrun
Project-URL: Documentation, https://github.com/domrun/domrun
Keywords: domrun,browser,automation,mcp,playwright,codex,ai-agent
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Domrun Python CLI and SDK

`domrun` is the Python distribution for Domrun Browser setup, diagnostics, and
customer-owned MCP registry onboarding. It provides the same `domrun` command
as the npm package, plus small Python helpers for backend integration tests.

## Install

After the package is published to PyPI:

```bash
pip install domrun
domrun --help
```

With `uv`:

```bash
uv tool install domrun
domrun --help
```

Run without installing globally:

```bash
uvx domrun --help
```

For a project virtual environment:

```bash
uv pip install domrun
```

## Configure a customer backend

```bash
domrun init \
  --registry-url https://mcp.customer.com \
  --automation-url https://automation.customer.com \
  --mcp-url https://mcp.customer.com/mcp \
  --user-key customer-acme:user_123 \
  --codex
```

This writes `~/.domrun/config.json`. With `--codex`, it also writes:

- `~/.codex/config.toml` with a `domrun` MCP server entry
- `AGENTS.md` in the current project with Domrun usage guidance for GPT/Codex
  agents

## Useful commands

```bash
domrun browser open https://example.com
domrun connect "https://mcp.customer.com/v1/domrun/connect-sessions/cs_123"
domrun status
domrun browser status
domrun codex install --mcp-url https://mcp.customer.com/mcp
domrun mcp status
domrun doctor
domrun tools list
```

## Python helper

```python
from domrun import DomrunClient

client = DomrunClient(
    backend_url="https://mcp.customer.com",
    service_token="service-token",
)

session = client.create_connect_session(
    tenant_id="customer-acme",
    user_id="user_123",
    user_key="customer-acme:user_123",
    registry_url="https://mcp.customer.com",
    automation_url="https://automation.customer.com",
    browser_alias="Faizan's MacBook",
)

print(session["browser_connect_url"])
```

## Publish to PyPI

The package is configured for public PyPI distribution as `domrun`.

Build and check locally:

```bash
uv run --with build python -m build
uv run --with twine python -m twine check dist/*
```

Publish after logging into the account that should own the package:

```bash
uv run --with twine python -m twine upload dist/*
```

For CI, use a PyPI trusted publisher or set `TWINE_USERNAME=__token__` and
`TWINE_PASSWORD=<pypi-token>`.
