Documentation
¶
Overview ¶
Command bridge is the 1-bit-bridge server CLI.
Subcommands:
bridge init first-time setup: config, TLS cert, launchd/systemd unit bridge serve run the HTTPS server (default port 7788) bridge pair mint a new bearer token for an iOS client bridge scan force a full library rescan bridge version print version and protocol version
The launcher menu shown when `bridge` is run with no arguments on a TTY. Reads platform install state via internal/packaging, paints a context-aware option list, and dispatches each choice to an existing flag-driven entry point (initCmd, runServe, pairCmd, etc.) in-process. Non-TTY callers fall through to the existing `usage + exit 2` path — automation and CI see zero behavior change.
Helpers for the cinematic 8-bit-style boxes / colors / shell-aware handoff prints used by `bridge init` (and, in PR 3, by the no-args menu launcher). Pure stdlib + go-isatty for TTY detection — no other runtime UI deps. All helpers are safe to call when stdout is a pipe or `NO_COLOR` is set; output degrades to plain ASCII automatically.
Tsnet integration glue for `bridge serve` (mode dispatch) AND the `bridge tsnet auth|status|logout` operator subcommands.
Lives alongside cmd/bridge/tailscale.go so the two integration paths share a directory but have clearly-distinct files. The internal/tsnet module owns the wrapper; this file owns the process-level wiring (config → Server, admin adapter, CLI subcommands).