Skip to main content

TermFace

Secure terminal video call. Your webcam rendered as color ASCII art, with end-to-end encrypted peer-to-peer calls.

Features

Stable (TCP Transport)

  • End-to-end encryption — X25519 key exchange + XSalsa20-Poly1305 (libsodium)
  • Opus audio codec — 24kHz at 32kbps, echo cancellation, noise gate
  • zstd compression — with backward-compatible header detection
  • Session strings — share happy-sunset-ocean instead of IP addresses
  • Auto-reconnection — exponential backoff with up to 5 retries
  • Call quality stats — real-time RTT, bandwidth, and duration display
  • LAN discovery — automatic peer discovery on local network
  • Chat — in-call text messaging
  • File transfer — with SHA-256 checksum verification and progress display
  • Screenshots — save ASCII art as .txt and .png
  • Recording — capture video/audio to AVI/WAV files
  • Mute/camera controls — toggle mic and camera during calls
  • Background effects — blur and removal (requires MediaPipe)

Experimental (WebRTC Transport)

  • WebRTC data channel — for chat and control messages
  • RTP media tracks — camera and microphone via aiortc
  • Remote media rendering — receive and display remote video as ASCII
  • ICE configuration — STUN/TURN server support

In Progress

  • SFU integration — group calls via LiveKit/Janus (planned)
  • Structured terminal UI — status bar, chat panel, participant list (planned)

Install

From PyPI

pip install TermFace

With optional dependencies:

# Full install (audio, screen, compression, WebRTC)
pip install "TermFace[full]"

# Just audio support
pip install "TermFace[audio]"

# Just WebRTC support
pip install "TermFace[webrtc]"

From Source

git clone https://github.com/Yash12b/TermFace.git
cd TermFace
pip install -e ".[dev]"

Quick Start

ASCII Webcam (local)

ascii-cam

Video Call

# Person A (receiver) — start first, wait for incoming
termface facetime

# Person B (caller) — connect to A's IP
termface facetime --target 192.168.1.100

With Session Strings

# Person A starts with a session string
termface facetime --session happy-sunset-ocean

# Person B joins using the same session string
termface facetime --session happy-sunset-ocean

WebRTC Call (Experimental)

# Requires: pip install "TermFace[webrtc]"

# Person A (answerer)
termface webrtc --role answerer --room myroom

# Person B (offerer)
termface webrtc --role offerer --room myroom --camera --microphone

Keyboard Controls

Key Action
t Open chat (Enter to send, Esc to cancel)
f Send file
m Toggle microphone mute
v Toggle camera on/off
p Toggle push-to-talk mode
1-4 Color mode: mono / grayscale / color / invert
e Toggle edge detection
b Toggle background blur
r Toggle recording (connected) / background removal (idle)
c Cycle character set
+/- Adjust brightness
[/] Adjust contrast
s Take screenshot (saves .txt and .png)
q Quit

Architecture

┌─────────────────────────────────────────────┐
│  Terminal UI (ASCII rendering)              │
├─────────────────────────────────────────────┤
│  Media Layer                                │
│  ├── VideoProcessor (capture → resize → JPEG)│
│  ├── AudioSystem (PyAudio + Opus codec)     │
│  └── FrameCompressor (zstd compression)     │
├─────────────────────────────────────────────┤
│  Protocol Layer                             │
│  ├── Frame (binary framing)                 │
│  ├── Encryptor (XSalsa20-Poly1305)          │
│  └── MediaPacket (sequence numbers)         │
├─────────────────────────────────────────────┤
│  Network Layer                              │
│  ├── TCPMediaServer/Client (TCP transport)  │
│  ├── AiortcTransport (WebRTC, optional)     │
│  └── DiscoveryService (STUN + LAN)          │
├─────────────────────────────────────────────┤
│  Signaling Layer                            │
│  ├── SignalingClient/Server (TLS relay)     │
│  └── Invite tokens (HMAC-SHA256)            │
└─────────────────────────────────────────────┘

Security

  • Encryption enabled by default for all calls with session strings
  • X25519 key exchange for shared secret derivation
  • XSalsa20-Poly1305 authenticated encryption (AEAD)
  • Sequence numbers with replay protection
  • Key rotation every 256 messages
  • Invite tokens with expiration and room scoping

To disable encryption (not recommended):

termface facetime --no-encrypt

Diagnostics

# Check system requirements
termface doctor

# Update to latest version
termface update

Requirements

  • Python 3.10+
  • OpenCV (opencv-python)
  • NumPy (numpy)
  • PyNaCl (PyNaCl) — for encryption

Optional:

  • PyAudio + opuslib — for audio
  • mss — for screen capture
  • zstandard — for compression
  • aiortc — for WebRTC

License

MIT

Metadata

Release files for TermFace 3.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TermFace 3.4.1
File Size Uploaded Provenance Actions
termface-3.4.1.tar.gz 66.2 kB Without provenance Details for termface-3.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for TermFace 3.4.1
File Interpreter ABI Platform Actions
termface-3.4.1-py3-none-any.whl Python 3 none any Details for termface-3.4.1-py3-none-any.whl

Total release size: 133.4 kB

Release files / termface-3.4.1.tar.gz

Download URL termface-3.4.1.tar.gz
Size 66.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb3f981c74e0d6379c8c6c536a51f7a4a8b9f0780bdea72fff6b134c0af08114
BLAKE2b-256 checksum
How to use checksums
a3532d07a68051394950d9bfd6b38ffd36ec634cb6cefff3c7d60a50ef557c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / termface-3.4.1-py3-none-any.whl

Download URL termface-3.4.1-py3-none-any.whl
Size 67.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2234c9d6f06914b9e92e0cef1d08525282a467c8b7142bb87ad6b625c33ba43f
BLAKE2b-256 checksum
How to use checksums
bb1ba3bd33343b17fa40e2b981cbd3c9df25a9c937aa114a45e466ebf5fd6ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for TermFace 3.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page