Skip to main content

Encrypted terminal chat app built with Python and Textual

Project description

Rune

Rune is an encrypted terminal chat application built with Python and Textual. It provides a terminal user interface for creating or joining a two-person chat room through a relay server while keeping chat message contents end-to-end encrypted between the two clients.

The project goal is to make private peer-to-peer style messaging usable from the terminal. The relay server coordinates connections, invite codes, room pairing, and encrypted payload forwarding, but it does not receive plaintext chat messages or private keys.

Prerequisites

Rune requires:

  • Python 3.13 or newer
  • A terminal that can run Textual applications
  • pip for normal installation
  • uv for local development workflows

The application depends on Textual for the TUI, PyNaCl for client-side encryption, and cachetools for relay invite expiration behavior.

Install

Install the published package from PyPI:

pip install rune-chat

After installation, launch the client TUI with:

rune

Launch the relay server TUI with:

rune server

You can also pass server options:

rune server --host localhost --port 5001 --invite-code-ttl-seconds 300

Basic Usage

Start the relay server first:

rune server

Then start two client terminals:

rune

In the first client, connect to the relay and create a room:

/connect
/create

Share the generated invite code with the second client. In the second client:

/connect
/join

The /join command opens a modal where the invite code can be entered.

Developer Notes

Install development dependencies with uv:

uv sync --dev

Run the client in development:

make run

Run the server in development:

make server

Run the client with Textual dev tooling:

make client-dev

Run the server with Textual dev tooling:

make server-dev

Open the Textual console:

make dev-console

Run tests:

make test

Run linting:

make lint

Format code:

make format

Apply automatic lint fixes and formatting:

make fix

Build the package:

make build

Security Model

Rune uses fresh temporary PyNaCl key pairs for each chat session. Public keys are exchanged through the relay as part of invite creation and joining. Private keys remain in memory on each client and are not written to disk.

Chat messages are encrypted locally before being sent to the relay. The relay forwards only encrypted payloads containing ciphertext and nonces. It can still observe metadata such as connection timing, invite usage, payload size, and room pairing state.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rune_chat-1.0.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rune_chat-1.0.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file rune_chat-1.0.0.tar.gz.

File metadata

  • Download URL: rune_chat-1.0.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for rune_chat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b51314ad4956325f4c5775d4b9bd61a3ee7bc5675a5bd9a5d9c4e0333188386
MD5 60055d6de1d43b55698dcac8dc7245f8
BLAKE2b-256 6d95574fbe8fdbe79a638fb1c80ae44d236613815ed997915ab6952771c6a1d5

See more details on using hashes here.

File details

Details for the file rune_chat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rune_chat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for rune_chat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58cd51532877499637edc79244fe718e1f8e71bec457c8c6ab8df7fd866c1e2e
MD5 7dd3029873761f372fd91fbcd18c6c4e
BLAKE2b-256 2f708872ef5d169162fa6afc16814cc4f9de04938f6daa10943a4db041107b8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page