Usage
Parameters
This command takes no parameters.Response
The plain-text content currently in the clipboard. Returns an empty string if the clipboard is empty or contains only non-text data.
Examples
Read Clipboard Content
Empty Clipboard
Use Cases
Copy-Paste Automation
Copy-Paste Automation
Read content a user has copied:
Extract Data from UI
Extract Data from UI
Use native copy actions to extract data:
Inter-App Data Transfer
Inter-App Data Transfer
Transfer data between applications via clipboard:
Clipboard Monitoring
Clipboard Monitoring
Monitor clipboard for changes:
Clipboard Data Types
This command only reads plain text from the clipboard. Other data types are not supported:- Images: Not returned (use screenshot commands instead)
- Files: Not returned (file paths may be returned as text if copied as text)
- Rich text: Formatting is stripped; only plain text is returned
- HTML: HTML source may be returned if copied as plain text
text field will be an empty string.
Permissions
Reading the clipboard requires macOS accessibility permission. If permission is not granted, the command will return aPERM_DENIED error:
Notes
- The clipboard is a system-wide resource; reading it does not modify its contents
- Newlines and special characters are preserved in the returned text
- The clipboard content is read synchronously; there is no polling or waiting
- If multiple clipboard items exist (macOS supports clipboard history in some apps), only the most recent item is returned
Related Commands
- clipboard-set - Write text to the clipboard
- clipboard-clear - Clear the clipboard
- press - Send keyboard shortcuts like cmd+c to copy