## What this repo builds A CLI tool (`bridge`) that manages named SSH reverse tunnels: ``` bridge up [TUNNEL] # start tunnel(s) bridge down [TUNNEL] # stop tunnel(s) bridge restart [TUNNEL] # restart tunnel(s) bridge status # show all tunnels: state, uptime, last health check bridge logs [TUNNEL] # tail reconnect log ``` Config file: `~/.config/bridge/tunnels.yaml` Each tunnel: - Named (e.g. `state-hub-coulombcore`) - Reverse SSH port-forward: `ssh -R remote_port:127.0.0.1:local_port host` - Auto-reconnects on drop (backoff loop) - Optional HTTP health check to confirm the forwarded service is reachable PRD: `workplans/BRIDGE-WP-0001-initial-implementation.md` ## Stack - **Language:** Python 3.11+ - **CLI framework:** Typer - **Dependencies:** typer, pyyaml, httpx - **Packaging:** `uv tool install` (single command install, no venv activation) - **No system daemons** — process management is internal, PID tracked in `~/.local/state/bridge/` ## Dev Commands ```bash # Install locally for development uv tool install -e . # Run tests uv run pytest # Run a single test uv run pytest tests/test_tunnel.py::test_name -v # Lint uv run ruff check . ```