🍺 BREW Explorer

← all formulae

xclip

brew install xclip v0.13_1 GPL-2.0-or-later

Access X11 clipboards from the command-line

481
30-day installs · #1789
1.6k
90-day · #1756
6.6k
365-day · #1723
1.3k
★ GitHub stars · updated 1y ago

Runtime dependencies

Build dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "autoconf",
    "automake"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "libx11",
    "libxmu"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Access X11 clipboards from the command-line",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:41:40+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "xclip",
  "github_default_branch": "master",
  "github_last_commit_at": "2025-01-09T22:05:21Z",
  "github_readme_excerpt": "WHAT IS XCLIP?\n==============\n\nxclip is a command line utility that is designed to run on any system with an\nX11 implementation. It provides an interface to X selections (\"the clipboard\")\nfrom the command line. It can read data from standard in or a file and place it\nin an X selection for pasting into other X applications. xclip can also print\nan X selection to standard out, which can then be redirected to a file or\nanother program.\n\nUSING XCLIP\n===========\n\nHere are some ideas for things you can do with xclip:\n\n\tCopy your uptime into the selection for pasting:\n\tuptime | xclip\n\n\tCopy your password file for pasting:\n\txclip /etc/passwd\n\n\tSave some text you have Edit | Copied in a web browser:\n\txclip -o -sel clip \u003e webpage.txt\n\n\tOpen a URL selected in an email client\n\tmozilla `xclip -o`\n\n\tCopy XA_PRIMARY to XA_CLIPBOARD\n\txclip -o | xclip -sel clip\n\n\tIn command mode in vim, select some lines of text, then press shift-:\n\tfor an ex prompt, and use this command to copy the selected lines of\n\ttext to the primary X selection:\n\t!xclip -f\n\n\nUSING XCLIP FOR MOVING FILES\n============================\n\nThe programs xclip-copyfile, xclip-pastefile, and xclip-cutfile can be\nused for copying and moving files between different directories and\neven machines, assuming that you have a working X11 connection. Here\nare some examples:\n\n# Copying a file to a remote host\n[maggie.lkpg.cendio.se ~]$ echo \"A file created on ${HOSTNAME}\" \u003e file1\n[maggie.lkpg.cendio.se ~]$ xclip-copyfile file1\n[sofie.homeip.net ~/doc]$ xclip-pastefile\nfile1\n[sofie.homeip.net ~/doc]$ cat file1\nA file created on maggie.lkpg.cendio.se\n\n\n# Copying an entire tree structure\n[sofie.homeip.net ~]$ xclip-copyfile doc\n[maggie.lkpg.cendio.se ~/tmp]$ xclip-pastefile\ndoc/\ndoc/letter-mom-april.txt\ndoc/file1\ndoc/letter-dad-march.txt\n\n\n# Copying files with preserved path information\n[maggie.lkpg.cendio.se ~]$ xclip-copyfile -p /etc/sysconfig/grub\ntar: Removing leading `/\u0027 from member names\n[sofie.homeip.net ~/tmp]$ xclip-pastefil",
  "github_repo": "astrand/xclip",
  "github_stars": 1310,
  "github_topics": [],
  "homepage": "https://github.com/astrand/xclip",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 481,
  "installs_365d": 6586,
  "installs_90d": 1625,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-2.0-or-later",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "xclip",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 1789,
  "rank_365d": 1723,
  "rank_90d": 1756,
  "raw_hash": "bc50d1f57f5f3ba6",
  "recommended_dependencies": [],
  "revision": 1,
  "ruby_source_path": "Formula/x/xclip.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "0.13",
  "versioned_formulae": [],
  "why_use_this": null
}