Skip to main content

meadows-tui

MEADOWS terminal UI client: a curses-based TUI chat client for MEADOWS. Uses click for CLI argument parsing and curses for the terminal interface. Connects directly to meadows-server via Socket.IO using meadows-client.

What this package contains

  • cli.py — Click entry point with env-var support
  • app.py — Curses-based terminal app with dark/light theme, keybindings, auth flow
  • screens/auth_screen.py — JWT token paste or local secret auth
  • screens/chat_screen.py — Main chat: messages, sidebar, input
  • widgets/message_widget.py — Message rendering with quotes, reactions
  • widgets/input_widget.py — Chat input with reply quote preview
  • widgets/sidebar_widget.py — Groups, users, and bots panels
  • client_bridge.py — Adapts MeadowClient events to curses-compatible messages
  • themes.py — Dark and light color definitions (mapped to curses colors)
  • config.py — Configuration dataclass

Install

uv pip install -e ".[dev]"

Run

# With a JWT token
MEADOWS_JWT=eyJ... meadows-tui

# Or with a shared secret
MEADOWS_JWT_SECRET=secret MEADOWS_USERNAME=alice meadows-tui

# Or specify server explicitly
meadows-tui --server http://chat.example.com:8080 --token eyJ...

CLI Options

Option Env Var Default Description
--server MEADOWS_SERVER_URL http://localhost:8080 Socket.IO server URL
--token MEADOWS_JWT — JWT token (pasted)
--jwt-secret MEADOWS_JWT_SECRET — Secret for local token gen
--username MEADOWS_USERNAME — Username for local token gen
--theme MEADOWS_THEME auto dark, light, or auto
--log-level MEADOWS_LOG_LEVEL WARNING DEBUG, INFO, WARNING, ERROR

Keybindings

Key Action
Ctrl+t Toggle dark/light theme
Ctrl+b Toggle sidebar
Ctrl+n Focus input
Ctrl+g Focus groups list
Ctrl+q Quit

Architecture invariants

  1. Protocol constants only. The only import from meadows.protocol is EventName (in __init__.py).
  2. Transport via meadows-client. No raw Socket.IO usage; all transport goes through MeadowClient.
  3. Event bridge. Socket.IO events from the server are translated to curses-compatible messages in client_bridge.py.
  4. Theme support. Dark/light modes with terminal-appropriate colors (mapped to curses color constants), toggleable at runtime.
  5. PEP 420 namespace. src/meadows/tui/__init__.py exists; there is NO src/meadows/__init__.py.

Configuration (env vars)

variable default purpose
MEADOWS_SERVER_URL http://localhost:8080 server URL for Socket.IO
MEADOWS_JWT — pre-encoded JWT token
MEADOWS_JWT_SECRET — JWT secret for local token generation
MEADOWS_USERNAME — username when using JWT secret
MEADOWS_THEME auto color theme choice
MEADOWS_LOG_LEVEL WARNING logging verbosity
MEADOWS_SYSTEM_NAME MEADOWS Chat display name

Development

uv pip install -e ".[dev]"
uv pip install edwh

uv run edwh local.setup   # check/ensure env vars
uv run edwh local.test    # uv run pytest -q
uv run edwh local.lint    # uv run ruff check src tests
uv run edwh local.fmt     # uv run ruff format src tests && ruff check --fix src tests

Features

  • Multi-group chat with sidebar navigation
  • Message send/receive with typing indicators
  • Dark and light color themes (toggle at runtime)
  • Collapsible sidebar
  • Emoji reactions (quick pick from 9 emojis)
  • Reply to messages (quote preview)
  • Message removal
  • User and bot lists per group
  • JWT authentication (pasted token or local secret)
  • Auto-connect via env vars

Metadata

Release files for meadows-tui 0.1.0

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

Source distribution (sdist)

Source distribution for meadows-tui 0.1.0
File Size Uploaded
meadows_tui-0.1.0.tar.gz 96.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meadows-tui 0.1.0
File Interpreter ABI Platform
meadows_tui-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 112.4 kB

Release files / meadows_tui-0.1.0.tar.gz

Download URL meadows_tui-0.1.0.tar.gz
Size 96.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a693e4aa4b53114668a57615954439fbc80d1fab03bf7e03f7937f57af527db2
BLAKE2b-256 checksum
How to use checksums
bf8746fececcfd76cc396f1556ec60eb2314d540568448225980663b5edfc436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / meadows_tui-0.1.0-py3-none-any.whl

Download URL meadows_tui-0.1.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
007f3df545a581e70bc7a1f18e17fcb94fe507bc4b7468aec39976ca9472c9c5
BLAKE2b-256 checksum
How to use checksums
5f6626e61a2175d8ac80544d2db5394e088227c1470a2ad774a2dfbcbc816649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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