Skip to main content

CLI Reference

pytest-web

Start the web UI server for your project.

pytest-web [OPTIONS]

Options

FlagDefaultDescription
--port PORT8000Port to listen on
--host HOST127.0.0.1Bind host
--cwd PATHcurrent directoryProject root — the directory where pytest.ini / pyproject.toml lives
--no-browserSkip auto-opening the browser tab on startup
--versionPrint the installed version and exit

Examples

# Run from your project root (most common)
cd /path/to/your/project
pytest-web

# Custom port
pytest-web --port 9000

# Point at a specific project directory
pytest-web --cwd /path/to/your/project

# Don't open the browser automatically (useful in CI previews or remote machines)
pytest-web --no-browser

# Bind to all interfaces (e.g. to access from another machine on the network)
pytest-web --host 0.0.0.0 --port 8000
warning

Binding to 0.0.0.0 exposes the server on your local network. pytest-web is a local development tool — don't expose it to the public internet.


pytest-web-build

Build the distributable package (for maintainers / contributors only).

pytest-web-build

This runs the full build pipeline: bumps the version from git tags, builds the wheel and sdist, and outputs them to dist/. You won't need this unless you're cutting a release.