惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
GbyAI
GbyAI
S
SegmentFault 最新的问题
量子位
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
IT之家
IT之家
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
雷峰网
雷峰网

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - lucarp/terminalsync: Mirror a terminal to your p...
rafaepta · 2026-05-04 · via Hacker News: Show HN

Mirror a terminal to your phone — E2E encrypted, peer-to-peer, no daemon.

TerminalSync demo

Run terminalsync in any terminal tab. Scan the QR code with your phone. See your terminal, live, in your browser. Close the tab and everything shuts down — no background process, no cloud relay, no stored keys.

Built for leaving AI coding agents (Claude Code, etc.) running at home while staying able to observe and intervene from anywhere.

How it works

  1. terminalsync allocates a PTY, runs your shell, and starts a WebSocket server on an ephemeral port.
  2. A QR code is printed in the terminal encoding the endpoint and cryptographic pairing data.
  3. Scan it with your phone's browser. A full X25519 key exchange happens — both sides derive a shared key that never leaves their devices.
  4. Your terminal is mirrored to the phone in real time, encrypted with XSalsa20-Poly1305.
  5. When the terminal tab closes, the process exits, keys are zeroed, and the phone's session drops.

Zero servers. Zero daemons. Zero persistent keys.

Install

pipx install terminalsync

Or with pip:

pip install terminalsync

Or via the install script:

curl -fsSL https://raw.githubusercontent.com/lucarp/terminalsync/master/install.sh | bash

Or from source:

git clone https://github.com/lucarp/terminalsync
cd terminalsync/cli
pip install -e .

Usage

# In any terminal tab:
terminalsync

# Scan the QR code with your phone — open the printed URL in mobile Safari/Chrome
# Accept the self-signed certificate warning
# Your terminal appears in the browser

Options

Option Default Description
--host auto-detect LAN IP IP/hostname to advertise in the QR code
--port random ephemeral Port to listen on
--command $SHELL Command to run inside the PTY
--public-url Public URL for QR (ngrok, cloudflared, SSH tunnel). Overrides --host/--port in QR.

Environment variable TERMINALSYNC_HOST overrides --host.

Connecting from your phone

Same Wi-Fi (LAN)

Works out of the box. terminalsync auto-detects your LAN IP and prints it in the QR code.

The first time you open the URL, your phone's browser will show a self-signed certificate warning — tap Advanced → Proceed to accept it. The WebSocket will connect on the same certificate.

Tailscale (recommended for remote)

Tailscale is free for personal use. Install it on your computer and phone, then:

terminalsync --host $(tailscale ip -4)

Your phone connects directly to your computer over the Tailscale network — no intermediate server, no extra setup.

ngrok / cloudflared (remote, no VPN)

# Terminal 1 — expose local port via ngrok
ngrok http 12345

# Terminal 2 — start terminalsync pointing at the ngrok URL
terminalsync --port 12345 --public-url https://YOUR-SUBDOMAIN.ngrok-free.app

When --public-url is set, terminalsync binds plain HTTP locally and lets the tunnel handle TLS. The QR code encodes the tunnel URL so your phone connects through ngrok.

The same pattern works with cloudflared:

cloudflared tunnel --url http://localhost:12345
terminalsync --port 12345 --public-url https://YOUR-SUBDOMAIN.trycloudflare.com

SSH tunnel (remote, own server)

If you have a VPS:

# Forward a port on the server back to your local machine
ssh -R 12345:localhost:12345 user@your-server.com

terminalsync --port 12345 --public-url http://your-server.com:12345

Local browser testing (no phone)

terminalsync --port 12345 --public-url http://localhost:12345

Binds plain HTTP, no certificate warning — open the printed URL directly in your browser.

Why not just SSH?

SSH opens a new session. terminalsync mirrors the session already running — the one with your AI agent mid-task, your build in progress, your REPL state intact. Without terminalsync you'd need tmux or screen to share a running process. terminalsync does it with a QR scan, no extra setup required.

You can also work on your computer and phone simultaneously — both see and interact with the same live terminal.

Security

Property Implementation
Key exchange X25519 (Curve25519 ECDH)
Symmetric encryption XSalsa20-Poly1305 via libsodium/PyNaCl
Key derivation HKDF-SHA256 over (DH output ‖ PSK)
Transport TLS with per-invocation self-signed cert
Cert trust Fingerprint pinned in the QR code
Verification 12-digit Short Authentication String (compare on both screens)
Key storage Process memory only — zeroed on exit
Attack surface No open port when not actively sharing

TerminalSync refuses to run detached: it checks isatty() on stdin/stdout and rejects execution if its parent is PID 1. There is no daemon mode.

Requirements

  • Python 3.11+
  • macOS or Linux
  • Phone with a modern browser (Safari, Chrome)

Roadmap

  • Phase 0: PTY + WebSocket validation
  • Phase 1: Full encryption, QR pairing, web client
  • Phase 2: Native iOS/Android app (React Native, Keychain/Keystore vault, push notifications)
  • Phase 3: Optional zero-knowledge relay for NAT traversal without Tailscale

Contributing

Issues and PRs welcome. See docs/architecture.md for design decisions and protocol details.

License

MIT — see LICENSE.