Automic VaultAutomic Vault

brew

使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 xclip

查看 xclip 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install xclip

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install xclip

MacPorts ports tree · x11/xclip/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add xclip

Alpine Linux edge package indexes · xclip · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install xclip

Debian stable package indexes · xclip · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install xclip

Fedora Rawhide package metadata · xclip · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#xclip

nixpkgs package indexes · pkgs/by-name/xc/xclip/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S xclip

Arch Linux sync databases · xclip · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install xclip

openSUSE Tumbleweed package metadata · xclip · 来源: download.opensuse.org

概览

软件包摘要

Access X11 clipboards from the command-line

命令和别名

  • xclip
  • xclip-copyfile
  • xclip-cutfile
  • xclip-pastefile

历史

项目历史与用法

xclip is a long-running command-line interface to X11 selections. The README describes it as a utility for any system with an X11 implementation, able to read standard input or files into an X selection and print a selection back to standard output.

项目历史

The source file records copyright by Kim Saunders in 2001 and Peter Astrand in 2007-2008, marking xclip as an older Unix desktop utility that predates modern clipboard abstractions. Its old changelog starts at version 0.01, "Everything. First release, pretty basic, but it worked," then shows a steady evolution through file input, output mode, selection choice, INCR support for large transfers, UTF-8 fixes, man pages, and helper scripts.

Version 0.05 added the ability to access XA_SECONDARY and XA_CLIPBOARD rather than only the default primary selection. Version 0.06 added support for the X INCR mechanism, improving large-data transfers. Version 0.10 moved the build from Imake to Autoconf and added `xclip-copyfile` and `xclip-pastefile`, making the tool useful not only for text snippets but also for copying files over an existing X11 connection.

The project was historically hosted on SourceForge and later moved to GitHub. SourceForge now says the project remains there for historical reasons and points users to the GitHub repository; the GitHub changelog includes a February 2016 commit changing SourceForge URLs to GitHub. The 0.13 GitHub release in September 2016 gathered several years of fixes and small features after the 0.12 line.

采用历史

xclip became one of the standard small utilities installed when scripts, editors, or terminal workflows need access to the X11 clipboard. Debian describes it as a command-line interface to X selections, and distribution package pages across Debian, Fedora, Arch, Alpine, GNU Guix, OpenBSD ports, and Homebrew carry the same role: a tiny bridge between shell pipelines and desktop selection ownership.

Its adoption is also visible through how other software talks about clipboard support on Linux: command-line tools frequently recommend `xclip` or `xsel` for X11 clipboard integration. That position has persisted even as Wayland gained adoption, because X11 and XWayland sessions still expose the selection model that xclip was written to manipulate.

使用方式

The classic usage is pipeline-oriented: `uptime | xclip` puts command output into the primary selection, `xclip -o -sel clip` writes the clipboard to standard output, and `xclip -o | xclip -sel clip` copies the primary selection into the explicit clipboard. The README also documents use from Vim filters and scripts that open selected URLs or save browser-copied text.

The helper commands `xclip-copyfile`, `xclip-pastefile`, and `xclip-cutfile` use the selection mechanism to move files or directory trees between directories and even between machines when X11 forwarding is available. This is the package-nerd trick that makes xclip more than a text clipboard tool: it can piggyback on an already-authenticated X connection as a lightweight file-transfer path.

为什么软件包爱好者会关心

xclip matters because the X Window System has multiple selections, not just a single clipboard. The README points to the freedesktop.org clipboard specification and summarizes the difference between XA_PRIMARY, middle-click paste, and XA_CLIPBOARD, giving shell users precise control over a desktop feature that GUI applications usually hide.

The tool's design also explains a recurring Unix packaging pattern: a small C program, a man page, and shell helpers become the glue that lets unrelated programs interoperate. For headless or remote workflows it is still bounded by the existence of an X display, but within that boundary it remains the boring, reliable answer for "put this command output where my GUI can paste it."

