xsel
« Back to VersTracker
Description:
Command-line program for getting and setting the contents of the X selection
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: System utilities
Tags: x11 clipboard cli utility selection
Install: brew install xsel
About:
Xsel is a command-line utility for interacting with the X Window System's clipboard and selection mechanisms. It allows users to capture the contents of the primary selection, clipboard, or cut buffers and output them to standard output. Conversely, it can take input from a pipe or file and set these selections, facilitating powerful shell scripting and automation.
Key Features:
  • Reads from and writes to X selections (primary, secondary, clipboard)
  • Supports X cut buffers for legacy compatibility
  • Handles both text and binary data
  • Composable via standard Unix pipes
Use Cases:
  • Piping selected text from a GUI application directly into a command-line tool
  • Scripting clipboard operations for automated workflows
  • Capturing X selection data for logging or processing
Alternatives:
  • xclip – Similar functionality, often considered a modern alternative with slightly different default behaviors.
Version History
Detected Version Rev Change Commit
Nov 20, 2024 12:39am 0 VERSION_BUMP c7534064