--- id: textual-serve version: "1.1.3" license: MIT license_treatment: permissive maintenance: aging --- # textual-serve — Turn your Textual TUIs in to web applications License: permissive · Maintenance: aging · Downloads: 1.4M/mo ## 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 above — 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 pip install textual-serve uv add textual-serve 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_current - Install friction: low - Maintenance: aging - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags textual app to web browser, terminal ui in browser, tui web server, textual web application, run terminal app online, tui-to-web, textual-ecosystem, browser-terminal [View on SkillFed](https://skillfed.io/packages/textual-serve) · [View on PyPI](https://pypi.org/project/textual-serve/)