Skip to main content

Terminal User Interface for Hop3 PaaS

Project description

hop3-tui

Terminal User Interface for Hop3 PaaS.

Overview

A modern, keyboard-driven terminal interface for managing Hop3 applications, built with Textual.

Features

  • Dashboard overview: System stats, app summary, recent activity
  • Application management: List, filter, start/stop/restart apps
  • Environment variables: View, add, edit, delete with sensitive value hiding
  • Real-time log streaming: Filter logs, pause/resume, auto-scroll
  • Chat interface: Interactive command line with tab completion
  • System monitoring: CPU, memory, disk usage and service status
  • Addon management: Create, attach, detach PostgreSQL, Redis, MySQL
  • Backup management: Create, restore, delete app backups
  • Connection status indicator: Visual feedback for server connectivity

Installation

pip install hop3-tui

Quick Start

# Set your server URL
export HOP3_SERVER_URL="https://hop3.example.com"
export HOP3_TOKEN="your-api-token"

# Run the TUI
hop3-tui

Configuration

Configuration via environment variables or ~/.config/hop3/tui.toml:

Variable Description Default
HOP3_SERVER_URL Server URL http://localhost:5000
HOP3_TOKEN API authentication token -
HOP3_TUI_THEME Color theme (dark/light) dark

Config File

[server]
url = "https://hop3.example.com"
token = "your-api-token"

[display]
theme = "dark"
refresh_interval = 5

Keyboard Shortcuts

Global

Key Action
d Dashboard
a Apps list
s System status
o Addons
b Backups
c Chat interface
? Help
q Quit

Navigation

Key Action
j/Down Move down
k/Up Move up
Enter Select
Escape Go back
/ Filter
R Refresh

Apps

Key Action
s Start app
S Stop app
r Restart app
l View logs
e Environment variables

Architecture

hop3-tui/
├── src/hop3_tui/
│   ├── __main__.py       # Entry point
│   ├── app.py            # Main Hop3TUI class with connection state
│   ├── config.py         # Configuration loading (env vars + TOML)
│   ├── api/
│   │   ├── client.py     # JSON-RPC client with error handling
│   │   └── models.py     # Pydantic data models
│   ├── screens/
│   │   ├── dashboard.py  # Overview with app counts
│   │   ├── apps.py       # App list and management
│   │   ├── app_detail.py # Single app view
│   │   ├── logs.py       # Real-time log streaming
│   │   ├── env_vars.py   # Environment variable editor
│   │   ├── system.py     # System status
│   │   ├── addons.py     # Addon management
│   │   ├── backups.py    # Backup management
│   │   └── chat.py       # Command interface
│   └── widgets/
│       ├── confirmation.py  # Confirmation dialogs
│       ├── status_panel.py  # Resource meters
│       └── status_badge.py  # Status indicators
└── tests/                # pytest test suite (167 tests)

Connection Handling

The TUI tracks connection state to the Hop3 server:

  • Connected (green indicator): Server is reachable
  • Disconnected (red indicator): Connection lost, will retry
  • Connecting (yellow indicator): Attempting to connect

Connection failures are tracked and the state updates automatically. The UI continues to show cached data while disconnected.

Development

# Run with auto-reload
textual run --dev src/hop3_tui/app.py

# Run tests
uv run pytest tests/ -v

# Lint and format
uv run ruff check src/
uv run ruff format src/

Documentation

Related Packages

  • hop3-server - The server that hop3-tui communicates with
  • hop3-cli - Alternative command-line interface

License

Apache-2.0 - Copyright (c) 2024-2026, Abilian SAS

Project details


Download files

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

Source Distribution

hop3_tui-0.5.0.dev3.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

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

hop3_tui-0.5.0.dev3-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

Details for the file hop3_tui-0.5.0.dev3.tar.gz.

File metadata

  • Download URL: hop3_tui-0.5.0.dev3.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hop3_tui-0.5.0.dev3.tar.gz
Algorithm Hash digest
SHA256 9d1afc4c3c1e6f23fbcec3eb4f4c1cb9089fc41055ba03afbcb30e360fb76fc1
MD5 282d4ba758d4f82cdfaee4cd1ec5d521
BLAKE2b-256 5f0de3dcc6fca44e4f3310d0435065784e03b5dbf8d2bd2c5cdb0a759f957b86

See more details on using hashes here.

File details

Details for the file hop3_tui-0.5.0.dev3-py3-none-any.whl.

File metadata

  • Download URL: hop3_tui-0.5.0.dev3-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hop3_tui-0.5.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 afa053b1f2eccdc9043d2bd033270c7d8a25fde9995548a84b31ee73d287c2cd
MD5 dde91539a287951b231edc3499ce6038
BLAKE2b-256 7a6d9d0e9acdebc21ef314aa5883dad5622e82ece28048be438df97715e552b9

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