feat: redesign startup output with URLs, bind warning

- Display Local and Network URLs at startup (Vite-style)
- Auto-detect LAN IP when binding to 0.0.0.0
- Show generated API key inline with bold label
- Print yellow warning when listening on all interfaces
- Bump to 0.11.15
This commit is contained in:
Timothy Jaeryang Baek 2026-03-13 17:43:16 -05:00
parent abbface95a
commit 4e6e2739ce
3 changed files with 32 additions and 5 deletions

View file

@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [0.11.15] - 2026-03-13
### Changed
- 🖥️ **Redesigned startup output** — the CLI now displays Local and Network URLs, the generated API key, and a bind warning in a clean, modern key-value layout with color-coded labels. Network URL auto-detects your LAN IP when binding to `0.0.0.0`.
- 🔒 **Bind warning** — a yellow warning is printed at startup when binding to `0.0.0.0`, nudging bare-metal users to restrict access with `--host 127.0.0.1`.
## [0.11.14] - 2026-03-13
### Fixed

View file

@ -92,12 +92,32 @@ def run(
os.environ["OPEN_TERMINAL_CORS_ALLOWED_ORIGINS"] = cors_allowed_origins
click.echo(BANNER)
if generated:
click.echo("=" * 60)
click.echo(f" API Key: {api_key}")
click.echo("=" * 60)
# -- Startup info block --
local_url = f"http://{'localhost' if host in ('0.0.0.0', '127.0.0.1') else host}:{port}"
click.echo(f" {click.style('Local:', bold=True)} {click.style(local_url, fg='cyan')}")
if host == "0.0.0.0":
import socket
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
network_ip = s.getsockname()[0]
s.close()
click.echo(f" {click.style('Network:', bold=True)} http://{network_ip}:{port}")
except Exception:
pass
click.echo()
if generated:
click.echo(f" {click.style('API Key:', bold=True)} {api_key}")
click.echo()
if host == "0.0.0.0":
click.echo(click.style(" Warning: Listening on all network interfaces.", fg="yellow"))
click.echo(click.style(" Use --host 127.0.0.1 to restrict to this machine.", dim=True))
click.echo()
from open_terminal.env import UVICORN_LOOP
uvicorn.run("open_terminal.main:app", host=host, port=port, loop=UVICORN_LOOP)

View file

@ -1,6 +1,6 @@
[project]
name = "open-terminal"
version = "0.11.14"
version = "0.11.15"
description = "A remote terminal API."
readme = "README.md"
authors = [