Skip to main content

VP Terminal - Advanced CLI UI Library

vpterm-vp is a comprehensive terminal UI library for Python CLIs, inspired by modern interfaces like Claude Code.

✨ Features

  • Component System: Modular UI components with layout management
  • Interactive Menus: Dropdown menus with keyboard navigation
  • Tabbed Interface: Multi-tab applications with easy switching
  • Rich Layouts: FlexBox and Grid layouts for responsive design
  • Widget Library: Pre-built components (TextBox, Alert, Badge, etc.)
  • ANSI Styling: Full color and style support with auto-detection
  • Progress Bars: Visual progress indicators and spinners
  • Tables & Panels: Structured data display
  • Window Management: Full application window framework

🚀 Quick Start

Install:

pip install vpterm-vp

This package now focuses on terminal primitives and rendering components. For a real training logger demo with live updates and parallel workers, use the sample in morphlog-vp.

📖 Basic Usage

from vpterm import Window, TextBox, Title, Alert

# Create a window
window = Window("My App")
window.set_header(Title("Welcome to VP Terminal"))

# Add content
window.set_content(TextBox("Hello, World!"))
window.set_footer(Alert("Ready!", "success"))

# Display
window.display()

🧩 Components

Core Components

  • Component: Base class for all UI elements
  • Container: Groups multiple components
  • FlexBox: Flexible layout container
  • GridLayout: Grid-based layout

UI Widgets

  • TextBox: Multi-line text display
  • Title: Large, styled title
  • Alert: Status messages (success/warning/error/info)
  • Badge: Small status indicators
  • Box: Bordered content container
  • Spacer: Flexible spacing
  • Divider: Visual separators

Interactive Elements

  • Menu: Dropdown menu with items
  • MenuBar: Horizontal menu bar
  • Tab: Individual tab content
  • TabBar: Tab navigation
  • TabGroup: Multi-group tab management

Data Display

  • Table: Columnar data display
  • Panel: Bordered information panels
  • KeyValue: Key=value formatted output

Application Framework

  • Window: Main application window
  • StatusBar: Bottom status display
  • ProgressBar: Visual progress indicators

🎨 Styling

from vpterm import Style

# Colors
print(Style.red("Error message"))
print(Style.green("Success!"))
print(Style.blue("Information"))

# Styles
print(Style.bold("Important text"))
print(Style.underline("Underlined"))
print(Style.invert("Highlighted"))

# Combined
print(Style.bold(Style.red("Critical error!")))

📐 Layouts

FlexBox Layout

from vpterm import FlexBox, Direction, TextBox

layout = FlexBox(direction=Direction.VERTICAL, gap=1)
layout.add_child(TextBox("First item"))
layout.add_child(TextBox("Second item"))

Grid Layout

from vpterm import GridLayout, Box

grid = GridLayout(columns=3, gap=2)
for i in range(9):
    grid.add_child(Box(TextBox(f"Item {i+1}")))

🎯 Interactive Menus

from vpterm import MenuBar, Menu, Window

menu_bar = MenuBar()

file_menu = Menu("File")
file_menu.add_item("New", "Ctrl+N", lambda: print("New!"))
file_menu.add_item("Open", "Ctrl+O", lambda: print("Open!"))
menu_bar.add_menu(file_menu)

window = Window("My App")
window.set_menu_bar(menu_bar)

📊 Tables and Panels

from vpterm import Table, Panel

# Table
table = Table(["Name", "Age", "City"])
table.add_row(["Alice", "25", "NYC"])
table.add_row(["Bob", "30", "LA"])

# Panel
panel = Panel("User Info")
panel.add_kv("Name", "Alice")
panel.add_kv("Status", "Active")

🏗️ Architecture

vpterm/
├── core/           # Component system & layouts
├── ui/             # Widgets & interactive elements
├── rendering/      # Styling & display components
├── window/         # Application framework
├── terminal/       # Terminal interaction
└── data/           # Data formatting

🔧 Advanced Features

  • Responsive Design: Automatic terminal size detection
  • Keyboard Navigation: Full keyboard control for menus and tabs
  • Live Updates: Progress bars and spinners for long operations
  • Color Detection: Automatic ANSI color support detection
  • Cross-platform: Windows, macOS, Linux support

📝 API Reference

For detailed API documentation, see the docstrings in each module.

🤝 Contributing

Contributions welcome! The library is designed to be modular and extensible.

📄 License

MIT License - see LICENSE file for details.

Metadata

Release files for vpterm-vp 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vpterm-vp 3.0.0
File Size Uploaded Provenance Actions
vpterm_vp-3.0.0.tar.gz 23.4 kB Without provenance Details for vpterm_vp-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vpterm-vp 3.0.0
File Interpreter ABI Platform Actions
vpterm_vp-3.0.0-py3-none-any.whl Python 3 none any Details for vpterm_vp-3.0.0-py3-none-any.whl

Total release size: 50.2 kB

Release files / vpterm_vp-3.0.0.tar.gz

Download URL vpterm_vp-3.0.0.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
26f5ed16a6d6eadae9eb53277b7d5cb13ca9e99130c9dffc2d0b2f5053f73717
BLAKE2b-256 checksum
How to use checksums
3a18d661c3124c4d67c184501c3697a776b39175d2d66eae5bb1d1a449728472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / vpterm_vp-3.0.0-py3-none-any.whl

Download URL vpterm_vp-3.0.0-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a017e88cf99e4d5d35f336391c0a51369c8d8ac83f3e0ecde20185890a9439b6
BLAKE2b-256 checksum
How to use checksums
7b24601d40d40717422f2e53cc943c7a0f5bb8f27ab44506112de429f05384ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for vpterm-vp 3.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page