See and act
Capture the real screen, use taps, swipes, drags and two-finger gestures, and check the result with a new screenshot.
rdp-cli
Follow working RDP commands for Windows, macOS, and Linux. Connect to a remote Windows PC, capture a screenshot, and send your first click or keystroke.
Watch rdp-cli in action
rdp-cli runs on Windows, macOS and Linux. Your agent connects without opening a viewer, reads screenshots, sends clicks and keystrokes, and exchanges files. You can join the same session through the GUI or web viewer and take control.
Connect step by step →Browse commands by task →On Windows, mstsc opens the built-in Remote Desktop app. Replace desktop.example.net with your computer’s address; sign in inside the window.
mstsc /v:desktop.example.netSTART ON YOUR COMPUTER
Choose the computer that runs rdp-cli.
Give your agent the tools for remote work.
For Windows 10 or 11 on an ARM processor, choose ARM64. For Intel or AMD processors, choose x64 for 64-bit Windows or x86 for 32-bit Windows. Download the matching rdp-cli.exe and run it in PowerShell.
Each architecture has its own single-file EXE.
rdp-cli.exe Windows ≥ 7 · 64-bit rdp-cli.exe Windows ≥ 7 · 32-bit rdp-cli.exe Windows 10 / 11 · ARM64 .\rdp-cli.exe --helpEnable RDP on the target first. Replace 192.0.2.20 and USER. The hidden prompt passes your password through standard input. Save data.session from the JSON response.
$secret = Read-Host 'Password' -AsSecureString
$savedEncoding = $OutputEncoding
try {
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[System.Net.NetworkCredential]::new('', $secret).Password |
.\rdp-cli.exe connect --host 192.0.2.20 --user USER --password-stdin
} finally {
$OutputEncoding = $savedEncoding
$secret.Dispose()
}Replace SESSION with the connection result. Open before.png, locate the target app and input position, and save data.observation from the screenshot response.
.\rdp-cli.exe screenshot --session SESSION --out ./before.pngLocate an input field in the screenshot, then replace X, Y, and OBSERVATION. Capture again after clicking and use the new observation for typing. Inspect after.png to verify the actual remote result.
.\rdp-cli.exe click --session SESSION --desktop --x X --y Y --observation OBSERVATION
.\rdp-cli.exe screenshot --session SESSION --out ./focused.png
.\rdp-cli.exe type --session SESSION --text "Remote task completed." --observation NEW_OBSERVATION
.\rdp-cli.exe screenshot --session SESSION --out ./after.pngOpen the same session when a person wants to watch. It starts read-only and offers pause, takeover, and handoff. Normal agent commands do not require this window.
.\rdp-cli.exe watch --session SESSION --viewer window
.\rdp-cli.exe watch --session SESSION --viewer webDrag rdp-cli to Applications, then run these commands in the macOS terminal (zsh).
Choose the DMG for your Mac: Apple silicon (macOS 13 or later) or Intel (macOS 12 or later). Check the download page for release availability.
/Applications/rdp-cli.app/Contents/MacOS/rdp-cli install-cli
rdp-cli --helpEnable RDP on the target first. Replace 192.0.2.20 and USER. The hidden prompt passes your password through standard input. Save data.session from the JSON response.
read -r -s "rdp_password?Password: "
printf '\n'
printf '%s' "$rdp_password" | rdp-cli connect --host 192.0.2.20 --user USER --password-stdin
unset rdp_passwordReplace SESSION with the connection result. Open before.png, locate the target app and input position, and save data.observation from the screenshot response.
rdp-cli screenshot --session SESSION --out ./before.pngLocate an input field in the screenshot, then replace X, Y, and OBSERVATION. Capture again after clicking and use the new observation for typing. Inspect after.png to verify the actual remote result.
rdp-cli click --session SESSION --desktop --x X --y Y --observation OBSERVATION
rdp-cli screenshot --session SESSION --out ./focused.png
rdp-cli type --session SESSION --text "Remote task completed." --observation NEW_OBSERVATION
rdp-cli screenshot --session SESSION --out ./after.pngOpen the same session when a person wants to watch. It starts read-only and offers pause, takeover, and handoff. Normal agent commands do not require this window.
rdp-cli watch --session SESSION --viewer window
rdp-cli watch --session SESSION --viewer webDownload the Linux x86_64 file, give it execute permission, then run it in your terminal. No administrator access is needed.
Use the x86_64 download on the Linux systems listed below. Compatibility with other system versions has not been verified.
chmod u+x ./rdp-cli-linux-x86_64
./rdp-cli-linux-x86_64 --helpEnable RDP on the target first. Replace 192.0.2.20 and USER. The hidden prompt passes your password through standard input. Save data.session from the JSON response.
IFS= read -r -s -p 'Password: ' rdp_password
printf '\n'
printf '%s' "$rdp_password" | ./rdp-cli-linux-x86_64 connect --host 192.0.2.20 --user USER --password-stdin
unset rdp_passwordReplace SESSION with the connection result. Open before.png, locate the target app and input position, and save data.observation from the screenshot response.
./rdp-cli-linux-x86_64 screenshot --session SESSION --out ./before.pngLocate an input field in the screenshot, then replace X, Y, and OBSERVATION. Capture again after clicking and use the new observation for typing. Inspect after.png to verify the actual remote result.
./rdp-cli-linux-x86_64 click --session SESSION --desktop --x X --y Y --observation OBSERVATION
./rdp-cli-linux-x86_64 screenshot --session SESSION --out ./focused.png
./rdp-cli-linux-x86_64 type --session SESSION --text "Remote task completed." --observation NEW_OBSERVATION
./rdp-cli-linux-x86_64 screenshot --session SESSION --out ./after.pngOpen the same session when a person wants to watch. It starts read-only and offers pause, takeover, and handoff. Normal agent commands do not require this window.
./rdp-cli-linux-x86_64 watch --session SESSION --viewer window
./rdp-cli-linux-x86_64 watch --session SESSION --viewer webDownload the Linux ARM64 file for a 64-bit ARM Linux system. Give it execute permission and run it as your normal user.
One static ARM64 ELF for the listed Linux systems, Raspberry Pi 4 and DGX Spark. A 32-bit Raspberry Pi OS installation is not supported.
rdp-cli-linux-arm64 aarch64 · 64-bit chmod u+x ./rdp-cli-linux-arm64
./rdp-cli-linux-arm64 --helpEnable RDP on the target first. Replace 192.0.2.20 and USER. The hidden prompt passes your password through standard input. Save data.session from the JSON response.
IFS= read -r -s -p 'Password: ' rdp_password
printf '\n'
printf '%s' "$rdp_password" | ./rdp-cli-linux-arm64 connect --host 192.0.2.20 --user USER --password-stdin
unset rdp_passwordReplace SESSION with the connection result. Open before.png, locate the target app and input position, and save data.observation from the screenshot response.
./rdp-cli-linux-arm64 screenshot --session SESSION --out ./before.pngLocate an input field in the screenshot, then replace X, Y, and OBSERVATION. Capture again after clicking and use the new observation for typing. Inspect after.png to verify the actual remote result.
./rdp-cli-linux-arm64 click --session SESSION --desktop --x X --y Y --observation OBSERVATION
./rdp-cli-linux-arm64 screenshot --session SESSION --out ./focused.png
./rdp-cli-linux-arm64 type --session SESSION --text "Remote task completed." --observation NEW_OBSERVATION
./rdp-cli-linux-arm64 screenshot --session SESSION --out ./after.pngOpen the same session when a person wants to watch. It starts read-only and offers pause, takeover, and handoff. Normal agent commands do not require this window.
./rdp-cli-linux-arm64 watch --session SESSION --viewer window
./rdp-cli-linux-arm64 watch --session SESSION --viewer webExamples use a documentation address and placeholders. Use actual session and observation values from the responses. Always inspect a fresh screenshot to verify the result of an input command.
VNC
Use a reachable VNC server that you are authorized to access. Replace the host and port. This example uses classic VNC authentication over a trusted LAN or VPN; it is not encrypted. Enter the password through standard input, then end input. Save data.session from the response as SESSION. In Windows PowerShell, replace rdp-cli with .\rdp-cli.exe; on Linux, use the downloaded executable path if it is not on PATH.
rdp-cli connect --protocol vnc --host 192.0.2.20 --port 5900 --password-stdin Open before.png, choose actual screen coordinates and copy data.observation from the response as OBSERVATION. After each action, capture again and verify the result. For a complete connection example and server-specific conditions, follow the VNC guide.
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 Connect to VNC and verify input from the command line → Android · USB / Wi-Fi
Connect a phone over USB or Wi-Fi. Let your agent observe, tap, type and retrieve results with commands, while you follow the same session in a window or browser.
Android-enabled downloads: macOS · Apple silicon · macOS · Intel · Windows · x64 · Windows · x86 · Windows · ARM64 · Linux · x86_64 · Linux · ARM64
Capture the real screen, use taps, swipes, drags and two-finger gestures, and check the result with a new screenshot.
Explicitly paste Unicode text, transfer files and folders, and install, launch or stop a single-APK application.
Share one persistent session with an agent, a native viewer and authorized browsers. Pause or take control when needed.
Android 12 or later is the support baseline. The verified device is Google Pixel 3 running Android 12; this does not claim testing of every manufacturer or later Android release.
Replace DEVICE_SERIAL, SESSION, OBSERVATION, PHONE_IP and both ports with actual values. Save data.session from connect and data.observation from each screenshot. Use the returned wifi: device ID in place of wifi:PHONE_GUID. Choose a name for PHONE_REF to save the pairing on this computer. Enter the current six-digit code when prompted; the command sends it through standard input.
Choose the explicit device ID returned by discovery. Connection does not open a viewer or start audio.
rdp-cli android devices
rdp-cli connect --protocol adb --device usb:DEVICE_SERIAL --transport usbRead before.png, choose coordinates from that image, then use its observation value. Check after.png to verify the application result.
rdp-cli screenshot --session SESSION --out before.png
rdp-cli android touch --session SESSION --kind tap --x 300 --y 900 --observation OBSERVATION
rdp-cli screenshot --session SESSION --out after.pngWi-Fi is an alternative to USB. If this phone already has a USB session, run disconnect --session SESSION first. Pair, then connect with the returned device ID and current connection port. Save the new data.session and observe again before input.
printf '%s' 'Pairing code: '
IFS= read -r -s rdp_pair_code
printf '\n'
printf '%s' "$rdp_pair_code" | rdp-cli android pair --host PHONE_IP --port PAIR_PORT --code-stdin --save-device-auth PHONE_REF
unset rdp_pair_code
rdp-cli connect --protocol adb --device wifi:PHONE_GUID --transport wifi --host PHONE_IP --port CONNECT_PORT --device-auth-ref PHONE_REFTurn off phone audio and disconnect. Completed files and user applications remain on the phone.
rdp-cli audio android --session SESSION --source off
rdp-cli disconnect --session SESSIONChoose the explicit device ID returned by discovery. Connection does not open a viewer or start audio.
.\rdp-cli.exe android devices
.\rdp-cli.exe connect --protocol adb --device usb:DEVICE_SERIAL --transport usbRead before.png, choose coordinates from that image, then use its observation value. Check after.png to verify the application result.
.\rdp-cli.exe screenshot --session SESSION --out before.png
.\rdp-cli.exe android touch --session SESSION --kind tap --x 300 --y 900 --observation OBSERVATION
.\rdp-cli.exe screenshot --session SESSION --out after.pngWi-Fi is an alternative to USB. If this phone already has a USB session, run disconnect --session SESSION first. Pair, then connect with the returned device ID and current connection port. Save the new data.session and observe again before input.
$pairingCode = Read-Host 'Pairing code' -AsSecureString
try {
[System.Net.NetworkCredential]::new('', $pairingCode).Password |
.\rdp-cli.exe android pair --host PHONE_IP --port PAIR_PORT --code-stdin --save-device-auth PHONE_REF
} finally {
$pairingCode.Dispose()
}
.\rdp-cli.exe connect --protocol adb --device wifi:PHONE_GUID --transport wifi --host PHONE_IP --port CONNECT_PORT --device-auth-ref PHONE_REFTurn off phone audio and disconnect. Completed files and user applications remain on the phone.
.\rdp-cli.exe audio android --session SESSION --source off
.\rdp-cli.exe disconnect --session SESSIONConnect, inspect the screen, send a short sequence of actions, then verify the result. Keep the session ID and use a fresh observation after a person takes over.
One executable for your operating system and processor. Check the downloaded file’s capabilities before using the commands below.
Request a screen region or a smaller image. Compare it with an earlier observation and skip the image when nothing changed; coordinates remain tied to the remote screen.
Wait for a region to change or settle, or for a connection, operation or file transfer to reach a specified state. Verify the actual outcome before continuing.
Combine actions your agent has chosen, include a new observation and stop at a checkpoint. Errors or a control change stop later steps; already sent actions are not rolled back.
Save task progress, checkpoints and selected images. Export a local report, inspect what completed after an interruption, and start new steps without replaying uncertain actions.
Registered agents explicitly hand control to each other. A person can take over through the GUI or web viewer, then hand back to a chosen agent, which observes again before acting.
Use the executable’s built-in MCP interface or CLI. Save named connection profiles with credential references and use doctor to inspect the available connection layers.
On a supported Android device, explicitly create a virtual display and start an app there. Agent, GUI and web viewer use that display; app behavior and system audio permissions still apply.
.\rdp-cli.exe --version
.\rdp-cli.exe --help-json.\rdp-cli.exe screenshot --session SESSION --max-width 640
.\rdp-cli.exe screenshot --session SESSION --region X,Y,WIDTH,HEIGHT --max-width 640.\rdp-cli.exe wait --session SESSION --condition changed --region X,Y,WIDTH,HEIGHT --timeout-ms 10000.\rdp-cli.exe doctor --session SESSION.\rdp-cli.exe mcp stdio rdp-cli --version
rdp-cli --help-jsonrdp-cli screenshot --session SESSION --max-width 640
rdp-cli screenshot --session SESSION --region X,Y,WIDTH,HEIGHT --max-width 640rdp-cli wait --session SESSION --condition changed --region X,Y,WIDTH,HEIGHT --timeout-ms 10000rdp-cli doctor --session SESSIONrdp-cli mcp stdio Linux · X11 / SSH · Wayland RDP / VNC
Connect an existing Linux desktop or forward one X11 application, work through screenshot and input commands, transfer results, and let a person join the same session.
Download: macOS · Apple siliconmacOS · IntelWindows · x64Windows · x86Windows · ARM64Linux · x86_64Linux · ARM64
Before connecting, choose an existing readable and writable remote directory for FILE_ROOT. For desktop mode, obtain DISPLAY and XAUTHORITY from a terminal inside the target user’s active graphical session. An SSH terminal may have different values; ask the desktop owner or administrator when they are absent.
rdp-cli lets an AI agent see and operate a Linux application through commands. The agent captures a screen, acts on the observed target and checks the next screen. You can open a native window or an authorized web viewer to watch, pause or take control of that same session.
The Linux computer must already provide SSH access and an installed X11-compatible application. Replace the example address, account, private-key path and independently verified known-hosts file. In Windows PowerShell, use .\rdp-cli.exe instead of rdp-cli. Check that --version reports embedded_ssh, x11_desktop and x11_application as true.
This example opens an already installed Gedit in an isolated display managed inside rdp-cli. It opens no local viewer by default. Save data.session from the response as SESSION. A host whose normal desktop uses Wayland can still forward an X11-compatible application this way.
rdp-cli connect --protocol x11 --mode application --host 192.0.2.20 --user USER --ssh-key PRIVATE_KEY --ssh-known-hosts KNOWN_HOSTS --linux-file-root FILE_ROOT --application /usr/bin/gedit --app-args '["--standalone","--new-window"]'
Use the actual display and its existing authorization-file path. The SSH account needs permission to access that display; SSH authentication alone does not grant desktop access. This mode joins the existing desktop rather than creating another login session.
rdp-cli connect --protocol x11 --mode desktop --host 192.0.2.20 --user USER --ssh-key PRIVATE_KEY --ssh-known-hosts KNOWN_HOSTS --linux-file-root FILE_ROOT --display DISPLAY --xauthority XAUTHORITY_PATH
Open the returned PNG and save its data.observation. Replace X and Y with coordinates from that image. After focusing the field, capture again and use the new token. The explicit clipboard method replaces the remote clipboard; it does not change the computer clipboard. An input response confirms dispatch, so verify the visible result afterward.
rdp-cli screenshot --session SESSION --out before.png
rdp-cli click --session SESSION --x X --y Y --observation OBSERVATION
rdp-cli screenshot --session SESSION --out focused.png
rdp-cli linux text --session SESSION --method clipboard --text 'Review complete.' --observation OBSERVATION
rdp-cli screenshot --session SESSION --out after.png
Open the upload result’s remote_path in the Linux application, edit and save it, then download the result. Keep each transfer_id and wait for completed before using the file. Save files before transferring; existing names are not overwritten by default. Check the returned task state after an error instead of blindly repeating a transfer.
Set FILE_ROOT to an existing remote directory that this SSH account can read and write. The file commands stay inside that directory; setting a root does not create the directory or grant new permissions.
rdp-cli files list --session SESSION
rdp-cli files upload --session SESSION --local ./report.txt --path report.txt
rdp-cli files status --session SESSION --transfer-id UPLOAD_TRANSFER
rdp-cli files download --session SESSION --path report.txt --local ./result.txt
rdp-cli files status --session SESSION --transfer-id DOWNLOAD_TRANSFER
Open this viewer only when you want to watch. It starts read-only. Take control to stop agent input, make a correction, and release control to hand the session back. An authorized web viewer joins the same session; only one viewer can hold human control. Closing a read-only viewer keeps the backend connection.
rdp-cli watch --session SESSION --viewer window
Native X11 has no playback or microphone redirection. A whole Wayland desktop requires an already configured compatible RDP or VNC endpoint, using its actual negotiated capabilities. rdp-cli does not install or enable a remote service. An application can exit when its display connection is disconnected or lost; save first, and do not assume automatic relaunch or a preserved workspace.
Wayland text input depends on the existing server. GNOME 46 and Krfb 23.08 may not map every Unicode key; verify the resulting text. Use explicit clipboard paste only when it works on that endpoint: Krfb on Plasma Wayland can advertise clipboard support without delivering it to applications. For sensitive input or rapid sequences, send smaller steps and check the next screenshot.
Tested desktop endpoints: Ubuntu 24.04.5 · GNOME 46 / GNOME Remote Desktop 46.3; KDE Plasma 5.27.12 / Krfb 23.08.5.
rdp-cli lets an AI agent see and operate a Linux application through commands. The agent captures a screen, acts on the observed target and checks the next screen. You can open a native window or an authorized web viewer to watch, pause or take control of that same session.
The Linux computer must already provide SSH access and an installed X11-compatible application. Replace the example address, account, private-key path and independently verified known-hosts file. In Windows PowerShell, use .\rdp-cli.exe instead of rdp-cli. Check that --version reports embedded_ssh, x11_desktop and x11_application as true.
This example opens an already installed Gedit in an isolated display managed inside rdp-cli. It opens no local viewer by default. Save data.session from the response as SESSION. A host whose normal desktop uses Wayland can still forward an X11-compatible application this way.
.\rdp-cli.exe connect --protocol x11 --mode application --host 192.0.2.20 --user USER --ssh-key PRIVATE_KEY --ssh-known-hosts KNOWN_HOSTS --linux-file-root FILE_ROOT --application /usr/bin/gedit --app-args '["--standalone","--new-window"]'
Use the actual display and its existing authorization-file path. The SSH account needs permission to access that display; SSH authentication alone does not grant desktop access. This mode joins the existing desktop rather than creating another login session.
.\rdp-cli.exe connect --protocol x11 --mode desktop --host 192.0.2.20 --user USER --ssh-key PRIVATE_KEY --ssh-known-hosts KNOWN_HOSTS --linux-file-root FILE_ROOT --display DISPLAY --xauthority XAUTHORITY_PATH
Open the returned PNG and save its data.observation. Replace X and Y with coordinates from that image. After focusing the field, capture again and use the new token. The explicit clipboard method replaces the remote clipboard; it does not change the computer clipboard. An input response confirms dispatch, so verify the visible result afterward.
.\rdp-cli.exe screenshot --session SESSION --out before.png
.\rdp-cli.exe click --session SESSION --x X --y Y --observation OBSERVATION
.\rdp-cli.exe screenshot --session SESSION --out focused.png
.\rdp-cli.exe linux text --session SESSION --method clipboard --text 'Review complete.' --observation OBSERVATION
.\rdp-cli.exe screenshot --session SESSION --out after.png
Open the upload result’s remote_path in the Linux application, edit and save it, then download the result. Keep each transfer_id and wait for completed before using the file. Save files before transferring; existing names are not overwritten by default. Check the returned task state after an error instead of blindly repeating a transfer.
Set FILE_ROOT to an existing remote directory that this SSH account can read and write. The file commands stay inside that directory; setting a root does not create the directory or grant new permissions.
.\rdp-cli.exe files list --session SESSION
.\rdp-cli.exe files upload --session SESSION --local ./report.txt --path report.txt
.\rdp-cli.exe files status --session SESSION --transfer-id UPLOAD_TRANSFER
.\rdp-cli.exe files download --session SESSION --path report.txt --local ./result.txt
.\rdp-cli.exe files status --session SESSION --transfer-id DOWNLOAD_TRANSFER
Open this viewer only when you want to watch. It starts read-only. Take control to stop agent input, make a correction, and release control to hand the session back. An authorized web viewer joins the same session; only one viewer can hold human control. Closing a read-only viewer keeps the backend connection.
.\rdp-cli.exe watch --session SESSION --viewer window
Native X11 has no playback or microphone redirection. A whole Wayland desktop requires an already configured compatible RDP or VNC endpoint, using its actual negotiated capabilities. rdp-cli does not install or enable a remote service. An application can exit when its display connection is disconnected or lost; save first, and do not assume automatic relaunch or a preserved workspace.
Wayland text input depends on the existing server. GNOME 46 and Krfb 23.08 may not map every Unicode key; verify the resulting text. Use explicit clipboard paste only when it works on that endpoint: Krfb on Plasma Wayland can advertise clipboard support without delivering it to applications. For sensitive input or rapid sequences, send smaller steps and check the next screenshot.
Tested desktop endpoints: Ubuntu 24.04.5 · GNOME 46 / GNOME Remote Desktop 46.3; KDE Plasma 5.27.12 / Krfb 23.08.5.
Give your agent the executable path, authorized target or session, and the outcome you want. The optional rdp-cli-agent skill documents the command workflow; your agent can read SKILL.md directly. It is not required to connect.
rdp-cli-agent / SKILL.md ↓RDP certificate policy currently defaults to ignore for compatibility. Inspect connect --help and configure validation to suit your environment. The website does not relay connections or collect remote credentials. Browser viewing is for LAN/VPN; VNC transport needs a trusted network.