This reference follows the verified 0.1.0 command catalog. Platform support and negotiated capabilities still apply; check your installed build before using an option.
Observe, act, verify
The values USER, SESSION, OBSERVATION, X and Y are placeholders. Supply a password to stdin and close the stream; --password-stdin is not an interactive prompt. Save data.session, read before.png, choose coordinates from that image, then read after.png to verify the effect. Input dispatch alone is not task completion.
rdp-cli connect --host desktop.example.net --user USER --password-stdin
rdp-cli screenshot --session SESSION --out before.png
rdp-cli click --session SESSION --desktop --x X --y Y --observation OBSERVATION
rdp-cli screenshot --session SESSION --out after.png
Run --version to identify your build capabilities. --help-json returns the machine-readable catalog; COMMAND --help shows its full option descriptions without starting a session.
rdp-cli --version
rdp-cli --help-json
rdp-cli connect --help
JSON and shared options
Ordinary commands return one UTF-8 JSON object on stdout: ok: true with data, or ok: false with error. stderr contains diagnostics. Exit codes are 0 for success, 1 for an operational failure and 2 for invalid arguments.
Help is plain text. events --follow streams NDJSON; ordinary events returns one JSON result containing data.events and data.ndjson. In Windows PowerShell 5.1, set both [Console]::OutputEncoding and $OutputEncoding to UTF-8 when sending or reading non-ASCII text.
data.session- Keep the session ID returned by connect for later commands.
data.observation- Use the screenshot token for input; capture again after reconnection, control changes or layout changes.
data.capabilities- Inspect negotiated support before choosing files, audio, clipboard or display operations.
data.state / data.remote_outcome- queued, sent, partial, unknown, cancelled and failed describe input progress. remote_outcome: not_confirmed still requires visual verification.
data.transfer_id- Use the transfer ID with files status or files cancel; wait for a terminal transfer state and inspect completed file hashes.
error.code / error.message / error.retryable- Use the stable error code for decisions, the message for context and retryable as a hint, not permission to repeat an action blindly.
All commands accept --request-id and --timeout-ms. Reuse a request ID only with the identical command and arguments within the retention window. A local timeout does not prove that input was never sent; query operations status before retrying.
--request-id ID · --timeout-ms MILLISECONDS Sessions
connect requires --host and, for RDP, --user. RDP defaults to port 3389; VNC to 5900. For connections requiring password authentication, choose exactly one password source: --password, --password-stdin or --credential-ref. VNC with --vnc-security none uses no password source. --domain is for RDP accounts; --size and --layout are mutually exclusive. --connect-timeout-ms bounds connection setup. reconnect keeps the session paused; disconnect closes the connection without logging off the remote user.
rdp-cli connect#
Create and connect a persistent RDP or VNC session
No session argument.
rdp-cli connect --help
rdp-cli list#
List sessions visible to the caller
No session argument.
rdp-cli list --help
rdp-cli status#
Get a coherent session status snapshot
Requires --session SESSION.
rdp-cli status --help
rdp-cli reconnect#
Reconnect a non-closed session and remain paused
Requires --session SESSION.
rdp-cli reconnect --help
rdp-cli disconnect#
Close a session without logging off Windows
Requires --session SESSION.
rdp-cli disconnect --help
Viewers and desktop status
watch opens a read-only human viewer; Agent commands do not need it. Select --viewer window or web. presence show/hide controls local desktop status; --floating adds controls and --panel opens the session panel on macOS or Linux. Closing a read-only viewer keeps the connection alive.
rdp-cli watch#
Open or activate a viewer for human observation; not required for Agent commands
Requires --session SESSION.
rdp-cli watch --help
rdp-cli presence show#
Show desktop session presence
No session argument.
rdp-cli presence show --help
rdp-cli presence hide#
Hide desktop presence without closing sessions
No session argument.
rdp-cli presence hide --help
Control and handoff
pause accepts one --session or --all and revokes human control. resume returns a paused session to its Agent. control take requires the connected viewer ID; release can identify that viewer or a target Agent. Respect a human pause and obtain a fresh screenshot after control is returned.
rdp-cli pause#
Stop normal input and revoke human control
Choose exactly one: --session SESSION or --all.
rdp-cli pause --help
rdp-cli resume#
Return a paused session to its Agent
Requires --session SESSION.
rdp-cli resume --help
rdp-cli control take#
Give a connected viewer the human lease
Requires --session SESSION.
rdp-cli control take --help
rdp-cli control release#
Return the human lease to an Agent
Requires --session SESSION.
rdp-cli control release --help
Files
--path is relative to the session exchange drive, not an arbitrary remote disk. --local names a client file or directory. Replacement requires --overwrite. upload/download return a transfer ID; status without an ID lists transfers. cancel can leave completed files; cleanup removes selected exchange content and can return FILE_BUSY.
rdp-cli files list#
List exchange-drive content
Requires --session SESSION.
rdp-cli files list --help
rdp-cli files upload#
Upload into the session exchange drive
Requires --session SESSION.
rdp-cli files upload --help
rdp-cli files download#
Download from the session exchange drive
Requires --session SESSION.
rdp-cli files download --help
rdp-cli files status#
Get transfer status
Requires --session SESSION.
rdp-cli files status --help
rdp-cli files cancel#
Cancel a transfer
Requires --session SESSION.
rdp-cli files cancel --help
rdp-cli files cleanup#
Remove selected exchange content
Requires --session SESSION.
rdp-cli files cleanup --help
Sound and microphone
audio status reports negotiated capabilities. mute and volume address one --viewer-id; mute uses on/off and volume uses a positive --percent. audio microphone can only inspect or stop a source. Starting a microphone requires a person to enable it in an authorized viewer while holding control.
rdp-cli audio status#
Get session audio capabilities and sources
Requires --session SESSION.
rdp-cli audio status --help
rdp-cli audio mute#
Mute or unmute one viewer
Requires --session SESSION.
rdp-cli audio mute --help
rdp-cli audio volume#
Set one viewer's playback gain
Requires --session SESSION.
rdp-cli audio volume --help
rdp-cli audio microphone#
Query or stop an active microphone source
Requires --session SESSION.
rdp-cli audio microphone --help
Displays
monitors returns negotiated topology. monitors set accepts layout JSON or @file; --allow-reconnect permits reconnect when a live layout change is unavailable. Read the resulting topology and take a new screenshot before input. VNC can report its framebuffer but rejects requested layout changes.
rdp-cli monitors#
Get negotiated monitor topology
Requires --session SESSION.
rdp-cli monitors --help
rdp-cli monitors set#
Change monitor topology
Requires --session SESSION.
rdp-cli monitors set --help
Browser access
web start configures the listener and TLS certificate/key or trusted proxy; --ice-server can repeat. Use LAN/VPN access with HTTPS and authorization outside loopback. access grant requires repeated --permission values and --expires-in seconds. Permissions include session.observe, session.control, clipboard.read/write, files.read/write and audio.listen/send. Revocation stops that grant’s live streams.
rdp-cli web start#
Start the embedded authenticated Web service
No session argument.
rdp-cli web start --help
rdp-cli web status#
Get Web service status
No session argument.
rdp-cli web status --help
rdp-cli web stop#
Stop Web access without closing RDP
No session argument.
rdp-cli web stop --help
rdp-cli access grant#
Create a scoped Web grant
Requires --session SESSION.
rdp-cli access grant --help
rdp-cli access list#
List scoped Web grants
Requires --session SESSION.
rdp-cli access list --help
rdp-cli access revoke#
Revoke a Web grant and its live streams
Requires --session SESSION.
rdp-cli access revoke --help
Operations and events
operations status queries an operation ID or the original request ID when a result is uncertain. It does not repeat input. events reads the stream; --follow keeps it open and --after resumes from a cursor. Verify the remote application separately after a sent result.
rdp-cli operations status#
Query a retained operation result
Requires --session SESSION.
rdp-cli operations status --help
rdp-cli events#
Read or follow the session event stream
Requires --session SESSION.
rdp-cli events --help
Trust, credentials and installation
trust records apply to an exact RDP target and fingerprint in strict certificate mode. credentials remove deletes only the named product credential reference. On macOS and Linux, install-cli/uninstall-cli manage the CLI entry and --prefix chooses the installation location; Windows runs the downloaded executable directly. presence show --panel opens the session panel on macOS and Linux. The saved catalog was verified with the released macOS 0.1.0 CLI; these Linux behaviors were checked against the released Linux implementation. licenses prints the bundled third-party versions and notices.
rdp-cli trust list#
List scoped RDP certificate trust records
No session argument.
rdp-cli trust list --help
rdp-cli trust add#
Trust one target certificate fingerprint
No session argument.
rdp-cli trust add --help
rdp-cli trust remove#
Remove one target trust record
No session argument.
rdp-cli trust remove --help
rdp-cli credentials remove#
Remove one product credential-store item
No session argument.
rdp-cli credentials remove --help
rdp-cli install-cli#
Install the CLI entry on macOS or Linux
No session argument.
rdp-cli install-cli --help
rdp-cli uninstall-cli#
Remove the CLI entry point created by rdp-cli
No session argument.
rdp-cli uninstall-cli --help
rdp-cli licenses#
Show third-party versions and license notices
No session argument.
rdp-cli licenses --help
Protocol and platform conditions
- RDP defaults to --cert-policy ignore and --tls-profile modern. strict verifies certificate trust/name; legacy is an explicit compatibility choice that permits older TLS. Neither setting changes Web HTTPS verification.
- VNC rejects --user, --domain, --size, --layout, --cert-policy and --tls-profile. Classic authentication uses the first eight UTF-8 password bytes; unauthenticated access requires explicit --vnc-security none and no password option. Supported VNC transports are not encrypted.
- VNC does not provide files, audio, microphone or requested display layout changes. Clipboard UTF-8 depends on negotiation; otherwise only Latin-1 is accepted.
- RDP files require drive redirection; audio, clipboard, microphone and multiple displays also depend on server policy and negotiated capabilities.
- Windows and macOS offer native viewing and desktop status. Linux native viewing needs a desktop/display service, audio needs the host audio service and saved credentials need Secret Service. A headless host can still use supported CLI operations.
- Long Unicode input is paced for remote applications. Choose an appropriate timeout and verify the result; changing input method or opening a viewer cannot guarantee that every server accepts every character.
Recover from an error
OBSERVATION_REQUIRED / INVALID_COORDINATES- Capture again, inspect monitor topology and choose valid remote coordinates.
SESSION_PAUSED / CONTROL_HELD_BY_HUMAN- Stop input and respect human control; continue only when the session is deliberately returned to the Agent.
AUTH_FAILED / VNC_AUTH_FAILED- Check the account/password source and remote authentication policy.
RDP_TLS_HANDSHAKE_FAILED / CERTIFICATE_UNTRUSTED- Check server TLS support, certificate policy and the actual fingerprint; do not treat a TLS error as a password error.
CAPABILITY_UNAVAILABLE / CLIPBOARD_ENCODING_UNSUPPORTED- Inspect protocol/capabilities or text encoding and use a supported operation.
REQUEST_TIMEOUT / REQUEST_ID_CONFLICT / REQUEST_WINDOW_EXPIRED- Query the original operation and current screen before retrying. Never reuse an ID for different arguments or assume expired retention still deduplicates.