时间线

  • 2001: xclip source records Kim Saunders copyright, matching the earliest era of the project.
  • 0.05: Adds `-selection` support for XA_SECONDARY and XA_CLIPBOARD.
  • 0.06: Adds X INCR mechanism support for larger selection transfers.
  • 0.10: Adds file-copy helper scripts and switches from Imake to Autoconf.
  • 2010: Changelog records version 0.12 maintenance, man pages, and build fixes.
  • 2016-02: Project URLs are changed from SourceForge to GitHub.
  • 2016-09-13: GitHub release 0.13 collects several years of fixes and features.

Related projects

  • xsel is the other commonly cited X11 clipboard CLI and is often mentioned alongside xclip in Linux tooling.
  • The freedesktop.org clipboard specification documents the X selection conventions that xclip exposes.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 13 个平台目标。
  • 安装时包含 2 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
xclipcli全局可执行文件
xclip-copyfilecli全局可执行文件
xclip-cutfilecli全局可执行文件
xclip-pastefilecli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本0.13
管理器更新时间
本地数据OK
上游当前
检测到的最新版本0.13

https://github.com/astrand/xclip

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键brew:xclip
版本0.13
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/xclip
主页https://github.com/astrand/xclip
仓库https://github.com/astrand/xclip
上游文档https://github.com/astrand/xclip#readme
许可证GPL-2.0-or-later
源码归档https://github.com/astrand/xclip/archive/refs/tags/0.13.tar.gz
依赖libx11, libxmu
构建依赖autoconf, automake
Bottle可用 (于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namexclip
Version Scheme0
Revision1
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

xclip 0.13-4

command line interface to X selections

https://github.com/astrand/xclip

sudo apt install xclip
  • Section: x11
  • Architecture: amd64
  • 3 依赖
  • 1 可选依赖
  • normalized package name match
  • 匹配方式:Xclip
Debian stable package indexes · deb.debian.org · Debian stable package indexes: xclip from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

xclip

nix profile install nixpkgs#xclip
  • normalized package name match
  • 匹配方式:Xclip
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/xc/xclip/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

xclip 0.13-3

command line interface to X selections

https://github.com/astrand/xclip

sudo apt install xclip
  • Section: universe/x11
  • Architecture: amd64
  • 3 依赖
  • 1 可选依赖
  • normalized package name match
  • 匹配方式:Xclip
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: xclip from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

xclip 0.13-r3

Command line interface to the X11 clipboard

https://github.com/astrand/xclip

sudo apk add xclip
  • License: GPL-2.0-or-later
  • Architecture: x86_64
  • Source Package: xclip
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Xclip
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: xclip from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

xclip-doc 0.13-r3

Command line interface to the X11 clipboard (documentation)

https://github.com/astrand/xclip

sudo apk add xclip-doc
  • License: GPL-2.0-or-later
  • Architecture: x86_64
  • Source Package: xclip
  • normalized package name match
  • 匹配方式:Xclip
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: xclip-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
dnf95%

xclip 0.13-26.git11cba61.fc44

Command line clipboard grabber

http://sourceforge.net/projects/xclip

sudo dnf install xclip
  • License: GPL-2.0-or-later
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: xclip
  • 5 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Xclip
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: xclip from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
pacman95%

xclip 0.13-6

Command line interface to the X11 clipboard

https://github.com/astrand/xclip

sudo pacman -S xclip
  • License: GPL-2.0-only
  • Architecture: x86_64
  • 1 依赖
  • normalized package name match
  • 匹配方式:Xclip
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: xclip from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

xclip 0.13+git20220129-1.5

Command Line Interface to the X11 Clipboard

https://github.com/astrand/xclip

sudo zypper install xclip
  • License: GPL-2.0-or-later
  • Category: System/X11/Utilities
  • Architecture: x86_64
  • Source Package: xclip
  • 4 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Xclip
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: xclip from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

xclip

sudo port install xclip
  • normalized package name match
  • 匹配方式:Xclip
MacPorts ports tree · api.github.com · MacPorts ports tree: x11/xclip/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment