ntermqt 0.1.0__tar.gz → 0.1.3__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.
Files changed (66) hide show
  1. {ntermqt-0.1.0 → ntermqt-0.1.3}/PKG-INFO +119 -12
  2. {ntermqt-0.1.0 → ntermqt-0.1.3}/README.md +109 -11
  3. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/__main__.py +339 -13
  4. ntermqt-0.1.3/nterm/scripting/__init__.py +43 -0
  5. ntermqt-0.1.3/nterm/scripting/api.py +447 -0
  6. ntermqt-0.1.3/nterm/scripting/cli.py +305 -0
  7. ntermqt-0.1.3/nterm/session/local_terminal.py +225 -0
  8. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/pty_transport.py +105 -91
  9. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/engine.py +238 -0
  10. ntermqt-0.1.3/nterm/theme/themes/enterprise_dark.yaml +42 -0
  11. ntermqt-0.1.3/nterm/theme/themes/enterprise_hybrid.yaml +44 -0
  12. ntermqt-0.1.3/nterm/theme/themes/enterprise_light.yaml +42 -0
  13. {ntermqt-0.1.0 → ntermqt-0.1.3}/ntermqt.egg-info/PKG-INFO +119 -12
  14. {ntermqt-0.1.0 → ntermqt-0.1.3}/ntermqt.egg-info/SOURCES.txt +7 -0
  15. {ntermqt-0.1.0 → ntermqt-0.1.3}/ntermqt.egg-info/entry_points.txt +1 -0
  16. ntermqt-0.1.3/ntermqt.egg-info/requires.txt +30 -0
  17. {ntermqt-0.1.0 → ntermqt-0.1.3}/pyproject.toml +10 -3
  18. ntermqt-0.1.0/ntermqt.egg-info/requires.txt +0 -15
  19. {ntermqt-0.1.0 → ntermqt-0.1.3}/MANIFEST.in +0 -0
  20. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/__init__.py +0 -0
  21. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/askpass/__init__.py +0 -0
  22. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/askpass/server.py +0 -0
  23. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/config.py +0 -0
  24. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/connection/__init__.py +0 -0
  25. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/connection/profile.py +0 -0
  26. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/__init__.py +0 -0
  27. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/connect_dialog.py +0 -0
  28. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/editor.py +0 -0
  29. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/io.py +0 -0
  30. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/models.py +0 -0
  31. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/settings.py +0 -0
  32. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/manager/tree.py +0 -0
  33. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/resources.py +0 -0
  34. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/__init__.py +0 -0
  35. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/askpass_ssh.py +0 -0
  36. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/base.py +0 -0
  37. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/interactive_ssh.py +0 -0
  38. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/session/ssh.py +0 -0
  39. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/__init__.py +0 -0
  40. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/bridge.py +0 -0
  41. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/terminal.html +0 -0
  42. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/terminal.js +0 -0
  43. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/xterm-addon-fit.min.js +0 -0
  44. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/xterm-addon-unicode11.min.js +0 -0
  45. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/xterm-addon-web-links.min.js +0 -0
  46. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/xterm.css +0 -0
  47. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/resources/xterm.min.js +0 -0
  48. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/terminal/widget.py +0 -0
  49. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/__init__.py +0 -0
  50. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/stylesheet.py +0 -0
  51. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/clean.yaml +0 -0
  52. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/default.yaml +0 -0
  53. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/dracula.yaml +0 -0
  54. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/gruvbox_dark.yaml +0 -0
  55. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/gruvbox_hybrid.yaml +0 -0
  56. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/theme/themes/gruvbox_light.yaml +0 -0
  57. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/__init__.py +0 -0
  58. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/credential_manager.py +0 -0
  59. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/keychain.py +0 -0
  60. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/manager_ui.py +0 -0
  61. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/profile.py +0 -0
  62. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/resolver.py +0 -0
  63. {ntermqt-0.1.0 → ntermqt-0.1.3}/nterm/vault/store.py +0 -0
  64. {ntermqt-0.1.0 → ntermqt-0.1.3}/ntermqt.egg-info/dependency_links.txt +0 -0
  65. {ntermqt-0.1.0 → ntermqt-0.1.3}/ntermqt.egg-info/top_level.txt +0 -0
  66. {ntermqt-0.1.0 → ntermqt-0.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ntermqt
3
- Version: 0.1.0
3
+ Version: 0.1.3
4
4
  Summary: Modern SSH terminal widget for PyQt6 with credential vault and jump host support
5
5
  Author: Scott Peterman
6
6
  License: GPL-3.0
@@ -25,14 +25,23 @@ Requires-Dist: PyQt6-WebEngine>=6.4.0
25
25
  Requires-Dist: paramiko>=3.0.0
26
26
  Requires-Dist: cryptography>=41.0.0
27
27
  Requires-Dist: pyyaml>=6.0
28
+ Requires-Dist: click>=8.0.0
29
+ Requires-Dist: pexpect>=4.8.0; sys_platform != "win32"
30
+ Requires-Dist: pywinpty>=2.0.0; sys_platform == "win32"
28
31
  Provides-Extra: keyring
29
32
  Requires-Dist: keyring>=24.0.0; extra == "keyring"
33
+ Provides-Extra: scripting
34
+ Requires-Dist: ipython>=8.0.0; extra == "scripting"
30
35
  Provides-Extra: dev
31
36
  Requires-Dist: pytest; extra == "dev"
32
37
  Requires-Dist: black; extra == "dev"
33
38
  Requires-Dist: pyinstaller; extra == "dev"
34
39
  Requires-Dist: build; extra == "dev"
35
40
  Requires-Dist: twine; extra == "dev"
41
+ Requires-Dist: ipython>=8.0.0; extra == "dev"
42
+ Provides-Extra: all
43
+ Requires-Dist: keyring>=24.0.0; extra == "all"
44
+ Requires-Dist: ipython>=8.0.0; extra == "all"
36
45
 
37
46
  # nterm
38
47
 
@@ -42,7 +51,7 @@ PyQt6 terminal widget with encrypted credential vault, jump host chaining, YubiK
42
51
 
43
52
  Built for managing hundreds of devices through bastion hosts with hardware security keys.
44
53
 
45
- ![nterm screenshot](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/gruvbox.png)
54
+ ![nterm screenshot](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/slides.gif)
46
55
 
47
56
  ---
48
57
 
@@ -74,6 +83,12 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
74
83
  - Cross-platform keychain: macOS Keychain, Windows Credential Locker, Linux Secret Service
75
84
  - Full PyQt6 management UI
76
85
 
86
+ **Scripting API** *(Experimental)*
87
+ - Query device inventory and credentials programmatically
88
+ - Built-in IPython console with API pre-loaded
89
+ - CLI for shell scripts and automation
90
+ - Foundation for MCP tools and agentic workflows
91
+
77
92
  ---
78
93
 
79
94
  ## Screenshots
@@ -88,15 +103,48 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
88
103
 
89
104
  ---
90
105
 
106
+ ## Dev Console
107
+
108
+ nterm includes a built-in development console accessible via **Dev → IPython** or **Dev → Shell**. Open in a tab alongside your SSH sessions, or pop out to a separate window.
109
+
110
+ ![IPython Console](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/ipython.png)
111
+
112
+ The IPython console runs in the same Python environment as nterm, with the scripting API pre-loaded. Query your device inventory, inspect credentials, and prototype automation workflows without leaving the app.
113
+
114
+ ```python
115
+ # Available immediately when IPython opens
116
+ api.devices() # List all saved devices
117
+ api.search("leaf") # Search by name/hostname
118
+ api.credentials() # List credentials (after api.unlock())
119
+ api.help() # Show all commands
120
+ ```
121
+
122
+ **Use cases:**
123
+ - Debug connection issues with live access to session objects
124
+ - Prototype automation scripts against your real device inventory
125
+ - Test credential resolution patterns
126
+ - Build and test MCP tools interactively
127
+
128
+ Requires the `scripting` extra: `pip install ntermqt[scripting]`
129
+
130
+ ---
131
+
91
132
  ## Installation
92
133
 
134
+ ### Be aware due to a naming conflict, the pypi package is actually "ntermqt"
135
+
93
136
  ### From PyPI
94
137
 
138
+ https://pypi.org/project/ntermqt/
139
+
95
140
  ```bash
96
- pip install nterm
141
+ pip install ntermqt
97
142
 
98
- # Optional: system keychain support
99
- pip install nterm[keyring]
143
+ # With optional scripting support (IPython)
144
+ pip install ntermqt[scripting]
145
+
146
+ # With all optional features
147
+ pip install ntermqt[all]
100
148
 
101
149
  # Run
102
150
  nterm
@@ -114,10 +162,7 @@ source .venv/bin/activate # Linux/macOS
114
162
  # .venv\Scripts\activate # Windows
115
163
 
116
164
  # Install in development mode
117
- pip install -e .
118
-
119
- # Optional: system keychain support
120
- pip install keyring
165
+ pip install -e ".[all]"
121
166
 
122
167
  # Run
123
168
  nterm
@@ -137,12 +182,70 @@ python -m nterm
137
182
 
138
183
  | Platform | PTY | Keychain |
139
184
  |----------|-----|----------|
140
- | Linux | ✅ Native | Secret Service |
141
- | macOS | ✅ Native | macOS Keychain |
185
+ | Linux | ✅ pexpect | Secret Service |
186
+ | macOS | ✅ pexpect | macOS Keychain |
142
187
  | Windows 10+ | ✅ pywinpty | Credential Locker |
143
188
 
144
189
  ---
145
190
 
191
+ ## Scripting API *(Experimental)*
192
+
193
+ nterm includes a scripting API for programmatic access to your device inventory and credential vault. Use it from IPython, CLI, or Python scripts.
194
+
195
+ ### IPython Console
196
+
197
+ Open **Dev → IPython → Open in Tab** to get an interactive console with the API pre-loaded:
198
+
199
+ ```python
200
+ api.devices() # List all saved devices
201
+ api.search("leaf") # Search by name/hostname
202
+ api.devices("eng-*") # Glob pattern filter
203
+
204
+ api.unlock("vault-password") # Unlock credential vault
205
+ api.credentials() # List credentials (metadata only)
206
+
207
+ api.help() # Show all commands
208
+ ```
209
+
210
+ ### CLI
211
+
212
+ ```bash
213
+ nterm-cli devices # List all devices
214
+ nterm-cli search leaf # Search devices
215
+ nterm-cli device eng-leaf-1 # Device details
216
+ nterm-cli credentials --unlock # List credentials
217
+ nterm-cli --json devices # JSON output for scripting
218
+ ```
219
+
220
+ ### Python Scripts
221
+
222
+ ```python
223
+ from nterm.scripting import NTermAPI
224
+
225
+ api = NTermAPI()
226
+
227
+ # Query devices
228
+ for device in api.devices("*spine*"):
229
+ print(f"{device.name}: {device.hostname}")
230
+
231
+ # Work with credentials
232
+ api.unlock("vault-password")
233
+ cred = api.credential("lab-admin")
234
+ print(f"Username: {cred.username}")
235
+ ```
236
+
237
+ ### Roadmap
238
+
239
+ The scripting API is the foundation for:
240
+
241
+ - **Command execution** — `api.connect()` and `api.send()` for programmatic device interaction
242
+ - **Batch operations** — Fan out commands across device groups
243
+ - **MCP tool integration** — Expose nterm capabilities to AI agents
244
+
245
+ See [scripting/README.md](nterm/scripting/README.md) for full API documentation.
246
+
247
+ ---
248
+
146
249
  ## Quick Start
147
250
 
148
251
  ### As a Widget
@@ -289,6 +392,7 @@ nterm/
289
392
  ├── session/
290
393
  │ ├── ssh.py # SSHSession (Paramiko) with legacy fallback
291
394
  │ ├── interactive_ssh.py # Native SSH + PTY
395
+ │ ├── local_terminal.py # Local shell/IPython sessions
292
396
  │ └── pty_transport.py # Cross-platform PTY
293
397
  ├── terminal/
294
398
  │ ├── widget.py # TerminalWidget (PyQt6 + xterm.js)
@@ -300,7 +404,10 @@ nterm/
300
404
  │ ├── store.py # Encrypted credential storage
301
405
  │ ├── resolver.py # Pattern-based resolution
302
406
  │ └── manager_ui.py # PyQt6 credential manager
303
- └── manager/ # Session tree, connection dialogs
407
+ ├── manager/ # Session tree, connection dialogs
408
+ └── scripting/ # API, CLI, automation support
409
+ ├── api.py # NTermAPI class
410
+ └── cli.py # nterm-cli entry point
304
411
  ```
305
412
 
306
413
  ---
@@ -6,7 +6,7 @@ PyQt6 terminal widget with encrypted credential vault, jump host chaining, YubiK
6
6
 
7
7
  Built for managing hundreds of devices through bastion hosts with hardware security keys.
8
8
 
9
- ![nterm screenshot](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/gruvbox.png)
9
+ ![nterm screenshot](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/slides.gif)
10
10
 
11
11
  ---
12
12
 
@@ -38,6 +38,12 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
38
38
  - Cross-platform keychain: macOS Keychain, Windows Credential Locker, Linux Secret Service
39
39
  - Full PyQt6 management UI
40
40
 
41
+ **Scripting API** *(Experimental)*
42
+ - Query device inventory and credentials programmatically
43
+ - Built-in IPython console with API pre-loaded
44
+ - CLI for shell scripts and automation
45
+ - Foundation for MCP tools and agentic workflows
46
+
41
47
  ---
42
48
 
43
49
  ## Screenshots
@@ -52,15 +58,48 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
52
58
 
53
59
  ---
54
60
 
61
+ ## Dev Console
62
+
63
+ nterm includes a built-in development console accessible via **Dev → IPython** or **Dev → Shell**. Open in a tab alongside your SSH sessions, or pop out to a separate window.
64
+
65
+ ![IPython Console](https://raw.githubusercontent.com/scottpeterman/nterm/main/screenshots/ipython.png)
66
+
67
+ The IPython console runs in the same Python environment as nterm, with the scripting API pre-loaded. Query your device inventory, inspect credentials, and prototype automation workflows without leaving the app.
68
+
69
+ ```python
70
+ # Available immediately when IPython opens
71
+ api.devices() # List all saved devices
72
+ api.search("leaf") # Search by name/hostname
73
+ api.credentials() # List credentials (after api.unlock())
74
+ api.help() # Show all commands
75
+ ```
76
+
77
+ **Use cases:**
78
+ - Debug connection issues with live access to session objects
79
+ - Prototype automation scripts against your real device inventory
80
+ - Test credential resolution patterns
81
+ - Build and test MCP tools interactively
82
+
83
+ Requires the `scripting` extra: `pip install ntermqt[scripting]`
84
+
85
+ ---
86
+
55
87
  ## Installation
56
88
 
89
+ ### Be aware due to a naming conflict, the pypi package is actually "ntermqt"
90
+
57
91
  ### From PyPI
58
92
 
93
+ https://pypi.org/project/ntermqt/
94
+
59
95
  ```bash
60
- pip install nterm
96
+ pip install ntermqt
61
97
 
62
- # Optional: system keychain support
63
- pip install nterm[keyring]
98
+ # With optional scripting support (IPython)
99
+ pip install ntermqt[scripting]
100
+
101
+ # With all optional features
102
+ pip install ntermqt[all]
64
103
 
65
104
  # Run
66
105
  nterm
@@ -78,10 +117,7 @@ source .venv/bin/activate # Linux/macOS
78
117
  # .venv\Scripts\activate # Windows
79
118
 
80
119
  # Install in development mode
81
- pip install -e .
82
-
83
- # Optional: system keychain support
84
- pip install keyring
120
+ pip install -e ".[all]"
85
121
 
86
122
  # Run
87
123
  nterm
@@ -101,12 +137,70 @@ python -m nterm
101
137
 
102
138
  | Platform | PTY | Keychain |
103
139
  |----------|-----|----------|
104
- | Linux | ✅ Native | Secret Service |
105
- | macOS | ✅ Native | macOS Keychain |
140
+ | Linux | ✅ pexpect | Secret Service |
141
+ | macOS | ✅ pexpect | macOS Keychain |
106
142
  | Windows 10+ | ✅ pywinpty | Credential Locker |
107
143
 
108
144
  ---
109
145
 
146
+ ## Scripting API *(Experimental)*
147
+
148
+ nterm includes a scripting API for programmatic access to your device inventory and credential vault. Use it from IPython, CLI, or Python scripts.
149
+
150
+ ### IPython Console
151
+
152
+ Open **Dev → IPython → Open in Tab** to get an interactive console with the API pre-loaded:
153
+
154
+ ```python
155
+ api.devices() # List all saved devices
156
+ api.search("leaf") # Search by name/hostname
157
+ api.devices("eng-*") # Glob pattern filter
158
+
159
+ api.unlock("vault-password") # Unlock credential vault
160
+ api.credentials() # List credentials (metadata only)
161
+
162
+ api.help() # Show all commands
163
+ ```
164
+
165
+ ### CLI
166
+
167
+ ```bash
168
+ nterm-cli devices # List all devices
169
+ nterm-cli search leaf # Search devices
170
+ nterm-cli device eng-leaf-1 # Device details
171
+ nterm-cli credentials --unlock # List credentials
172
+ nterm-cli --json devices # JSON output for scripting
173
+ ```
174
+
175
+ ### Python Scripts
176
+
177
+ ```python
178
+ from nterm.scripting import NTermAPI
179
+
180
+ api = NTermAPI()
181
+
182
+ # Query devices
183
+ for device in api.devices("*spine*"):
184
+ print(f"{device.name}: {device.hostname}")
185
+
186
+ # Work with credentials
187
+ api.unlock("vault-password")
188
+ cred = api.credential("lab-admin")
189
+ print(f"Username: {cred.username}")
190
+ ```
191
+
192
+ ### Roadmap
193
+
194
+ The scripting API is the foundation for:
195
+
196
+ - **Command execution** — `api.connect()` and `api.send()` for programmatic device interaction
197
+ - **Batch operations** — Fan out commands across device groups
198
+ - **MCP tool integration** — Expose nterm capabilities to AI agents
199
+
200
+ See [scripting/README.md](nterm/scripting/README.md) for full API documentation.
201
+
202
+ ---
203
+
110
204
  ## Quick Start
111
205
 
112
206
  ### As a Widget
@@ -253,6 +347,7 @@ nterm/
253
347
  ├── session/
254
348
  │ ├── ssh.py # SSHSession (Paramiko) with legacy fallback
255
349
  │ ├── interactive_ssh.py # Native SSH + PTY
350
+ │ ├── local_terminal.py # Local shell/IPython sessions
256
351
  │ └── pty_transport.py # Cross-platform PTY
257
352
  ├── terminal/
258
353
  │ ├── widget.py # TerminalWidget (PyQt6 + xterm.js)
@@ -264,7 +359,10 @@ nterm/
264
359
  │ ├── store.py # Encrypted credential storage
265
360
  │ ├── resolver.py # Pattern-based resolution
266
361
  │ └── manager_ui.py # PyQt6 credential manager
267
- └── manager/ # Session tree, connection dialogs
362
+ ├── manager/ # Session tree, connection dialogs
363
+ └── scripting/ # API, CLI, automation support
364
+ ├── api.py # NTermAPI class
365
+ └── cli.py # nterm-cli entry point
268
366
  ```
269
367
 
270
368
  ---