ntermqt 0.1.7__tar.gz → 0.1.9__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.
- {ntermqt-0.1.7/ntermqt.egg-info → ntermqt-0.1.9}/PKG-INFO +89 -29
- {ntermqt-0.1.7 → ntermqt-0.1.9}/README.md +88 -28
- ntermqt-0.1.9/nterm/parser/api_help_dialog.py +810 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/scripting/api.py +421 -701
- ntermqt-0.1.9/nterm/scripting/models.py +195 -0
- ntermqt-0.1.9/nterm/scripting/platform_data.py +272 -0
- ntermqt-0.1.9/nterm/scripting/platform_utils.py +596 -0
- ntermqt-0.1.9/nterm/scripting/repl.py +806 -0
- ntermqt-0.1.9/nterm/scripting/repl_interactive.py +561 -0
- ntermqt-0.1.9/nterm/scripting/ssh_connection.py +632 -0
- ntermqt-0.1.9/nterm/scripting/test_api_repl.py +290 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9/ntermqt.egg-info}/PKG-INFO +89 -29
- {ntermqt-0.1.7 → ntermqt-0.1.9}/ntermqt.egg-info/SOURCES.txt +5 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/pyproject.toml +1 -1
- ntermqt-0.1.7/nterm/parser/api_help_dialog.py +0 -607
- ntermqt-0.1.7/nterm/scripting/repl.py +0 -410
- ntermqt-0.1.7/nterm/scripting/repl_interactive.py +0 -418
- {ntermqt-0.1.7 → ntermqt-0.1.9}/MANIFEST.in +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/__main__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/askpass/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/askpass/server.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/config.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/connection/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/connection/profile.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/connect_dialog.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/editor.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/io.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/models.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/settings.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/manager/tree.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/parser/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/parser/ntc_download_dialog.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/parser/tfsm_engine.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/parser/tfsm_fire.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/parser/tfsm_fire_tester.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/resources.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/scripting/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/scripting/cli.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/askpass_ssh.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/base.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/interactive_ssh.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/local_terminal.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/pty_transport.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/session/ssh.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/bridge.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/terminal.html +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/terminal.js +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/xterm-addon-fit.min.js +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/xterm-addon-unicode11.min.js +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/xterm-addon-web-links.min.js +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/xterm.css +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/resources/xterm.min.js +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/terminal/widget.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/engine.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/stylesheet.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/clean.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/default.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/dracula.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/enterprise_dark.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/enterprise_hybrid.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/enterprise_light.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/gruvbox_dark.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/gruvbox_hybrid.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/gruvbox_light.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/theme/themes/nord_hybrid.yaml +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/__init__.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/credential_manager.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/keychain.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/manager_ui.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/profile.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/resolver.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/nterm/vault/store.py +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/ntermqt.egg-info/dependency_links.txt +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/ntermqt.egg-info/entry_points.txt +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/ntermqt.egg-info/requires.txt +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/ntermqt.egg-info/top_level.txt +0 -0
- {ntermqt-0.1.7 → ntermqt-0.1.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ntermqt
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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
|
|
@@ -85,10 +85,11 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
|
|
|
85
85
|
- Cross-platform keychain: macOS Keychain, Windows Credential Locker, Linux Secret Service
|
|
86
86
|
- Full PyQt6 management UI
|
|
87
87
|
|
|
88
|
-
**Scripting API**
|
|
88
|
+
**Scripting API**
|
|
89
89
|
- Query device inventory and credentials programmatically
|
|
90
90
|
- Built-in IPython console with API pre-loaded
|
|
91
|
-
-
|
|
91
|
+
- **Platform-aware commands** - one API, correct syntax everywhere
|
|
92
|
+
- **Interactive REPL** with quick commands and structured output
|
|
92
93
|
- Foundation for MCP tools and agentic workflows
|
|
93
94
|
|
|
94
95
|
---
|
|
@@ -111,7 +112,7 @@ nterm includes a built-in development console accessible via **Dev → IPython**
|
|
|
111
112
|
|
|
112
113
|

|
|
113
114
|
|
|
114
|
-

|
|
115
116
|
|
|
116
117
|
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.
|
|
117
118
|
|
|
@@ -192,9 +193,9 @@ python -m nterm
|
|
|
192
193
|
|
|
193
194
|
---
|
|
194
195
|
|
|
195
|
-
## Scripting API
|
|
196
|
+
## Scripting API
|
|
196
197
|
|
|
197
|
-
nterm includes a scripting API for programmatic access to your device inventory and
|
|
198
|
+
nterm includes a full scripting API for programmatic access to your device inventory, credential vault, and network devices. Use it from IPython, CLI, or Python scripts.
|
|
198
199
|
|
|
199
200
|
### IPython Console
|
|
200
201
|
|
|
@@ -204,49 +205,103 @@ Open **Dev → IPython → Open in Tab** to get an interactive console with the
|
|
|
204
205
|
api.devices() # List all saved devices
|
|
205
206
|
api.search("leaf") # Search by name/hostname
|
|
206
207
|
api.devices("eng-*") # Glob pattern filter
|
|
208
|
+
api.folders() # List all folders
|
|
207
209
|
|
|
208
210
|
api.unlock("vault-password") # Unlock credential vault
|
|
209
211
|
api.credentials() # List credentials (metadata only)
|
|
210
212
|
|
|
213
|
+
# Connect and execute commands
|
|
214
|
+
with api.session("usa-leaf-1") as s:
|
|
215
|
+
result = api.send(s, "show version")
|
|
216
|
+
print(result.parsed_data)
|
|
217
|
+
|
|
211
218
|
api.help() # Show all commands
|
|
212
219
|
```
|
|
213
220
|
|
|
214
|
-
###
|
|
221
|
+
### Interactive REPL
|
|
215
222
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
Start the REPL for interactive device exploration with platform-aware quick commands:
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
api.repl()
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
nterm> :unlock
|
|
231
|
+
nterm> :connect usa-leaf-1
|
|
232
|
+
|
|
233
|
+
📊 usa-leaf-1> :version
|
|
234
|
+
──────────────────────────────────────────────────
|
|
235
|
+
Version: 15.2(4.0.55)E
|
|
236
|
+
Hardware: IOSv
|
|
237
|
+
Serial: 9J0PD0QB9W1
|
|
238
|
+
Uptime: 1 week, 4 days, 7 minutes
|
|
239
|
+
──────────────────────────────────────────────────
|
|
240
|
+
|
|
241
|
+
📊 usa-leaf-1> :neighbors
|
|
242
|
+
Local Interface Neighbor Remote Port
|
|
243
|
+
----------------------------------------------------------------
|
|
244
|
+
Gi0/0 usa-spine-2.lab.local Ethernet1
|
|
245
|
+
Gi0/1 usa-spine-1.lab.local Ethernet1
|
|
246
|
+
|
|
247
|
+
📊 usa-leaf-1> :interfaces
|
|
248
|
+
[Rich formatted interface table]
|
|
222
249
|
```
|
|
223
250
|
|
|
251
|
+
**Quick Commands:**
|
|
252
|
+
- `:version` - Structured version info
|
|
253
|
+
- `:config` - Running configuration
|
|
254
|
+
- `:interfaces` - Interface status
|
|
255
|
+
- `:neighbors` - CDP/LLDP neighbors (auto-detects)
|
|
256
|
+
- `:bgp` - BGP summary
|
|
257
|
+
- `:routes` - Routing table
|
|
258
|
+
|
|
224
259
|
### Python Scripts
|
|
225
260
|
|
|
226
261
|
```python
|
|
227
262
|
from nterm.scripting import NTermAPI
|
|
228
263
|
|
|
229
264
|
api = NTermAPI()
|
|
265
|
+
api.unlock("vault-password")
|
|
230
266
|
|
|
231
|
-
#
|
|
267
|
+
# Context manager for automatic cleanup
|
|
232
268
|
for device in api.devices("*spine*"):
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
269
|
+
with api.session(device.name) as s:
|
|
270
|
+
# Platform-aware commands - works on Cisco, Arista, Juniper
|
|
271
|
+
result = api.send_platform_command(s, 'version')
|
|
272
|
+
print(f"{device.name}: {result.parsed_data[0].get('VERSION')}")
|
|
273
|
+
|
|
274
|
+
# Try multiple commands until one works
|
|
275
|
+
with api.session("router1") as s:
|
|
276
|
+
result = api.send_first(s, [
|
|
277
|
+
"show cdp neighbors detail",
|
|
278
|
+
"show lldp neighbors detail",
|
|
279
|
+
])
|
|
239
280
|
```
|
|
240
281
|
|
|
241
|
-
###
|
|
282
|
+
### CLI
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
nterm-cli devices # List all devices
|
|
286
|
+
nterm-cli search leaf # Search devices
|
|
287
|
+
nterm-cli device eng-leaf-1 # Device details
|
|
288
|
+
nterm-cli credentials --unlock # List credentials
|
|
289
|
+
nterm-cli --json devices # JSON output for scripting
|
|
290
|
+
```
|
|
242
291
|
|
|
243
|
-
|
|
292
|
+
### Key Features
|
|
244
293
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
294
|
+
| Feature | Description |
|
|
295
|
+
|---------|-------------|
|
|
296
|
+
| **Context Manager** | `with api.session()` auto-disconnects |
|
|
297
|
+
| **Platform-Aware** | `send_platform_command()` picks correct syntax |
|
|
298
|
+
| **Fallback Commands** | `send_first()` tries alternatives |
|
|
299
|
+
| **Structured Output** | TextFSM parsing to List[Dict] |
|
|
300
|
+
| **ANSI Filtering** | Clean output, no escape sequences |
|
|
301
|
+
| **Paging Detection** | Raises error if paging not disabled |
|
|
248
302
|
|
|
249
|
-
See [scripting/
|
|
303
|
+
See [scripting/README_API_IPython.md](nterm/scripting/README_API_IPython.md) for full API documentation.
|
|
304
|
+
See [scripting/README_REPL.md](nterm/scripting/README_REPL.md) for REPL documentation.
|
|
250
305
|
|
|
251
306
|
---
|
|
252
307
|
|
|
@@ -436,9 +491,14 @@ nterm/
|
|
|
436
491
|
│ ├── resolver.py # Pattern-based resolution
|
|
437
492
|
│ └── manager_ui.py # PyQt6 credential manager
|
|
438
493
|
├── manager/ # Session tree, connection dialogs
|
|
439
|
-
└── scripting/ # API,
|
|
440
|
-
├── api.py
|
|
441
|
-
|
|
494
|
+
└── scripting/ # API, REPL, automation support
|
|
495
|
+
├── api.py # NTermAPI class
|
|
496
|
+
├── models.py # ActiveSession, CommandResult, DeviceInfo
|
|
497
|
+
├── platform_data.py # Platform commands and patterns
|
|
498
|
+
├── platform_utils.py # Platform detection, extraction helpers
|
|
499
|
+
├── ssh_connection.py # Low-level SSH with ANSI filtering
|
|
500
|
+
├── repl.py # NTermREPL command router
|
|
501
|
+
└── repl_interactive.py # Interactive REPL display
|
|
442
502
|
```
|
|
443
503
|
|
|
444
504
|
---
|
|
@@ -40,10 +40,11 @@ Built for managing hundreds of devices through bastion hosts with hardware secur
|
|
|
40
40
|
- Cross-platform keychain: macOS Keychain, Windows Credential Locker, Linux Secret Service
|
|
41
41
|
- Full PyQt6 management UI
|
|
42
42
|
|
|
43
|
-
**Scripting API**
|
|
43
|
+
**Scripting API**
|
|
44
44
|
- Query device inventory and credentials programmatically
|
|
45
45
|
- Built-in IPython console with API pre-loaded
|
|
46
|
-
-
|
|
46
|
+
- **Platform-aware commands** - one API, correct syntax everywhere
|
|
47
|
+
- **Interactive REPL** with quick commands and structured output
|
|
47
48
|
- Foundation for MCP tools and agentic workflows
|
|
48
49
|
|
|
49
50
|
---
|
|
@@ -66,7 +67,7 @@ nterm includes a built-in development console accessible via **Dev → IPython**
|
|
|
66
67
|
|
|
67
68
|

|
|
68
69
|
|
|
69
|
-

|
|
70
71
|
|
|
71
72
|
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.
|
|
72
73
|
|
|
@@ -147,9 +148,9 @@ python -m nterm
|
|
|
147
148
|
|
|
148
149
|
---
|
|
149
150
|
|
|
150
|
-
## Scripting API
|
|
151
|
+
## Scripting API
|
|
151
152
|
|
|
152
|
-
nterm includes a scripting API for programmatic access to your device inventory and
|
|
153
|
+
nterm includes a full scripting API for programmatic access to your device inventory, credential vault, and network devices. Use it from IPython, CLI, or Python scripts.
|
|
153
154
|
|
|
154
155
|
### IPython Console
|
|
155
156
|
|
|
@@ -159,49 +160,103 @@ Open **Dev → IPython → Open in Tab** to get an interactive console with the
|
|
|
159
160
|
api.devices() # List all saved devices
|
|
160
161
|
api.search("leaf") # Search by name/hostname
|
|
161
162
|
api.devices("eng-*") # Glob pattern filter
|
|
163
|
+
api.folders() # List all folders
|
|
162
164
|
|
|
163
165
|
api.unlock("vault-password") # Unlock credential vault
|
|
164
166
|
api.credentials() # List credentials (metadata only)
|
|
165
167
|
|
|
168
|
+
# Connect and execute commands
|
|
169
|
+
with api.session("usa-leaf-1") as s:
|
|
170
|
+
result = api.send(s, "show version")
|
|
171
|
+
print(result.parsed_data)
|
|
172
|
+
|
|
166
173
|
api.help() # Show all commands
|
|
167
174
|
```
|
|
168
175
|
|
|
169
|
-
###
|
|
176
|
+
### Interactive REPL
|
|
170
177
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
Start the REPL for interactive device exploration with platform-aware quick commands:
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
api.repl()
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
nterm> :unlock
|
|
186
|
+
nterm> :connect usa-leaf-1
|
|
187
|
+
|
|
188
|
+
📊 usa-leaf-1> :version
|
|
189
|
+
──────────────────────────────────────────────────
|
|
190
|
+
Version: 15.2(4.0.55)E
|
|
191
|
+
Hardware: IOSv
|
|
192
|
+
Serial: 9J0PD0QB9W1
|
|
193
|
+
Uptime: 1 week, 4 days, 7 minutes
|
|
194
|
+
──────────────────────────────────────────────────
|
|
195
|
+
|
|
196
|
+
📊 usa-leaf-1> :neighbors
|
|
197
|
+
Local Interface Neighbor Remote Port
|
|
198
|
+
----------------------------------------------------------------
|
|
199
|
+
Gi0/0 usa-spine-2.lab.local Ethernet1
|
|
200
|
+
Gi0/1 usa-spine-1.lab.local Ethernet1
|
|
201
|
+
|
|
202
|
+
📊 usa-leaf-1> :interfaces
|
|
203
|
+
[Rich formatted interface table]
|
|
177
204
|
```
|
|
178
205
|
|
|
206
|
+
**Quick Commands:**
|
|
207
|
+
- `:version` - Structured version info
|
|
208
|
+
- `:config` - Running configuration
|
|
209
|
+
- `:interfaces` - Interface status
|
|
210
|
+
- `:neighbors` - CDP/LLDP neighbors (auto-detects)
|
|
211
|
+
- `:bgp` - BGP summary
|
|
212
|
+
- `:routes` - Routing table
|
|
213
|
+
|
|
179
214
|
### Python Scripts
|
|
180
215
|
|
|
181
216
|
```python
|
|
182
217
|
from nterm.scripting import NTermAPI
|
|
183
218
|
|
|
184
219
|
api = NTermAPI()
|
|
220
|
+
api.unlock("vault-password")
|
|
185
221
|
|
|
186
|
-
#
|
|
222
|
+
# Context manager for automatic cleanup
|
|
187
223
|
for device in api.devices("*spine*"):
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
224
|
+
with api.session(device.name) as s:
|
|
225
|
+
# Platform-aware commands - works on Cisco, Arista, Juniper
|
|
226
|
+
result = api.send_platform_command(s, 'version')
|
|
227
|
+
print(f"{device.name}: {result.parsed_data[0].get('VERSION')}")
|
|
228
|
+
|
|
229
|
+
# Try multiple commands until one works
|
|
230
|
+
with api.session("router1") as s:
|
|
231
|
+
result = api.send_first(s, [
|
|
232
|
+
"show cdp neighbors detail",
|
|
233
|
+
"show lldp neighbors detail",
|
|
234
|
+
])
|
|
194
235
|
```
|
|
195
236
|
|
|
196
|
-
###
|
|
237
|
+
### CLI
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
nterm-cli devices # List all devices
|
|
241
|
+
nterm-cli search leaf # Search devices
|
|
242
|
+
nterm-cli device eng-leaf-1 # Device details
|
|
243
|
+
nterm-cli credentials --unlock # List credentials
|
|
244
|
+
nterm-cli --json devices # JSON output for scripting
|
|
245
|
+
```
|
|
197
246
|
|
|
198
|
-
|
|
247
|
+
### Key Features
|
|
199
248
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
249
|
+
| Feature | Description |
|
|
250
|
+
|---------|-------------|
|
|
251
|
+
| **Context Manager** | `with api.session()` auto-disconnects |
|
|
252
|
+
| **Platform-Aware** | `send_platform_command()` picks correct syntax |
|
|
253
|
+
| **Fallback Commands** | `send_first()` tries alternatives |
|
|
254
|
+
| **Structured Output** | TextFSM parsing to List[Dict] |
|
|
255
|
+
| **ANSI Filtering** | Clean output, no escape sequences |
|
|
256
|
+
| **Paging Detection** | Raises error if paging not disabled |
|
|
203
257
|
|
|
204
|
-
See [scripting/
|
|
258
|
+
See [scripting/README_API_IPython.md](nterm/scripting/README_API_IPython.md) for full API documentation.
|
|
259
|
+
See [scripting/README_REPL.md](nterm/scripting/README_REPL.md) for REPL documentation.
|
|
205
260
|
|
|
206
261
|
---
|
|
207
262
|
|
|
@@ -391,9 +446,14 @@ nterm/
|
|
|
391
446
|
│ ├── resolver.py # Pattern-based resolution
|
|
392
447
|
│ └── manager_ui.py # PyQt6 credential manager
|
|
393
448
|
├── manager/ # Session tree, connection dialogs
|
|
394
|
-
└── scripting/ # API,
|
|
395
|
-
├── api.py
|
|
396
|
-
|
|
449
|
+
└── scripting/ # API, REPL, automation support
|
|
450
|
+
├── api.py # NTermAPI class
|
|
451
|
+
├── models.py # ActiveSession, CommandResult, DeviceInfo
|
|
452
|
+
├── platform_data.py # Platform commands and patterns
|
|
453
|
+
├── platform_utils.py # Platform detection, extraction helpers
|
|
454
|
+
├── ssh_connection.py # Low-level SSH with ANSI filtering
|
|
455
|
+
├── repl.py # NTermREPL command router
|
|
456
|
+
└── repl_interactive.py # Interactive REPL display
|
|
397
457
|
```
|
|
398
458
|
|
|
399
459
|
---
|