# xclip

> command line interface to the X11 clipboard

**Wikidata**: [Q110473735](https://www.wikidata.org/wiki/Q110473735)  
**Source**: https://4ort.xyz/entity/xclip

## Summary
xclip is a command-line interface for the X11 clipboard, allowing users to manipulate and access clipboard data from the terminal. It is free software released under the GNU General Public License (GPL) version 2.0 or later and supports operating systems like macOS and BSD. The tool is particularly useful for integrating clipboard operations into scripts or workflows.

## Key Facts
- **License**: GNU General Public License (GPL) version 2.0 or later.
- **Latest Version**: 0.13 (released September 13, 2016).
- **Initial Release**: Version 0.12 (September 27, 2009).
- **Platforms**: macOS, BSD, and other Unix-like systems.
- **Repository**: Hosted on GitHub at [https://github.com/astrand/xclip](https://github.com/astrand/xclip).
- **Programming Language**: Written in C.
- **Package Availability**: Included in Debian, Ubuntu, FreeBSD, OpenBSD, and NetBSD repositories.
- **Man Page**: `xclip.1` provides documentation.

## FAQs
### Q: What is xclip used for?
A: xclip is used to interact with the X11 clipboard from the command line, enabling copy, paste, and manipulation of data in Unix-like environments.

### Q: How do I install xclip?
A: xclip can be installed via package managers (e.g., `apt` for Debian/Ubuntu, `brew` for macOS) or compiled from source available on GitHub.

### Q: Is xclip free software?
A: Yes, xclip is free software distributed under the GNU GPL version 2.0 or later, allowing users to run, modify, and redistribute it.

## Why It Matters
xclip fills a critical niche for users of X11-based systems and terminal-focused workflows by providing straightforward access to clipboard functionality. Unlike graphical tools, xclip enables seamless integration of copy-paste operations into scripts, remote sessions, or headless environments. Its compatibility with multiple operating systems (including macOS and BSD) and inclusion in major software repositories ensures broad accessibility. As free software, it promotes transparency and customization, empowering users to adapt the tool to specialized needs. For developers and power users, xclip simplifies tasks like transferring data between applications or sessions, enhancing productivity in text-based interfaces.

## Notable For
- **Lightweight CLI Design**: Focuses solely on clipboard operations without unnecessary dependencies.
- **Cross-Platform Compatibility**: Supports macOS, BSD, and Linux, with packages maintained across distributions.
- **Active Maintenance**: Updated from version 0.12 (2009) to 0.13 (2016), with ongoing hosting on GitHub.
- **Integration with Unix Tools**: Easily scriptable for automating workflows involving clipboard data.

## Body
### History and Development
- **Initial Release**: Version 0.12 debuted on September 27, 2009.
- **Latest Update**: Version 0.13 was released on September 13, 2016, with source code hosted on GitHub.
- **Repository**: Primary development occurs at [https://github.com/astrand/xclip](https://github.com/astrand/xclip), succeeding the original SourceForge page.

### Key Features
- **Clipboard Selection**: Supports both primary and clipboard selections in X11.
- **Input/Output Control**: Allows specifying target outputs (e.g., files, standard input) and data formats.
- **Silent Operation**: Includes options to suppress output for scripting purposes.

### Operating Systems
- **Supported Platforms**: macOS, BSD (FreeBSD, OpenBSD, NetBSD), and Linux distributions.
- **Package Managers**: Available via Homebrew (macOS), apt (Debian/Ubuntu), and BSD ports systems.

### Licensing and Distribution
- **License**: GNU GPL version 2.0 or later, as confirmed by Debian copyright files.
- **Copyright Status**: Copyrighted under free software terms, permitting modification and redistribution.

### Technical Details
- **Programming Language**: Primarily written in C.
- **Dependencies**: Requires X11 development libraries for compilation.
- **Documentation**: Man page (`xclip.1`) and GitHub repository provide usage instructions.

## References

1. Free Software Directory
2. [Source](https://metadata.ftp-master.debian.org/changelogs//main/x/xclip/xclip_0.13-2_copyright)
3. [Release 0.12. 2009](https://github.com/astrand/xclip/releases/tag/0.12)
4. [Release 0.13. 2016](https://github.com/astrand/xclip/releases/tag/0.13)