ixlab-sshui 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ixlab_sshui-1.0.0.dist-info/METADATA +65 -0
- ixlab_sshui-1.0.0.dist-info/RECORD +12 -0
- ixlab_sshui-1.0.0.dist-info/WHEEL +5 -0
- ixlab_sshui-1.0.0.dist-info/entry_points.txt +2 -0
- ixlab_sshui-1.0.0.dist-info/licenses/LICENSE +21 -0
- ixlab_sshui-1.0.0.dist-info/top_level.txt +1 -0
- sshui/__init__.py +19 -0
- sshui/about_dialog.py +103 -0
- sshui/main_window.py +1070 -0
- sshui/option_dialog.py +74 -0
- sshui/tag_dialog.py +247 -0
- sshui/text_prompt_dialog.py +46 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ixlab-sshui
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: PyQt6 UI for browsing and tagging SSH configs via sshcore.
|
|
5
|
+
Author-email: Iacopo Palazzi <iacopo.palazzi@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/iakko/sshui
|
|
8
|
+
Keywords: ssh,ui,pyqt,config
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: ixlab-sshcore>=1.0.0
|
|
13
|
+
Requires-Dist: PyQt6>=6.5
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# sshui
|
|
17
|
+
|
|
18
|
+
`sshui` is a PyQt6-based graphical frontend for the `sshcore` engine. It gives you a fast, tag-aware explorer for SSH configuration files, complete with host grouping, editing dialogs, and quick copy of SSH commands—without touching the command line.
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- Flat and tag-grouped host browsers with live filtering.
|
|
23
|
+
- Tag editing dialog with color-coded tag definitions stored in the central `sshcli.json` configuration.
|
|
24
|
+
- Inline metadata display (tags, colors) and SSH command preview/copy.
|
|
25
|
+
- Context menus for editing/deleting hosts and quick navigation.
|
|
26
|
+
- Reuses the same settings/config sources managed by `sshcli`, so both tools stay in sync.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install ixlab-sshui
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This installs `sshcore` and PyQt6 automatically.
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Launch the UI via the console script:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
sshui
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
or import and run the main window manually:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from sshui import main
|
|
48
|
+
main()
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
|
|
53
|
+
1. Install dependencies for local hacking:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install -e .[dev]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. Run tests (UI-specific tests often rely on Qt’s offscreen plugins):
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pytest
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`sshui` is MIT licensed. Feedback and contributions are welcome.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
ixlab_sshui-1.0.0.dist-info/licenses/LICENSE,sha256=AubgdlFgW3LalXrbbuEsYE3fcvOhx_PDp50LVykyy3E,1060
|
|
2
|
+
sshui/__init__.py,sha256=1tfPFPfHyroicvJU_rlwn07dvnHOgRfEYgaq17-Jq5Y,373
|
|
3
|
+
sshui/about_dialog.py,sha256=HUBOhpHQNSTEb0AK3pEzLEdwVBrpxoTenzIwvi8sQpY,4077
|
|
4
|
+
sshui/main_window.py,sha256=FLJW1aWV4Ei8zRaAnJ7ZG0zYOEyWCIcblC4eZ7uhYO0,41558
|
|
5
|
+
sshui/option_dialog.py,sha256=Gp64y1L5Gqz4nQaYMrwNM7cXPdosFB6Cqt29XdL0rqg,2033
|
|
6
|
+
sshui/tag_dialog.py,sha256=-Olx8YX-tpf52X1m4hiDEWN45aNpZtIX7hgYg7omCho,8834
|
|
7
|
+
sshui/text_prompt_dialog.py,sha256=bVOiq8VBOaTVwmjyQM3zdiht1QnLmJHmMvoFf_EhV0k,1476
|
|
8
|
+
ixlab_sshui-1.0.0.dist-info/METADATA,sha256=bRCT-KR5-mxabowQAFHoY7AqCKB20DFg1e-0iMCYadI,1647
|
|
9
|
+
ixlab_sshui-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
ixlab_sshui-1.0.0.dist-info/entry_points.txt,sha256=y9QOy0WELZXZPvUt7At8yoYfE4CeJlaAWS_vqFEzBgk,37
|
|
11
|
+
ixlab_sshui-1.0.0.dist-info/top_level.txt,sha256=wpyA54nE2axEc-vnncrHM65v7HtYUXrCtxU9TTyY7po,6
|
|
12
|
+
ixlab_sshui-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Pat
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sshui
|
sshui/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""PyQt UI package for sshcli."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from PyQt6.QtWidgets import QApplication
|
|
8
|
+
|
|
9
|
+
from .main_window import MainWindow
|
|
10
|
+
|
|
11
|
+
__all__ = ["MainWindow", "main"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main() -> int:
|
|
15
|
+
"""Entry point used by the `sshui` console script."""
|
|
16
|
+
app = QApplication(sys.argv)
|
|
17
|
+
window = MainWindow()
|
|
18
|
+
window.show()
|
|
19
|
+
return app.exec()
|
sshui/about_dialog.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from PyQt6.QtWidgets import (
|
|
2
|
+
QDialog,
|
|
3
|
+
QVBoxLayout,
|
|
4
|
+
QLabel,
|
|
5
|
+
QFrame,
|
|
6
|
+
)
|
|
7
|
+
from PyQt6.QtGui import QFont
|
|
8
|
+
from PyQt6.QtCore import Qt
|
|
9
|
+
|
|
10
|
+
class AboutDialog(QDialog):
|
|
11
|
+
def __init__(self, parent=None):
|
|
12
|
+
super().__init__(parent)
|
|
13
|
+
self.setWindowTitle("About SSHUI")
|
|
14
|
+
self.setFixedSize(420, 420)
|
|
15
|
+
|
|
16
|
+
sshui_version = self._current_version("ixlab-sshui") or "unknown"
|
|
17
|
+
sshcli_version = self._current_version("ixlab-sshcli")
|
|
18
|
+
sshcore_version = self._current_version("ixlab-sshcore") or "unknown"
|
|
19
|
+
|
|
20
|
+
layout = QVBoxLayout()
|
|
21
|
+
layout.setContentsMargins(24, 20, 24, 20)
|
|
22
|
+
layout.setSpacing(14)
|
|
23
|
+
|
|
24
|
+
app_name = QLabel("SSH-UI")
|
|
25
|
+
app_name.setFont(QFont("Arial", 20, QFont.Weight.Black))
|
|
26
|
+
app_name.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
27
|
+
app_name.setStyleSheet("color: #2c3e50; letter-spacing: 1px;")
|
|
28
|
+
|
|
29
|
+
tagline = QLabel("Graphical companion for SSH power users")
|
|
30
|
+
tagline.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
31
|
+
tagline.setStyleSheet("color: #7f8c8d; font-style: italic;")
|
|
32
|
+
|
|
33
|
+
divider = QFrame()
|
|
34
|
+
divider.setFrameShape(QFrame.Shape.HLine)
|
|
35
|
+
divider.setFrameShadow(QFrame.Shadow.Sunken)
|
|
36
|
+
|
|
37
|
+
description = QLabel(
|
|
38
|
+
"SSH-UI is a graphical companion for sshcli, providing a tag-aware host browser "
|
|
39
|
+
"with quick access to connection details and editing actions.\n\n"
|
|
40
|
+
"SSH-CLI is a CLI tool for exploring and managing SSH config files with tagging, backup, "
|
|
41
|
+
"and search utilities to keep complex setups tidy."
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
description.setWordWrap(True)
|
|
45
|
+
description.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
|
46
|
+
description.setStyleSheet("color: #34495e; padding: 2px")
|
|
47
|
+
|
|
48
|
+
versions_lines = [
|
|
49
|
+
f"<b>SSH-UI:</b> {sshui_version}",
|
|
50
|
+
f"<b>SSH-CLI:</b> {'not installed' if not sshcli_version else sshcli_version}",
|
|
51
|
+
f"<b>SSH-CORE:</b> {sshcore_version}",
|
|
52
|
+
]
|
|
53
|
+
versions_info = QLabel(
|
|
54
|
+
"<span style='color:#2c3e50; padding: 2px'>Versions</span><br>" + "<br>".join(versions_lines)
|
|
55
|
+
)
|
|
56
|
+
versions_info.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
|
57
|
+
versions_info.setTextFormat(Qt.TextFormat.RichText)
|
|
58
|
+
|
|
59
|
+
info_card = QFrame()
|
|
60
|
+
info_card.setStyleSheet(
|
|
61
|
+
"QFrame {background-color: #f6f8fa; border: 1px solid #dce0e6; border-radius: 10px;}"
|
|
62
|
+
)
|
|
63
|
+
card_layout = QVBoxLayout(info_card)
|
|
64
|
+
card_layout.setContentsMargins(14, 12, 14, 12)
|
|
65
|
+
card_layout.setSpacing(5)
|
|
66
|
+
card_layout.addWidget(description)
|
|
67
|
+
card_layout.addWidget(versions_info)
|
|
68
|
+
|
|
69
|
+
project_links = QLabel(
|
|
70
|
+
'<a href="https://github.com/iakko/sshui">SSH-UI project page</a><br>'
|
|
71
|
+
'<a href="https://github.com/iakko/sshcli">SSH-CLI project page</a><br>'
|
|
72
|
+
'<a href="https://github.com/iakko/sshcore">SSH-CORE project page</a>'
|
|
73
|
+
)
|
|
74
|
+
project_links.setTextFormat(Qt.TextFormat.RichText)
|
|
75
|
+
project_links.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
|
|
76
|
+
project_links.setOpenExternalLinks(True)
|
|
77
|
+
project_links.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
|
78
|
+
|
|
79
|
+
author = QLabel(
|
|
80
|
+
'Developed by <a href="mailto:iacopo.palazzi@gmail.com">Iacopo Palazzi</a>'
|
|
81
|
+
)
|
|
82
|
+
author.setTextFormat(Qt.TextFormat.RichText)
|
|
83
|
+
author.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
|
|
84
|
+
author.setOpenExternalLinks(True)
|
|
85
|
+
author.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
|
86
|
+
|
|
87
|
+
layout.addWidget(app_name)
|
|
88
|
+
layout.addWidget(tagline)
|
|
89
|
+
layout.addWidget(divider)
|
|
90
|
+
layout.addWidget(info_card)
|
|
91
|
+
layout.addWidget(project_links)
|
|
92
|
+
layout.addWidget(author)
|
|
93
|
+
|
|
94
|
+
self.setLayout(layout)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _current_version(self, package) -> str:
|
|
99
|
+
try:
|
|
100
|
+
from importlib.metadata import PackageNotFoundError, version as pkg_version
|
|
101
|
+
return pkg_version(package)
|
|
102
|
+
except Exception:
|
|
103
|
+
return None
|