hack-house/lab
leetcrypt 65ee9dee16 feat: add host-chat.sh — one-command server setup with friend instructions
Detects all available IPs (Tailscale, LAN, public), prints connect
command for friends to copy, prompts for password securely via getpass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 22:40:57 -07:00
..
host-chat.sh feat: add host-chat.sh — one-command server setup with friend instructions 2026-05-25 22:40:57 -07:00
README.md feat: add interactive 2-user lab environment + fix requirements.txt encoding 2026-05-25 21:44:24 -07:00
setup-lab.sh feat: add interactive 2-user lab environment + fix requirements.txt encoding 2026-05-25 21:44:24 -07:00

cmd-chat Lab

Interactive 2-user test environment using tmux. Spins up a server and two chat clients side-by-side so you can send messages between them.

Quick Start

# Default (TLS, password: labtest)
./lab/setup-lab.sh

# Plain HTTP (local testing)
./lab/setup-lab.sh --no-tls

# Custom password and port
./lab/setup-lab.sh --password mysecret --port 5000

# Custom usernames
./lab/setup-lab.sh --user1 charlie --user2 dave

Attach & Navigate

tmux attach -t cmd-chat-lab
Key Action
Ctrl+B then arrow keys Switch between panes
Ctrl+B then z Zoom/unzoom current pane
q Disconnect from chat
Ctrl+C in server pane Stop server

Teardown

./lab/setup-lab.sh --teardown

Layout

┌──────────── SERVER (127.0.0.1:4000) ─────────────┐
│ Sanic running, admin token displayed here        │
├──────── alice ───────┬──────── bob ──────────────┤
│ Type messages here   │ Type messages here        │
│ and hit Enter        │ and hit Enter             │
└──────────────────────┴───────────────────────────┘

Requirements

  • Python 3.10+
  • tmux 3.0+
  • All Python deps from requirements.txt (auto-installed if missing)