graphical-ssh 0.1.1__tar.gz
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.
- graphical_ssh-0.1.1/LICENSE +21 -0
- graphical_ssh-0.1.1/PKG-INFO +151 -0
- graphical_ssh-0.1.1/README.md +123 -0
- graphical_ssh-0.1.1/pyproject.toml +78 -0
- graphical_ssh-0.1.1/pyproject.toml.orig +60 -0
- graphical_ssh-0.1.1/src/gssh/__init__.py +3 -0
- graphical_ssh-0.1.1/src/gssh/__main__.py +43 -0
- graphical_ssh-0.1.1/src/gssh/config.py +245 -0
- graphical_ssh-0.1.1/src/gssh/connect.py +156 -0
- graphical_ssh-0.1.1/src/gssh/data/__init__.py +0 -0
- graphical_ssh-0.1.1/src/gssh/data/gssh.desktop +10 -0
- graphical_ssh-0.1.1/src/gssh/data/gssh.svg +26 -0
- graphical_ssh-0.1.1/src/gssh/host_editor.py +174 -0
- graphical_ssh-0.1.1/src/gssh/linter.py +402 -0
- graphical_ssh-0.1.1/src/gssh/main_window.py +384 -0
- graphical_ssh-0.1.1/src/gssh/models.py +91 -0
- graphical_ssh-0.1.1/src/gssh/py.typed +0 -0
- graphical_ssh-0.1.1/src/gssh/terminal.py +490 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Greg Grace
|
|
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,151 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: graphical-ssh
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Graphical SSH client connection and configuration manager for Debian
|
|
5
|
+
Keywords: ssh,terminal,config,gui,pyqt,debian
|
|
6
|
+
Author: Greg Grace
|
|
7
|
+
Author-email: Greg Grace <ggrace@519lab.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: System :: Networking
|
|
18
|
+
Classifier: Topic :: Terminals
|
|
19
|
+
Requires-Dist: pyqt6>=6.7
|
|
20
|
+
Requires-Dist: pyte>=0.8
|
|
21
|
+
Requires-Dist: pytest>=8.0 ; extra == 'dev'
|
|
22
|
+
Requires-Dist: pytest-cov>=5.0 ; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest-qt>=4.4 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: ruff>=0.6 ; extra == 'dev'
|
|
25
|
+
Requires-Python: >=3.12
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# gssh
|
|
30
|
+
|
|
31
|
+
A graphical SSH client connection and configuration manager for Debian/Linux. Manage your `~/.ssh/config` hosts through a GUI, edit connection parameters, and open SSH sessions — either in an embedded terminal or by launching your preferred external terminal emulator.
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- **Visual host management** — view, add, edit, and delete Host entries from `~/.ssh/config`
|
|
36
|
+
- **Dedicated fields** for the common options: HostName, User, Port, IdentityFile, ProxyJump, ForwardAgent
|
|
37
|
+
- **Extra options** — any arbitrary ssh_config directive via a freeform text area
|
|
38
|
+
- **Safe writes** — atomic file replacement with automatic timestamped backups (`.config.bak.YYYYMMDD_HHMMSS`) and `0600` permissions
|
|
39
|
+
- **Config linter** — catches unknown/deprecated options, insecure key permissions, invalid ports, undefined ProxyJump references, and pattern-overlap conflicts (first-match-wins)
|
|
40
|
+
- **Connection test** — TCP ping-before-connect with latency display
|
|
41
|
+
- **Wildcard hosts** — supports patterns like `*.lab.local`
|
|
42
|
+
- **Search/filter** — live filter by alias, hostname, or user
|
|
43
|
+
- **In-app terminal** — embedded PTY-based terminal using [pyte](https://github.com/selectel/pyte) for VT220 emulation with 5000-line scrollback and 16-colour ANSI
|
|
44
|
+
- **External terminal** — toggle to launch `ssh` in konsole, gnome-terminal, xterm, or any detected emulator
|
|
45
|
+
- **Round-trip safe** — preserves comments, preamble, and unknown directives
|
|
46
|
+
|
|
47
|
+
## Requirements
|
|
48
|
+
|
|
49
|
+
- Python 3.12+
|
|
50
|
+
- PyQt6
|
|
51
|
+
- pyte
|
|
52
|
+
- (Optional) a terminal emulator for external mode: konsole, gnome-terminal, xterm, etc.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
### From PyPI (recommended)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install gssh
|
|
60
|
+
gssh
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or run without installing:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
uvx gssh # via uv
|
|
67
|
+
pipx run gssh # via pipx
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### From source
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/ggrace519/graphical-ssh.git
|
|
74
|
+
cd graphical-ssh
|
|
75
|
+
uv sync
|
|
76
|
+
uv run gssh
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Desktop integration
|
|
80
|
+
|
|
81
|
+
To add gssh to your application menu:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# If installed via pip, the data files are inside the package:
|
|
85
|
+
python -c "import gssh.data; print(gssh.data.__path__)"
|
|
86
|
+
sudo cp $(python -c "import gssh.data; print(gssh.data.__path__[0])")/gssh.desktop /usr/share/applications/
|
|
87
|
+
sudo cp $(python -c "import gssh.data; print(gssh.data.__path__[0])")/gssh.svg /usr/share/icons/hicolor/scalable/apps/
|
|
88
|
+
sudo update-desktop-database
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Usage
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Use default ~/.ssh/config
|
|
95
|
+
uv run gssh
|
|
96
|
+
|
|
97
|
+
# Specify a custom config file
|
|
98
|
+
uv run gssh -c /path/to/ssh/config
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### GUI controls
|
|
102
|
+
|
|
103
|
+
| Action | How |
|
|
104
|
+
|---|---|
|
|
105
|
+
| Add a host | **Add Host** button → fill in the dialog |
|
|
106
|
+
| Edit a host | Select row → **Edit** button (or double-click to connect) |
|
|
107
|
+
| Delete a host | Select row → **Delete** button → confirm |
|
|
108
|
+
| Connect | Select row → **Connect** (or double-click the row) |
|
|
109
|
+
| Toggle terminal mode | **In-App Terminal** / **External Terminal** toggle |
|
|
110
|
+
| Filter hosts | Type in the search bar |
|
|
111
|
+
| Save changes | **Save** button (writes to config file with backup) |
|
|
112
|
+
| Reload from disk | **Reload** button |
|
|
113
|
+
|
|
114
|
+
## Development
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Run tests with coverage
|
|
118
|
+
uv run pytest
|
|
119
|
+
|
|
120
|
+
# Run the app
|
|
121
|
+
uv run gssh
|
|
122
|
+
|
|
123
|
+
# Run with a test config
|
|
124
|
+
uv run gssh -c /tmp/test-config
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Project structure
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
src/gssh/
|
|
131
|
+
├── __init__.py # package metadata
|
|
132
|
+
├── __main__.py # CLI entry point (argparse + QApplication)
|
|
133
|
+
├── config.py # SSH config parser/writer (round-trip safe, atomic writes)
|
|
134
|
+
├── models.py # Qt table model for host entries
|
|
135
|
+
├── host_editor.py # Add/Edit host dialog
|
|
136
|
+
├── connect.py # SSH command builder + launch (in-app or external)
|
|
137
|
+
├── terminal.py # In-app terminal widget (pyte + PTY)
|
|
138
|
+
└── main_window.py # Main window: host list, toolbar, terminal container
|
|
139
|
+
|
|
140
|
+
tests/
|
|
141
|
+
└── test_config.py # Parser/writer tests (20 tests, 90% config coverage)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Roadmap
|
|
145
|
+
|
|
146
|
+
- **Tier 2:** key file management (generate, view, copy public key), known-hosts viewer, connection test, import/export
|
|
147
|
+
- **Tier 3:** port-forwarding manager, per-host tags/notes, system tray quick-connect
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# gssh
|
|
2
|
+
|
|
3
|
+
A graphical SSH client connection and configuration manager for Debian/Linux. Manage your `~/.ssh/config` hosts through a GUI, edit connection parameters, and open SSH sessions — either in an embedded terminal or by launching your preferred external terminal emulator.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Visual host management** — view, add, edit, and delete Host entries from `~/.ssh/config`
|
|
8
|
+
- **Dedicated fields** for the common options: HostName, User, Port, IdentityFile, ProxyJump, ForwardAgent
|
|
9
|
+
- **Extra options** — any arbitrary ssh_config directive via a freeform text area
|
|
10
|
+
- **Safe writes** — atomic file replacement with automatic timestamped backups (`.config.bak.YYYYMMDD_HHMMSS`) and `0600` permissions
|
|
11
|
+
- **Config linter** — catches unknown/deprecated options, insecure key permissions, invalid ports, undefined ProxyJump references, and pattern-overlap conflicts (first-match-wins)
|
|
12
|
+
- **Connection test** — TCP ping-before-connect with latency display
|
|
13
|
+
- **Wildcard hosts** — supports patterns like `*.lab.local`
|
|
14
|
+
- **Search/filter** — live filter by alias, hostname, or user
|
|
15
|
+
- **In-app terminal** — embedded PTY-based terminal using [pyte](https://github.com/selectel/pyte) for VT220 emulation with 5000-line scrollback and 16-colour ANSI
|
|
16
|
+
- **External terminal** — toggle to launch `ssh` in konsole, gnome-terminal, xterm, or any detected emulator
|
|
17
|
+
- **Round-trip safe** — preserves comments, preamble, and unknown directives
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Python 3.12+
|
|
22
|
+
- PyQt6
|
|
23
|
+
- pyte
|
|
24
|
+
- (Optional) a terminal emulator for external mode: konsole, gnome-terminal, xterm, etc.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
### From PyPI (recommended)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install gssh
|
|
32
|
+
gssh
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or run without installing:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uvx gssh # via uv
|
|
39
|
+
pipx run gssh # via pipx
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### From source
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
git clone https://github.com/ggrace519/graphical-ssh.git
|
|
46
|
+
cd graphical-ssh
|
|
47
|
+
uv sync
|
|
48
|
+
uv run gssh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Desktop integration
|
|
52
|
+
|
|
53
|
+
To add gssh to your application menu:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# If installed via pip, the data files are inside the package:
|
|
57
|
+
python -c "import gssh.data; print(gssh.data.__path__)"
|
|
58
|
+
sudo cp $(python -c "import gssh.data; print(gssh.data.__path__[0])")/gssh.desktop /usr/share/applications/
|
|
59
|
+
sudo cp $(python -c "import gssh.data; print(gssh.data.__path__[0])")/gssh.svg /usr/share/icons/hicolor/scalable/apps/
|
|
60
|
+
sudo update-desktop-database
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Usage
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Use default ~/.ssh/config
|
|
67
|
+
uv run gssh
|
|
68
|
+
|
|
69
|
+
# Specify a custom config file
|
|
70
|
+
uv run gssh -c /path/to/ssh/config
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### GUI controls
|
|
74
|
+
|
|
75
|
+
| Action | How |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Add a host | **Add Host** button → fill in the dialog |
|
|
78
|
+
| Edit a host | Select row → **Edit** button (or double-click to connect) |
|
|
79
|
+
| Delete a host | Select row → **Delete** button → confirm |
|
|
80
|
+
| Connect | Select row → **Connect** (or double-click the row) |
|
|
81
|
+
| Toggle terminal mode | **In-App Terminal** / **External Terminal** toggle |
|
|
82
|
+
| Filter hosts | Type in the search bar |
|
|
83
|
+
| Save changes | **Save** button (writes to config file with backup) |
|
|
84
|
+
| Reload from disk | **Reload** button |
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Run tests with coverage
|
|
90
|
+
uv run pytest
|
|
91
|
+
|
|
92
|
+
# Run the app
|
|
93
|
+
uv run gssh
|
|
94
|
+
|
|
95
|
+
# Run with a test config
|
|
96
|
+
uv run gssh -c /tmp/test-config
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Project structure
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
src/gssh/
|
|
103
|
+
├── __init__.py # package metadata
|
|
104
|
+
├── __main__.py # CLI entry point (argparse + QApplication)
|
|
105
|
+
├── config.py # SSH config parser/writer (round-trip safe, atomic writes)
|
|
106
|
+
├── models.py # Qt table model for host entries
|
|
107
|
+
├── host_editor.py # Add/Edit host dialog
|
|
108
|
+
├── connect.py # SSH command builder + launch (in-app or external)
|
|
109
|
+
├── terminal.py # In-app terminal widget (pyte + PTY)
|
|
110
|
+
└── main_window.py # Main window: host list, toolbar, terminal container
|
|
111
|
+
|
|
112
|
+
tests/
|
|
113
|
+
└── test_config.py # Parser/writer tests (20 tests, 90% config coverage)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Roadmap
|
|
117
|
+
|
|
118
|
+
- **Tier 2:** key file management (generate, view, copy public key), known-hosts viewer, connection test, import/export
|
|
119
|
+
- **Tier 3:** port-forwarding manager, per-host tags/notes, system tray quick-connect
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "graphical-ssh"
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "Graphical SSH client connection and configuration manager for Debian"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
requires-python = ">=3.12"
|
|
9
|
+
keywords = [
|
|
10
|
+
"ssh",
|
|
11
|
+
"terminal",
|
|
12
|
+
"config",
|
|
13
|
+
"gui",
|
|
14
|
+
"pyqt",
|
|
15
|
+
"debian",
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Environment :: X11 Applications :: Qt",
|
|
20
|
+
"Intended Audience :: System Administrators",
|
|
21
|
+
"Operating System :: POSIX :: Linux",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: System :: Networking",
|
|
26
|
+
"Topic :: Terminals",
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"PyQt6>=6.7",
|
|
30
|
+
"pyte>=0.8",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[[project.authors]]
|
|
34
|
+
name = "Greg Grace"
|
|
35
|
+
email = "ggrace@519lab.com"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = [
|
|
39
|
+
"pytest>=8.0",
|
|
40
|
+
"pytest-cov>=5.0",
|
|
41
|
+
"pytest-qt>=4.4",
|
|
42
|
+
"ruff>=0.6",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
gssh = "gssh.__main__:main"
|
|
47
|
+
|
|
48
|
+
[build-system]
|
|
49
|
+
requires = ["uv_build>=0.12.5,<0.13.0"]
|
|
50
|
+
build-backend = "uv_build"
|
|
51
|
+
|
|
52
|
+
[tool.uv.build-backend]
|
|
53
|
+
module-name = "gssh"
|
|
54
|
+
|
|
55
|
+
[tool.pytest.ini_options]
|
|
56
|
+
testpaths = ["tests"]
|
|
57
|
+
addopts = "--cov=gssh --cov-report=term-missing"
|
|
58
|
+
|
|
59
|
+
[tool.coverage.run]
|
|
60
|
+
source = ["gssh"]
|
|
61
|
+
|
|
62
|
+
[tool.ruff]
|
|
63
|
+
line-length = 100
|
|
64
|
+
target-version = "py312"
|
|
65
|
+
|
|
66
|
+
[tool.ruff.lint]
|
|
67
|
+
select = [
|
|
68
|
+
"E",
|
|
69
|
+
"F",
|
|
70
|
+
"W",
|
|
71
|
+
"I",
|
|
72
|
+
"UP",
|
|
73
|
+
"B",
|
|
74
|
+
]
|
|
75
|
+
ignore = [
|
|
76
|
+
"E501",
|
|
77
|
+
"B008",
|
|
78
|
+
]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "graphical-ssh"
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "Graphical SSH client connection and configuration manager for Debian"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Greg Grace", email = "ggrace@519lab.com" }
|
|
10
|
+
]
|
|
11
|
+
requires-python = ">=3.12"
|
|
12
|
+
keywords = ["ssh", "terminal", "config", "gui", "pyqt", "debian"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: X11 Applications :: Qt",
|
|
16
|
+
"Intended Audience :: System Administrators",
|
|
17
|
+
"Operating System :: POSIX :: Linux",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Topic :: System :: Networking",
|
|
22
|
+
"Topic :: Terminals",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"PyQt6>=6.7",
|
|
26
|
+
"pyte>=0.8",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = [
|
|
31
|
+
"pytest>=8.0",
|
|
32
|
+
"pytest-cov>=5.0",
|
|
33
|
+
"pytest-qt>=4.4",
|
|
34
|
+
"ruff>=0.6",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
gssh = "gssh.__main__:main"
|
|
39
|
+
|
|
40
|
+
[build-system]
|
|
41
|
+
requires = ["uv_build>=0.12.5,<0.13.0"]
|
|
42
|
+
build-backend = "uv_build"
|
|
43
|
+
|
|
44
|
+
[tool.uv.build-backend]
|
|
45
|
+
module-name = "gssh"
|
|
46
|
+
|
|
47
|
+
[tool.pytest.ini_options]
|
|
48
|
+
testpaths = ["tests"]
|
|
49
|
+
addopts = "--cov=gssh --cov-report=term-missing"
|
|
50
|
+
|
|
51
|
+
[tool.coverage.run]
|
|
52
|
+
source = ["gssh"]
|
|
53
|
+
|
|
54
|
+
[tool.ruff]
|
|
55
|
+
line-length = 100
|
|
56
|
+
target-version = "py312"
|
|
57
|
+
|
|
58
|
+
[tool.ruff.lint]
|
|
59
|
+
select = ["E", "F", "W", "I", "UP", "B"]
|
|
60
|
+
ignore = ["E501", "B008"] # B008: Qt model API requires QModelIndex() as default
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Entry point for gssh."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from PyQt6.QtWidgets import QApplication
|
|
10
|
+
|
|
11
|
+
from . import __version__
|
|
12
|
+
from .main_window import MainWindow
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> int:
|
|
16
|
+
parser = argparse.ArgumentParser(
|
|
17
|
+
prog="gssh",
|
|
18
|
+
description="Graphical SSH client connection and configuration manager",
|
|
19
|
+
)
|
|
20
|
+
parser.add_argument(
|
|
21
|
+
"-c", "--config",
|
|
22
|
+
type=Path,
|
|
23
|
+
default=None,
|
|
24
|
+
help="Path to ssh config file (default: ~/.ssh/config)",
|
|
25
|
+
)
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
"--version",
|
|
28
|
+
action="version",
|
|
29
|
+
version=f"gssh {__version__}",
|
|
30
|
+
)
|
|
31
|
+
args = parser.parse_args()
|
|
32
|
+
|
|
33
|
+
app = QApplication(sys.argv)
|
|
34
|
+
app.setApplicationName("gssh")
|
|
35
|
+
|
|
36
|
+
window = MainWindow(config_path=args.config)
|
|
37
|
+
window.show()
|
|
38
|
+
|
|
39
|
+
return app.exec()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
if __name__ == "__main__":
|
|
43
|
+
sys.exit(main())
|