Configs2026年5月20日·1 分钟阅读

Yay — AUR Helper and Pacman Wrapper for Arch Linux

Yay is a Go-based AUR helper that wraps pacman to let Arch Linux users search, install, and update packages from both the official repositories and the Arch User Repository in a single command.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Yay Overview
通用 CLI 安装命令
npx tokrepo install 4ab613b4-5447-11f1-9bc6-00163e2b0d79

Introduction

Yay (Yet Another Yogurt) is an AUR helper written in Go for Arch Linux and Arch-based distributions. It extends the standard pacman package manager by adding support for the Arch User Repository, which contains thousands of community-maintained build scripts for software not available in the official repositories. Yay aims to provide a familiar pacman-like experience with minimal friction.

What Yay Does

  • Searches and installs packages from both official Arch repositories and the AUR
  • Resolves and installs AUR package dependencies automatically
  • Performs combined system upgrades covering official and AUR packages in one command
  • Shows diffs of PKGBUILD files before building so users can review changes
  • Cleans up unneeded build dependencies after installation

Architecture Overview

Yay is written in Go and acts as a wrapper around pacman and makepkg. For official repository operations, it delegates directly to pacman. For AUR packages, yay queries the AUR RPC API to fetch package metadata, downloads PKGBUILD source files, and invokes makepkg to build packages locally. Dependency resolution walks the full dependency tree across both the official repos and AUR, ensuring all requirements are met before building. Built packages are then installed via pacman.

Self-Hosting & Configuration

  • Bootstrap by cloning the yay-bin or yay package from the AUR and running makepkg
  • Configuration is stored in ~/.config/yay/config.json
  • Set default build directory with yay --builddir /path/to/builds --save
  • Enable or disable PKGBUILD diff viewing with yay --diffmenu --save
  • Use yay --editmenu --save to review PKGBUILDs before every build

Key Features

  • Drop-in pacman syntax means existing muscle memory transfers directly
  • Interactive search results let you select packages by number from the result list
  • PKGBUILD review prompts help catch malicious or broken build scripts before execution
  • Batch AUR updates alongside official repo updates in a single yay -Syu command
  • Written in Go with no runtime dependencies beyond pacman and git

Comparison with Similar Tools

  • Paru — Rust-based AUR helper with similar features and active development; yay uses Go and has a larger installed user base
  • Trizen — Perl-based AUR helper; lighter but slower for dependency resolution than yay
  • Pikaur — Python-based AUR helper that reviews all PKGBUILDs before building; yay offers similar review features
  • Manual makepkg — the official method for AUR packages; yay automates the clone, build, and install cycle

FAQ

Q: Is yay safe to use with the AUR? A: Yay itself is safe, but AUR packages are user-submitted. Always review PKGBUILDs before building, which yay prompts you to do.

Q: Does yay work on non-Arch distributions? A: No. Yay requires pacman and the AUR, which are specific to Arch Linux and its derivatives like Manjaro and EndeavourOS.

Q: How do I remove yay-installed packages? A: Use yay -R package-name or yay -Rns package-name to also remove dependencies and config files, same as pacman.

Q: Can yay handle split packages and VCS packages? A: Yes. Yay handles split packages and supports -git, -svn, and other VCS package types from the AUR.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产