mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 09:01:15 +00:00
1.7 KiB
1.7 KiB
deskctl runtime contract
All commands support --json and use the same top-level envelope:
{
"success": true,
"data": {},
"error": null
}
Use --json whenever you need to parse output programmatically.
Stable window fields
Whenever a response includes a window payload, these fields are stable:
ref_idwindow_idtitleapp_namexywidthheightfocusedminimized
Use window_id for stable targeting inside a live daemon session. Use
ref_id or @wN for short-lived follow-up actions after snapshot or
list-windows.
Stable grouped reads
deskctl get active-window->data.windowdeskctl get monitors->data.count,data.monitorsdeskctl get version->data.version,data.backenddeskctl get systeminfo-> runtime-scoped diagnostic fields such asbackend,display,session_type,session,socket_path,screen,monitor_count, andmonitors
Stable waits
deskctl wait window->data.wait,data.selector,data.elapsed_ms,data.windowdeskctl wait focus->data.wait,data.selector,data.elapsed_ms,data.window
Stable structured error kinds
When a command fails with structured JSON data, these kind values are stable:
selector_not_foundselector_ambiguousselector_invalidtimeoutnot_found
Wait failures may also include window_not_focused in the last observation
payload.
Best-effort fields
Treat these as useful but non-contractual:
- exact monitor names
- incidental text formatting in non-JSON mode
- default screenshot file names when no explicit path was provided
- environment-dependent ordering details from the window manager