This directory is dedicated to managing and registering plugins for the UglyPTY application. Plugins are Python packages that are distributed as .whl
(Wheel) files. Some of them are purly standalone functionality. Others benefit from UglyPTY's base functionality.
The whole point of the UglyPTY project is not to solve every problem, but to provide a platform based on the tool network engineers use most - an SSH Terminal. Developers like text editors with add-on capabilites, this is just the equivilent for CLI focused engineers. Nothing in these plugins is supper special, I just wanted to provide enough examples that others could create there own tools. Both the usable .whl files, as well as original source code are included in the repo. These are all beta tools, be careful ;)
To use a plugin, download its .whl
file and save it in the ./wheels
directory where your UglyPTY application is installed.
The catalog.yaml
file contains metadata for all available plugins. Each plugin has its entry defined by the following keys:
name
: The human-readable name of the plugin.package_name
: The name used to register the plugin as a Python package. This is the name you would use if you were to install the plugin using pip.description
: A brief description of what the plugin does.import_name
: The Python import statement that would be used to load the plugin's main class or function.version
: The version number of the plugin.source_type
: The type of installation source, currently only supports "wheel".wheel_url
: The path to the.whl
file for the plugin, relative to the./wheels
directory.
Example entry:
- name: "Ugly Ace Editor"
package_name: "ugly_ace_editor"
description: "An Ace based editor with some unique features."
import_name: "uglyplugin_ace.ugly_ace.QtAceWidget"
version: "0.1.0"
source_type: "wheel"
wheel_url: "./wheels/uglyplugin_ace-0.1.0-py3-none-any.whl"
When you install a plugin through the UglyPTY Plugin Manager, the plugin's metadata is registered in a SQLite database (settings.SQLite
). This enables the application to keep track of installed plugins and their status.
The following columns are used in the installed_plugins
table:
name
: Same as thename
incatalog.yaml
.package_name
: Same as thepackage_name
incatalog.yaml
.description
: Same as thedescription
incatalog.yaml
.import_name
: Same as theimport_name
incatalog.yaml
.status
: Indicates if the plugin is currently installed.
You can extend the catalog by simply adding more entries to the catalog.yaml
file following the format shown above. After updating catalog.yaml
, you may need to refresh the Plugin Manager UI to see the new entries.
Here are some snapshots of UglyPTY-Plugins in action:
The PyQt6 Serial Terminal Widget provides a terminal interface over a com port. Network Engineers need console cable support!
The PyQt6 Windows Terminal Widget provides a terminal interface within a PyQt6 application that can interact with different shells such as cmd, PowerShell, or Windows Subsystem for Linux (WSL2). Users can execute shell commands directly from this widget.
This project is designed to run specific commands on network devices and collect their output. It's an ideal tool for network administrators who want to automate the process of gathering data from multiple network devices. The credentials used for connecting to the network devices are sourced from the same database as UglyPTY session files, with encrypted passwords. The collected data can be used for search and audit functions, as well as drive other automation. The CLI output result is stored in both a structured yaml file, and a raw text file. The meta-data in the yaml file can enable autiting, searching or other automations.
- Example Structured Data
device:
command: show lldp info remote-device detail
credsid: 1
device_type: hp_procurve
display_name: retail-swl-01
folder_name: r1
host: 10.100.10.1
timestamp: 2023-08-07 11:39
username: autoadmin
output: "\n\n LLDP Remote Device Information Detail\n\n Local Port : 1\n ChassisType\
\ : mac-address \n ChassisId : 0010f3-879897 \n PortType\
\ : mac-address \n PortId \
\ : 00 10 f3 87 98 97 \n SysName \
\ : \n System Descr : \
\ \n PortDescr : \
\ \n Pvid : \
\ \n\n System Capabilities Supported : \n System Capabilities Enabled \
\ : \n\n Remote Management Address\n\n MED Information Detail \n EndpointClass\
\ :Class1\n\n------------------------------------------------------------------------------\n\
\ Local Port : 3\n ChassisType : mac-address \n ChassisId : 0010f3-8797f3\
\ \n PortType : mac-address \
\ \n PortId : 00 10 f3 87 97 f3 \
\ \n SysName : \n System Descr :\
\ \n PortDescr :\
\ \n Pvid :\
\ \n\n System Capabilities Supported : \n System Capabilities\
\ Enabled : \n\n Remote Management Address\n\n MED Information Detail \n \
status: success
This plugin is both a test tool, as well as provides examples and guidelines for using Jinja2 templates for Network device configurations and Text Template Parser (TTP) for parsing Network Device CLI outputs.
This plugin loads a Click based cli script. It then renders a dynamic form based on the click parameters and allows the user to run the script and see the results realtime streamed to the GUI. A useful and quick way to put a front end on a script.
Using pynetbox, utility exports sites and devices from Netbox DCIM and renders them as a UglyPTY Session file. Instantly populates your sessions from your CMDB
- A lightweight TFTP Server plugin for network device image upgrades
- A Yaml browser companion for view of the Netmiko CLI Collector structured data results
You can download more .whl
plugins from github.
You can download more .whl
plugins from wheels.
python setup.py sdist bdist_wheel