Agent Skills: x mirror - Mirror Source Manager

|

coreID: x-cmd/skill/x-mirror

Repository

x-cmdLicense: Apache-2.0
245

Install this agent skill to your local

pnpm dlx add-skill https://github.com/x-cmd/skill/tree/HEAD/data/x-cmd/x-mirror

Skill Files

Browse the full folder contents for x-mirror.

Download Skill

Loading file tree…

data/x-cmd/x-mirror/SKILL.md

Skill Metadata

Name
x-mirror
Description
|

x mirror - Mirror Source Manager

Prerequisites

  1. Load x-cmd before use:

    . ~/.x-cmd.root/X
    
  2. x-cmd not installed? → data/install.md

Core Functions

  • List mirror sources: x mirror <pkgmgr> ls
  • Set mirror source: x mirror <pkgmgr> set <mirror-name>
  • View current mirror: x mirror <pkgmgr> current
  • Restore default source: x mirror <pkgmgr> unset

Supported Package Managers

System Package Managers

| Command | Description | |---------|-------------| | apt | Debian/Ubuntu | | brew | Homebrew | | pacman | Arch Linux | | dnf | Fedora/RHEL | | yum | CentOS/RHEL | | apk | Alpine Linux |

Language Package Managers

| Command | Description | |---------|-------------| | pip | Python | | npm | Node.js | | pnpm | Node.js | | yarn | Node.js | | go | Go modules | | cargo | Rust | | gem | Ruby |

Container

| Command | Description | |---------|-------------| | docker | Docker registry |

Usage Examples

List available mirrors

x mirror npm ls
x mirror pip ls
x mirror brew ls

Set mirror source

x mirror npm set npmmirror    # Set npm to use Alibaba Cloud mirror
x mirror pip set tuna         # Set pip to use Tsinghua mirror
x mirror brew set tuna        # Set brew to use Tsinghua mirror

View current mirror

x mirror npm current
x mirror pip current

Restore default source

x mirror npm unset
x mirror pip unset

Common Scenarios

  • Check available npm mirrors: x mirror npm ls
  • Set pip to Tsinghua mirror: x mirror pip set tuna
  • Check current brew mirror: x mirror brew current
  • Restore npm to official: x mirror npm unset

Get Help

Run x mirror --help or x mirror <subcmd> --help for full documentation.