Metadata-Version: 2.2
Name: pyRetroTerm
Version: 0.2.1
Summary: pyRetroTerm - A PyQt6 Terminal Emulator with Real-time Telemetry and Retro Themes
Home-page: https://github.com/scottpeterman/pyretroterm
Author: Scott Peterman
Author-email: scottpeterman@gmail.com
Keywords: terminal,ssh,network,automation,telemetry,monitoring,pyqt6
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Topic :: System :: Networking :: Monitoring
Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: backports.tarfile>=1.2.0
Requires-Dist: bcrypt>=4.2.1
Requires-Dist: certifi>=2024.12.14
Requires-Dist: cffi>=1.17.1
Requires-Dist: charset-normalizer>=3.4.1
Requires-Dist: click>=8.1.8
Requires-Dist: colorama>=0.4.6
Requires-Dist: cryptography>=44.0.0
Requires-Dist: docutils>=0.21.2
Requires-Dist: idna>=3.10
Requires-Dist: importlib_metadata>=8.5.0
Requires-Dist: jaraco.classes>=3.4.0
Requires-Dist: jaraco.context>=6.0.1
Requires-Dist: jaraco.functools>=4.1.0
Requires-Dist: keyring>=25.6.0
Requires-Dist: logicmonitor-sdk>=3.0.222
Requires-Dist: markdown-it-py>=3.0.0
Requires-Dist: mdurl>=0.1.2
Requires-Dist: more-itertools>=10.6.0
Requires-Dist: napalm>=5.0.0
Requires-Dist: nh3>=0.2.20
Requires-Dist: packaging>=24.2
Requires-Dist: paramiko>=3.5.0
Requires-Dist: pkginfo>=1.12.0
Requires-Dist: pycparser>=2.22
Requires-Dist: Pygments>=2.19.1
Requires-Dist: PyNaCl>=1.5.0
Requires-Dist: pynetbox>=7.4.1
Requires-Dist: PyQt6>=6.8.0
Requires-Dist: PyQt6-Charts>=6.8.0
Requires-Dist: PyQt6-Charts-Qt6>=6.8.1
Requires-Dist: PyQt6-Qt6>=6.8.1
Requires-Dist: PyQt6-WebEngine>=6.8.0
Requires-Dist: PyQt6-WebEngine-Qt6>=6.8.1
Requires-Dist: PyQt6_sip>=13.9.1
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: pywin32-ctypes>=0.2.3
Requires-Dist: PyYAML>=6.0.2
Requires-Dist: qasync>=0.27.1
Requires-Dist: readme_renderer>=44.0
Requires-Dist: requests>=2.32.3
Requires-Dist: requests-toolbelt>=1.0.0
Requires-Dist: rfc3986>=2.0.0
Requires-Dist: rich>=13.9.4
Requires-Dist: six>=1.17.0
Requires-Dist: twine>=6.0.1
Requires-Dist: typing_extensions>=4.12.2
Requires-Dist: urllib3>=2.3.0
Requires-Dist: zipp>=3.21.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# pyRetroTerm
![Screenshot](https://raw.githubusercontent.com/scottpeterman/pyretroterm/main/screenshots/0_2_0/radar.svg)

A modern terminal emulator built with PyQt6, featuring dynamic themes, real-time telemetry, and advanced terminal capabilities.

![Screenshot](https://raw.githubusercontent.com/scottpeterman/pyretroterm/main/screenshots/0_2_0/slides1.gif)
![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg)
![Python](https://img.shields.io/badge/python-3.9+-blue.svg)

## Features

### Core Features

#### Telemetry Interface Features
- Modern terminal emulator with three-pane adaptive layout:
  - Left: Session management and device navigation
  - Center: Terminal interface with full emulation
  - Right: Device telemetry and status panels
- Dynamic theme system with live preview and hot-reload
- Multi-tabbed terminal support with session persistence
- Quick connect functionality for rapid device access
- Session search and filtering capabilities
- Adjustable layouts with resizable panes

#### Device Monitoring
- Real-time interface status monitoring with UP/DOWN indicators
- Live system resource tracking (CPU, Memory, Temperature)
- Environmental monitoring dashboard
- Automatic neighbor discovery via LLDP
- Debug logging with timestamped events
- Default route and network topology visualization

#### Terminal Capabilities
- Full SSH terminal emulation
- Secure credential management with encryption
- Multiple device type support (Linux, Cisco IOS, Arista EOS, etc.)
- Sessions organization and persistence
- Customizable text rendering and display options
- Zoom controls for accessibility

### Dynamic Theming System
- Theme configuration via external JSON files for easy customization
- Rich set of included themes: Cyberpunk, CRT (Amber/Green), Dark/Light, Borland, Gruvbox, Nord, and more
- Simple theme creation and modification without code changes
- Real-time theme switching and reloading

### Real-Time Telemetry
- Live device monitoring and statistics
- Interface status tracking
- Environmental monitoring (CPU, Memory, Temperature, Power, Fans)
- Real-time device information updates
- LLDP neighbor discovery

### Integration Capabilities

#### Netbox Integration

- Bulk export of device configurations, organizing folders by site
- Preserves device metadata (model, serial, vendor info)
- SSL verification options for internal deployments
- Progress tracking for large deployments

#### LogicMonitor Integration
- Automated device import from LogicMonitor monitoring platform
- Geographic site-based organization
- Secure API key authentication
- Support for custom SSL certificates (e.g., Zscaler)
- Intelligent property mapping (model, serial, version)
- Progress tracking and status updates
- Configurable batch processing
- Persistence to YAML file for sessions use

#### Additional Integration Features
- Portable session management with YAML configuration
- Plugin system for extensibility
- Automated credential management
- Bulk import/export capabilities

## Installation

### Via pip

```bash
pip install pyretroterm
pyretroterm
```

### From source

```bash
git clone https://github.com/scottpeterman/pyretroterm.git
cd pyretroterm
pip install -r requirements.txt
python -m pyretroterm.pyretroterm
```

## Quick Start

1. Launch the application:
```bash
pyretroterm
```

2. For console mode:
```bash
pyretroterm-con
```

3. Install theme pack (optional but recommended):
   ```bash
   # Create themes directory in your installation
   mkdir themes
   
   # Download and extract theme pack
   curl -LO https://raw.githubusercontent.com/scottpeterman/pyretroterm/main/themes.zip
   unzip themes.zip -d themes/
   ```
   
4. On first launch:
   - Set up a master password for credential management
   - Configure your session settings
   - Choose your preferred theme from the expanded theme collection
   - If themes don't appear, ensure theme JSON files are in the 'themes' directory

## Interface Overview

### Main Window Layout
The interface is divided into three main sections:
- **Left Panel**: Session management, search, and quick connect
- **Center Panel**: Active terminal session with full terminal emulation
- **Right Panel**: Device telemetry, controls, and monitoring

### Device Information Display
- Real-time device status and information
- Interface status monitoring with visual indicators
- Environmental metrics (CPU, Memory, Temperature, etc.)
- LLDP neighbor discovery and topology
- Routing table and network information

### Theme System
The application includes several professionally designed themes:
- Cyberpunk (neon blue accents)
- CRT Amber/Green (classic terminal looks)
- Dark/Light modes for different environments
- Borland (nostalgic IDE style)
- Modern themes (Nord, Gruvbox, Solarized)
Each theme provides consistent styling across all panels and includes:
- Custom border designs and panel layouts
- Color-coded status indicators
- Readable typography and contrast ratios
- Live preview and hot-reload capability

## Device Support

### Supported Network Operating Systems
- Cisco IOS
- Arista EOS
- Cisco NXOS (SSH)
- Juniper JUNOS
- Linux/Unix Systems

### Telemetry Support
Each platform supports different levels of telemetry collection:

#### Full SSH Based Telemetry Support
- Interface status monitoring
- CPU and memory statistics
- Environmental monitoring (temperature, power, fans)
- LLDP neighbor discovery
- Routing table information
- Hardware inventory
- System information

#### Platform-Specific Capabilities
- **Linux/Unix**:
  - Dynamic hardware detection
  - Detailed CPU core monitoring
  - Memory usage with buffer/cache analysis
  - VMware environment detection
  - Temperature sensors with thresholds
  - Power supply status
  - Fan speed monitoring
  - Hardware platform detection
  - Enhanced security with sudo support
  
- **Network Devices** (IOS, EOS, NXOS, JUNOS):
  - Interface statistics
  - Protocol states
  - Hardware health monitoring
  - Power and cooling status
  - Configuration analysis
  - Routing protocol information

## Extensibility

### Driver Architecture
pyRetroTerm features a modular driver architecture that allows easy addition of new device support:

```python
class CustomDriver:
    def __init__(self, hostname, username, password, optional_args=None):
        self.hostname = hostname
        self.username = username
        self.password = password
        self.optional_args = optional_args or {}
        
    def get_facts(self):
        # Implement device fact collection
        pass
        
    def get_environment(self):
        # Implement environmental monitoring
        pass
        
    def get_interfaces(self):
        # Implement interface status collection
        pass
```

### Adding New Device Support
1. Create a new driver class implementing the standard interface
2. Add device-specific command parsing
3. Implement telemetry collection methods
4. Register the driver with the platform

### Example: Custom Linux Driver Features
- Robust error handling and recovery
- Flexible command execution
- Privilege escalation management
- Dynamic capability detection
- Comprehensive hardware discovery
- Detailed system information collection

## Configuration

### Integration Configuration

#### Netbox Setup
1. Obtain your Netbox API token from your Netbox instance
2. Configure the connection:
   - Enter your Netbox URL (e.g., "http://netbox.yourcompany.com")
   - Input your API token
   - Optionally disable SSL verification for internal deployments
3. Click "Download" to start the import process
4. Save the generated YAML file

#### LogicMonitor Setup
1. Gather your LogicMonitor credentials:
   - Company name
   - Access ID
   - Access Key
2. Optional: Configure SSL certificate path for Zscaler
3. Run the import process
4. Save the generated YAML configuration

### Sessions
Sessions are configured via YAML files. Example configuration:

```yaml
- folder_name: Example
  sessions:
  - DeviceType: linux
    Model: vm 
    SerialNumber: ''
    SoftwareVersion: ''
    Vendor: ubuntu
    credsid: '1'
    display_name: T1000
    host: 10.0.0.104
    port: '22'
```

### Custom Themes
Themes are defined in JSON files for easy customization and can be installed from the themes pack:

1. Download the official theme pack:
   ```bash
   curl -LO https://raw.githubusercontent.com/scottpeterman/pyretroterm/main/themes.zip
   ```

2. Extract to your themes directory:
   ```bash
   unzip themes.zip -d themes/
   ```
3. Themes folder is scanned at startup (or via UI) and dynamically loaded

4. Create new themes by adding JSON files to the themes directory

Example theme structure:
```json
{
  "name": "my-custom-theme",
  "colors": {
    "background": "#1e1e1e",
    "text": "#ffffff",
    "primary": "#0affff",
    "secondary": "#888888",
    "border": "#444444"
  }
}
```

## Security Features
- Protection of stored secrets
- PBKDF2-HMAC-SHA256 key derivation (480,000 iterations)
- Fernet (AES-128-CBC) encryption with HMAC authentication
- Platform-specific secure
