1use clap::Parser;
2
3#[derive(Debug, Default, Parser)]
8#[command(
9 name = "ua-tui",
10 about = "Terminal browser for OPC UA servers",
11 long_about = None,
12 after_help = "KEYBOARD SHORTCUTS (inside the TUI):\n \
13 Tab / Shift+Tab Move focus between widgets (skips disabled ones)\n \
14 Arrows / j / k Move within the focused widget\n \
15 Enter Select node (expands/collapses if it has children)\n \
16 Esc Clear current selection\n \
17 r Refresh selected node\n \
18 p Copy browse path of selected node\n \
19 n Copy NodeId of selected node\n \
20 v Copy Value attribute of selected node\n \
21 c Call selected Method (opens input dialog)\n \
22 Alt+Left/Right Resize tree width (when tree focused)\n \
23 Alt+Up/Down Resize attrs/refs split or log height (focus-dependent)\n \
24 q / Ctrl+C Quit (disconnects cleanly first)\n \
25 ? Show in-app help"
26)]
27pub struct TuiArgs {
28 #[arg(long, visible_alias = "endpoint", value_name = "URL")]
31 pub url: Option<String>,
32
33 #[arg(long, value_name = "PATH")]
37 pub path: Option<String>,
38}