Skip to content

Commit 4e6e273

Browse files
committed
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
1 parent abbface commit 4e6e273

3 files changed

Lines changed: 32 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [0.11.15] - 2026-03-13
8+
9+
### Changed
10+
11+
- 🖥️ **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`.
12+
- 🔒 **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`.
13+
714
## [0.11.14] - 2026-03-13
815

916
### Fixed

open_terminal/cli.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,32 @@ def run(
9292
os.environ["OPEN_TERMINAL_CORS_ALLOWED_ORIGINS"] = cors_allowed_origins
9393

9494
click.echo(BANNER)
95-
if generated:
96-
click.echo("=" * 60)
97-
click.echo(f" API Key: {api_key}")
98-
click.echo("=" * 60)
95+
96+
# -- Startup info block --
97+
local_url = f"http://{'localhost' if host in ('0.0.0.0', '127.0.0.1') else host}:{port}"
98+
99+
click.echo(f" {click.style('Local:', bold=True)} {click.style(local_url, fg='cyan')}")
100+
if host == "0.0.0.0":
101+
import socket
102+
try:
103+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
104+
s.connect(("8.8.8.8", 80))
105+
network_ip = s.getsockname()[0]
106+
s.close()
107+
click.echo(f" {click.style('Network:', bold=True)} http://{network_ip}:{port}")
108+
except Exception:
109+
pass
99110
click.echo()
100111

112+
if generated:
113+
click.echo(f" {click.style('API Key:', bold=True)} {api_key}")
114+
click.echo()
115+
116+
if host == "0.0.0.0":
117+
click.echo(click.style(" Warning: Listening on all network interfaces.", fg="yellow"))
118+
click.echo(click.style(" Use --host 127.0.0.1 to restrict to this machine.", dim=True))
119+
click.echo()
120+
101121
from open_terminal.env import UVICORN_LOOP
102122
uvicorn.run("open_terminal.main:app", host=host, port=port, loop=UVICORN_LOOP)
103123

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "open-terminal"
3-
version = "0.11.14"
3+
version = "0.11.15"
44
description = "A remote terminal API."
55
readme = "README.md"
66
authors = [

0 commit comments

Comments
 (0)