skillfed

textual-serve

Turn your Textual TUIs in to web applications

textual-serve v1.1.3 1.4M downloads/30d#4,001 on PyPI401
Permissive license MIT AGING released

What it is and what it does

textual-serve bridges terminal user interfaces (TUIs) built with Textual into web browsers. Instead of running a Textual app only in a terminal, you wrap it in a Server instance and call serve() to launch an HTTP server that spawns the app in a subprocess and streams its UI to the browser via WebSocket. The communication uses a custom protocol designed to prevent arbitrary shell access—users can only interact with the app as its author intended.

The package is built on aiohttp for the web server, jinja2 for HTML templating, and rich for terminal rendering. It supports configuration of host, port, title, and paths to static assets and templates. Multiple instances can run across available CPUs. This is useful for sharing terminal tools with non-terminal users, adding a web interface to existing CLI applications, or running TUIs in restricted environments where terminal access is unavailable.

Use it for:

  • Share a terminal-based tool (e.g., a log viewer or system monitor) with team members via a web link without requiring terminal access.
  • Add a web UI to an existing Textual application with minimal code changes—three lines to wrap and serve.
  • Run a Textual app in an environment where SSH or terminal access is blocked or impractical.
  • Prototype or demo a TUI to users who are unfamiliar with terminal interfaces.
  • Serve multiple instances of the same Textual app across CPU cores for concurrent users.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Runs any Textual terminal application in a web browser by wrapping it in a lightweight HTTP server that communicates with the app via WebSocket.

Yes, if you have a Textual application and want to expose it to web users with minimal code. The low install friction, permissive license, and straightforward API make it a practical choice. However, be aware the project is aging (286 days since last release) and maintenance may be slower; evaluate whether the WebSocket latency and subprocess overhead are acceptable for your use case before deploying to production.

Install

textual-serve on PyPI

pip

pip install textual-serve

uv

uv add textual-serve

poetry

poetry add textual-serve

Installing textual-serve

Before you install

Low friction—pure Python wheel with five runtime dependencies (aiohttp, aiohttp-jinja2, jinja2, rich, textual). Maintenance status is aging; last commit was 2025-11-01 and the package is 286 days past its latest release, so expect slower response to issues.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install textual-serve

from textual_serve.server import Server

server = Server("python -m textual")
server.serve()

Requires Textual to be installed and a valid shell command that launches a Textual app; server runs on localhost:8000 by default.

Verify before relying

  • Whether the WebSocket protocol overhead is acceptable for latency-sensitive terminal interactions.
  • Whether subprocess isolation scales well under concurrent browser connections.
  • Production deployment guidance and recommended proxy/load-balancing setup.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 5 — aiohttp, aiohttp-jinja2, jinja2, rich, textual
Maintenance aging — 286 days since the last release
Last repo commit
First released
Downloads 1,362,501/month — #4,001 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: textual_serve-1.1.3-py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

textual app to web browserterminal ui in browsertui web servertextual web applicationrun terminal app online
tui-to-webtextual-ecosystembrowser-terminal

More WWW/HTTP packages