NATS TUI
A terminal user interface for NATS cluster management, built with Textual.
Features
- Connection Management: Connect to NATS servers with optional authentication
- TLS Support: Secure connections with CA certificates, mutual TLS, and insecure mode for self-signed certs
- Subject Browser: Discover and browse subjects with hierarchical tree view
- Message Publishing: Publish messages with custom payloads and headers
- Message Subscribing: Subscribe to subjects with wildcard support and real-time display
- JetStream Streams: Create, delete, purge, and manage JetStream streams
- JetStream Consumers: Create, delete, pause/resume consumers
- Theming: 19+ built-in themes including light and dark modes
- Configuration: TOML-based config with named connection profiles
Installation
pip install nats-tui
Quick Start
# Connect to local NATS server
nats-tui -s nats://localhost:4222
# Connect with TLS
nats-tui -s tls://server:4222 --tls --tls-ca-cert /path/to/ca.crt
# Use a saved connection profile
nats-tui -P prod
# Launch with a specific theme
nats-tui -t nats-tui-light
Usage
nats-tui [OPTIONS]
Connection:
-s, --server URL NATS server URL (nats:// or tls://)
-P, --profile NAME Connection profile name from config file
TLS:
--tls Enable TLS connection
--tls-ca-cert PATH Path to CA certificate file
--tls-cert PATH Path to client certificate (for mutual TLS)
--tls-key PATH Path to client key (for mutual TLS)
--tls-insecure Disable certificate verification (insecure)
Configuration:
-c, --config PATH Path to config file (TOML)
-t, --theme NAME Theme name (see --help for available themes)
--version Show version and exit
--help Show help and exit
TLS Connections
nats-tui supports secure TLS connections to NATS servers.
Basic TLS with CA Certificate
nats-tui -s tls://server:4222 --tls --tls-ca-cert /path/to/ca.crt
TLS with Self-Signed Certificates (Insecure)
nats-tui -s tls://server:4222 --tls --tls-ca-cert /path/to/ca.crt --tls-insecure
Mutual TLS (mTLS) with Client Certificates
nats-tui -s tls://server:4222 --tls \
--tls-ca-cert /path/to/ca.crt \
--tls-cert /path/to/client.crt \
--tls-key /path/to/client.key
TLS in Configuration Profiles
[profiles.prod]
server = "tls://prod.example.com:4222"
tls = true
tls_ca_cert = "/path/to/ca.crt"
[profiles.dev]
server = "tls://dev.example.com:4222"
tls = true
tls_ca_cert = "/path/to/ca.crt"
tls_insecure = true # For self-signed certificates
[profiles.mtls]
server = "tls://secure.example.com:4222"
tls = true
tls_ca_cert = "/path/to/ca.crt"
tls_cert = "/path/to/client.crt"
tls_key = "/path/to/client.key"
TLS is automatically enabled when using tls:// URLs.
Key Bindings
| Key | Action |
|---|---|
q |
Quit |
? / F1 |
Show help |
c |
Open connection dialog |
d |
Disconnect |
r |
Refresh current view |
Escape |
Go back |
j |
Switch to JetStream view |
p |
Publish message |
s |
Subscribe to subject |
u |
Unsubscribe |
n |
Create new stream/consumer |
Delete |
Delete selected item |
Space |
Pause/resume consumer |
Shift+P |
Purge stream |
Enter |
View consumers (in stream view) |
Configuration
NATS TUI looks for configuration files in the following locations (in order of priority):
~/.config/nats-tui/config.toml./pyproject.toml(under[tool.nats-tui])./.nats-tui.toml./nats-tui.tomlNATS_TUI_CONFIGenvironment variable (if set)-c/--configCLI option (highest priority)
Environment Variable
You can set the NATS_TUI_CONFIG environment variable to specify a config file path:
export NATS_TUI_CONFIG=/path/to/config.toml
nats-tui # Will use the config from env var
This is useful for containerized deployments where you want to pre-configure the config path.
Example Configuration
# Default profile to use when none specified
default_profile = "local"
# Default theme
theme = "nats-tui"
# Connection profiles
[profiles.local]
server = "nats://localhost:4222"
[profiles.prod]
server = "tls://prod.example.com:4222"
username = "admin"
password = "secret"
tls = true
tls_ca_cert = "/etc/nats/ca.crt"
[profiles.staging]
server = "tls://staging.example.com:4222"
tls = true
tls_ca_cert = "/etc/nats/ca.crt"
tls_insecure = true
# Custom key bindings (optional)
[keybindings]
quit = "ctrl+q"
Using Profiles
# Use the default profile from config
nats-tui
# Use a specific profile
nats-tui -P prod
# Override profile server with CLI flag
nats-tui -P prod -s tls://different-server:4222
Themes
NATS TUI includes 19+ themes. Use -t or --theme to select:
# Dark theme (default)
nats-tui -t nats-tui
# Light theme
nats-tui -t nats-tui-light
# Built-in Textual themes
nats-tui -t dracula
nats-tui -t monokai
nats-tui -t nord
Run nats-tui --help to see all available themes.
Development
Setup
# Clone the repository
git clone https://github.com/coreyellis/nats-tui.git
cd nats-tui
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
# Install in development mode
pip install -e ".[dev]"
Running Tests
pytest tests/ -v
Running the App
# From source
nats-tui
# Or directly
python -m nats_tui
Requirements
- Python 3.10+
- NATS server (for actual usage)
Dependencies
- Textual - TUI framework
- nats-py - NATS client
- rich-click - CLI with Rich formatting
- tomlkit - TOML parsing
- platformdirs - Platform-specific directories
License
MIT
Related Projects
Metadata
Release files for nats-tui 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nats_tui-0.3.0.tar.gz | 62.4 kB | With provenance | Details for nats_tui-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nats_tui-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for nats_tui-0.3.0-py3-none-any.whl |
Total release size: 148.3 kB
Release files / nats_tui-0.3.0.tar.gz
| Download URL | nats_tui-0.3.0.tar.gz |
|---|---|
| Size | 62.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a539e5ccb5d585b116324b1af2661e5d0d322a7bacd9a5b1e9b989770d47303
|
|
BLAKE2b-256 checksum How to use checksums |
eeaec097b77454a93411cccd4a2467ba99a825605a730c1985d8273becfcbefb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.
Transparency logRelease files / nats_tui-0.3.0-py3-none-any.whl
| Download URL | nats_tui-0.3.0-py3-none-any.whl |
|---|---|
| Size | 85.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
598cc59280a439319bbade3256a36c6b4a01446c09822bbd709c469b34338637
|
|
BLAKE2b-256 checksum How to use checksums |
8d77c05dfcccb571f6ecc7fad0de2b8745755e3046c11b61a3c0694936c6032b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.
Transparency logSecurity for nats-tui 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nats_tui-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.