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

Download files

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

Source Distribution

meadows_tui-0.1.0.tar.gz (96.1 kB view details)

Uploaded Source

Built Distribution

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

meadows_tui-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file meadows_tui-0.1.0.tar.gz.

File metadata

  • Download URL: meadows_tui-0.1.0.tar.gz
  • Upload date:
  • Size: 96.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for meadows_tui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a693e4aa4b53114668a57615954439fbc80d1fab03bf7e03f7937f57af527db2
MD5 8a5c8c9b666cd5458d6229d98d29ca31
BLAKE2b-256 bf8746fececcfd76cc396f1556ec60eb2314d540568448225980663b5edfc436

See more details on using hashes here.

File details

Details for the file meadows_tui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: meadows_tui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for meadows_tui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 007f3df545a581e70bc7a1f18e17fcb94fe507bc4b7468aec39976ca9472c9c5
MD5 c39c180c1ab69b53948de46a642aebbb
BLAKE2b-256 5f6626e61a2175d8ac80544d2db5394e088227c1470a2ad774a2dfbcbc816649

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 Sentry Error logging StatusPage Status page