| name | deskctl |
| description | Non-interactive X11 desktop control for AI agents. Use when the task involves controlling a Linux desktop - clicking, typing, reading windows, waiting for UI state, or taking screenshots inside a sandbox or VM. |
| allowed-tools | Bash(deskctl:*), Bash(npx deskctl:*), Bash(npm:*), Bash(which:*), Bash(printenv:*), Bash(echo:*) |
deskctl
Non-interactive desktop control CLI for Linux X11 agents.
All output follows the runtime contract defined in references/runtime-contract.md. Every command returns a stable JSON envelope when called with --json. Use --json whenever you need to parse output programmatically.
Quick start
npm install -g deskctl
deskctl doctor
deskctl snapshot --annotate
If deskctl was installed through npm, refresh it later with:
deskctl upgrade --yes
Agent loop
Every desktop interaction follows: observe -> wait -> act -> verify.
deskctl snapshot --annotate
deskctl wait window --selector 'title=Chromium' --timeout 10
deskctl click 'title=Chromium'
deskctl snapshot
See workflows/observe-act.sh for a reusable script. See workflows/poll-condition.sh for polling loops.
Selectors
ref=w1
id=win1
title=Chromium
class=chromium
focused
Bare strings like chromium do fuzzy matching but fail on ambiguity. Prefer explicit selectors.
References
Workflows