You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CLI.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,7 +302,8 @@ nothing.
302
302
|`--hide-on-empty-search`|| none |`hints`| Hide all hints when search query is empty (requires --search) |
303
303
|`--role`|| value, repeatable |`hints`| Filter by element role (comma-separated: button,link — the hints.clickable_roles vocabulary, see 'neru roles'). Repeat the flag to add more |
304
304
|`--text`|| value, repeatable |`hints`| Filter elements by text content (comma-separated, case-insensitive substring match). Repeat the flag to add more |
305
-
|`--strategy`|| value |`hints`| Element detection strategy: axtree (the platform accessibility tree), vision (screen recognition: the Vision framework on macOS, tesseract OCR on Linux), or wl-kbptr (contour detection via embedded C) |
305
+
|`--strategy`|| value |`hints`| Element detection strategy: axtree (the platform accessibility tree), vision (screen recognition: the Vision framework on macOS, tesseract OCR on Linux), or contour (edge and contour analysis of the window pixels, ported from wl-kbptr) |
306
+
|`--capture-scope`|| value |`hints`| Region the vision and contour strategies scan: window (the focused window) or screen (the whole active screen) |
306
307
|`--label-direction`|| value |`hints`| Hint label enumeration: normal (default, prefix-avoidance, prefers shorter labels) or reverse (spreads labels across the alphabet) |
307
308
|`--split-word`|| none |`hints`| Split detected text into word-level regions (requires vision strategy) |
308
309
|`--zoom-to-depth`|| value |`recursive_grid`| Auto-zoom to the given depth (a non-negative integer) in recursive-grid at the current cursor position |
Labels clickable UI elements with short overlay labels. By default uses the platform accessibility tree (`axtree` strategy). Optionally uses on-screen recognition (`vision` strategy) for apps whose accessibility tree is too thin to hint from — detects elements from a screen capture scoped to the focused window, through the Vision framework on macOS (text plus rectangles) and tesseract OCR on Linux (text only). On Linux, the `wl-kbptr` strategy detects buttons, icons, and text by running contour detection directly on the captured window buffer without external library dependencies.
768
+
Labels clickable UI elements with short overlay labels. By default uses the platform accessibility tree (`axtree` strategy). Two screen-capture strategies exist for apps whose accessibility tree is too thin to hint from; both scan the focused window by default (`capture_scope` widens that to the whole screen), both add the system surfaces the `include_*` options ask for from the accessibility tree, and neither is available on Windows, which has no capture backend:
769
+
770
+
-`vision`: on-screen recognition. The Vision framework on macOS (text plus rectangles), tesseract OCR on Linux (text only). Detected text becomes the element's title, so hint search (`--search`) and `--split-word` work. Costs an ML or OCR pass per activation, and on Linux needs tesseract installed.
771
+
-`contour`: edge and contour analysis of the window pixels, an algorithm ported from [wl-kbptr](https://github.com/moverest/wl-kbptr). Finds anything with a visible outline (buttons, icons, toolbar items, text runs) in a few milliseconds with no external dependency. Elements carry no text, so search and word splitting do not apply, and `hints.vision.*` is not read.
772
+
773
+
Pick `vision` when you want to type what you see, or the app is text-heavy. Pick `contour` when latency matters, the targets are icons rather than words, or OCR is not installed. Both are overridable per-app.
769
774
770
775
Press `/` to text-search elements. `Space` for multi-word queries. `Return` confirms filtered hints (first is auto-selected). `Escape` cancels search.
771
776
@@ -776,7 +781,8 @@ Start with search visible: `neru hints --search` (see [CLI.md](CLI.md#neru-hints
|`strategy`| string |`"axtree"`| Element detection strategy: `"axtree"` (the platform accessibility tree), `"vision"` (screen recognition — Vision framework on macOS, tesseract OCR on Linux, unavailable on Windows), or `"wl-kbptr"` (Linux only contour detection replicated from wl-kbptr). Vision and wl-kbptr modes detect the frontmost window content from a screen capture while still using the accessibility tree for system elements (menubar, dock, NC). Overridable per-app via `[hints.app_configs]`. |
784
+
|`strategy`| string |`"axtree"`| Element detection strategy: `"axtree"` (the platform accessibility tree), `"vision"` (screen recognition — Vision framework on macOS, tesseract OCR on Linux, unavailable on Windows), or `"contour"` (edge and contour analysis ported from wl-kbptr, macOS and Linux, unavailable on Windows). Both capture strategies detect the focused window content from a screen capture; see the section intro for when to pick which. Overridable per-app via `[hints.app_configs]`. |
785
+
|`capture_scope`| string |`"window"`| Region the `vision` and `contour` strategies scan: `"window"` (the focused window, or the whole screen when nothing is focused) or `"screen"` (the whole active screen, so notifications, panels and adjacent tiled windows get hints too, at the cost of a bigger capture). Ignored by `axtree`. Overridable per-app via `[hints.app_configs]` and per-activation via `neru hints --capture-scope`. |
780
786
|`hint_characters`| string |`"asdfghjkl"`| Characters used for labels |
781
787
|`label_direction`| string |`"normal"`| Hint label algorithm: `"normal"` (default, prefix-avoidance greedy) or `"reverse"` (reverse-order tiers). Empty value defaults to `"normal"`. Overridable per-app via `[hints.app_configs]` and per-activation via the `neru hints --label-direction` CLI flag. See [Choosing a label direction](#choosing-a-label-direction) below. |
782
788
|`max_depth`| int |`50`| Max accessibility tree depth (0 = unlimited) |
@@ -1023,7 +1029,8 @@ You can also mix directions per-app via `[hints.app_configs]` or per-activation
|`strategy`| string | Override element detection strategy for this app (`"axtree"`, `"vision"`, or `"wl-kbptr"`). Empty string = use global `hints.strategy`. |
1032
+
|`strategy`| string | Override element detection strategy for this app (`"axtree"`, `"vision"`, or `"contour"`). Empty string = use global `hints.strategy`. |
1033
+
|`capture_scope`| string | Override the region the `vision` and `contour` strategies scan for this app (`"window"` or `"screen"`). Empty string = use global `hints.capture_scope`. |
1027
1034
|`label_direction`| string | Override hint label algorithm for this app (`"normal"` or `"reverse"`). Empty string = use global `hints.label_direction`. See [Choosing a label direction](#choosing-a-label-direction). |
1028
1035
|`additional_clickable_roles`| array | Extra roles to treat as clickable, same vocabulary as [`clickable_roles`](#clickable-roles)|
1029
1036
|`ignore_clickable_check`| bool | Skip clickability heuristic for this app |
Copy file name to clipboardExpand all lines: docs/CROSS_PLATFORM.md
+18-10Lines changed: 18 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,9 +346,10 @@ places those pixels.
346
346
⁷ Linux `vision` is **text-only**, and permanently so. macOS runs three Vision
347
347
requests — text recognition, rectangle detection and saliency — and an OCR
348
348
engine answers the first. `hints.vision.detect_rectangles` and the four
349
-
`rectangle_*` options are therefore declared macOS-only rather than met with a
350
-
contour-detection library, which would be a heavy new required dependency for a
351
-
sub-feature of a non-default strategy
349
+
`rectangle_*` options are therefore declared macOS-only: they tune the Vision
350
+
framework's rectangle request, which has no OCR equivalent. The `contour`
351
+
strategy is a separate, dependency-free detector, not an implementation of
352
+
`detect_rectangles`
352
353
([ADR 0013](./adr/0013-parity-is-measured-in-words-not-subsystems.md)). The
353
354
other fourteen `hints.vision.*` options are read on Linux exactly as they are on
354
355
macOS.
@@ -1058,12 +1059,18 @@ green in every cell while an option means nothing, which is exactly how
1058
1059
|`recursive_grid.app_configs.strategy = vision`| option | ✅ | ✅ | ❌ | the vision strategy needs an element-detection engine, which macOS has in the Vision framework and Linux in tesseract; Windows has neither, so it finds nothing there and none of its settings are read; use axtree |
1059
1060
|`scroll.app_configs.strategy = vision`| option | ✅ | ✅ | ❌ | the vision strategy needs an element-detection engine, which macOS has in the Vision framework and Linux in tesseract; Windows has neither, so it finds nothing there and none of its settings are read; use axtree |
1060
1061
|`app_configs.strategy = vision`| option | ✅ | ✅ | ❌ | the vision strategy needs an element-detection engine, which macOS has in the Vision framework and Linux in tesseract; Windows has neither, so it finds nothing there and none of its settings are read; use axtree |
1061
-
|`hints.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1062
-
|`hints.app_configs.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1063
-
|`grid.app_configs.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1064
-
|`recursive_grid.app_configs.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1065
-
|`scroll.app_configs.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1066
-
|`app_configs.strategy = wl-kbptr`| option | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1062
+
|`hints.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1063
+
|`hints.app_configs.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1064
+
|`grid.app_configs.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1065
+
|`recursive_grid.app_configs.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1066
+
|`scroll.app_configs.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1067
+
|`app_configs.strategy = contour`| option | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1068
+
|`hints.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1069
+
|`hints.app_configs.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1070
+
|`grid.app_configs.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1071
+
|`recursive_grid.app_configs.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1072
+
|`scroll.app_configs.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1073
+
|`app_configs.capture_scope`| option | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1067
1074
|`recursive_grid.animation.enabled`| option | ✅ | ✅ | ❌ | the Windows overlay backend has no grid transition animation |
1068
1075
|`recursive_grid.animation.duration_ms`| option | ✅ | ✅ | ❌ | the Windows overlay backend has no grid transition animation |
1069
1076
|`monitor_select.enabled`| option | ✅ | ✅ | ❌ | monitor_select needs the optional MonitorSelector overlay extension, which the Windows backend does not implement |
@@ -1098,7 +1105,8 @@ green in every cell while an option means nothing, which is exactly how
1098
1105
|`smooth_scroll.duration_per_pixel`| option | ✅ | ✅ | ❌ | the Windows scroll is injected in one step; macOS and Linux animate it, and on X11 the steps are whole wheel notches because X has no smaller scroll to send |
1099
1106
|`--split-word`| mode flag | ✅ | ✅ | ❌ | splitting detected text into words needs the vision strategy, which Windows has no engine for; there the flag is refused rather than ignored |
1100
1107
|`--strategy=vision`| mode flag | ✅ | ✅ | ❌ | the vision strategy needs an element-detection engine, which macOS has in the Vision framework and Linux in tesseract; Windows has neither, so detection returns nothing and no hints appear; use axtree |
1101
-
|`--strategy=wl-kbptr`| mode flag | ❌ | ✅ | ❌ | the wl-kbptr strategy detects UI elements via contour analysis of screen captures on Linux |
1108
+
|`--strategy=contour`| mode flag | ✅ | ✅ | ❌ | the contour strategy runs edge detection over a screen capture, which macOS and Linux can take and Windows cannot; there it finds nothing, use axtree |
1109
+
|`--capture-scope`| mode flag | ✅ | ✅ | ❌ | capture_scope only shapes the vision and contour strategies, and Windows has no capture backend for either |
1102
1110
|`hide_cursor`| action | ✅ | ❌ | ❌ | a Wayland client may not hide another client's cursor, and the blessed Linux stack is Wayland; Windows has no equivalent either |
1103
1111
|`show_cursor`| action | ✅ | ❌ | ❌ | a Wayland client may not hide another client's cursor, and the blessed Linux stack is Wayland; Windows has no equivalent either |
1104
1112
|`scroll_left`| action | ✅ | ✅ | ❌ | the Windows wheel event carries no horizontal delta, so a sideways scroll injects nothing |
0 commit comments