RubyMetric/chsrc logo

RubyMetric/chsrc

Free

chsrc 全平台通用换源工具与框架. Change Source everywhere for every software

FreeFree tier
Type
Open Source
Company
RubyMetric

About RubyMetric/chsrc

chsrc is a universal command-line tool and framework for changing software package sources/mirrors across multiple platforms. Written in C11 to avoid heavyweight interpreters, it supports Linux, Windows (native, MSYS2, Cygwin), macOS, BSD, Android, and various CPU architectures including Loongson, FeiTeng, and RISC-V. The tool can change sources for over 65 different software targets, and its framework design allows users to write new 'recipes' without needing deep C knowledge. It is free and open-source software licensed under GPL-3.0-or-later and MIT.

Key Features

Universal platform support: Linux, Windows (native, MSYS2, Cygwin), macOS, BSD, Android
Multi-CPU support: Loongson, FeiTeng, RISC-V, etc.
Written in C11 for lightweight deployment (no Python/JS interpreter required)
Supports changing sources for over 65 software targets (package managers, tools, etc.)
Framework design with MVC-like architecture, allows writing new recipes without C skills
Includes reset functionality to restore original sources and speed testing capability
Offers bootstrap for platforms without precompiled binaries
Shell auto-completion and community-driven development

Pros & Cons

Pros
  • Lightweight: no heavy interpreter required (C11 binary)
  • Cross-platform: supports many OS and CPU combinations
  • Extensive coverage: over 65 supported software sources
  • Easy to contribute: framework allows recipe creation without C knowledge
  • Free and open-source (GPL-3.0-or-later and MIT)
  • Active community with comprehensive documentation and install options
Cons
  • Command-line only; no graphical user interface
  • Some platforms require manual installation or bootstrap
  • Documentation available mainly in Chinese (though code and comments may be bilingual)

Best For

Switching package managers to faster or more reliable mirrors (e.g., apt, yum, pacman, scoop, winget)Changing software source repositories for performance, security, or geographic reasonsSystem administrators managing multiple OS environments and architecturesDevelopers contributing new mirror recipes easily through the framework

FAQ

How do I install chsrc on Windows?
You can install via Scoop (scoop install chsrc), WinGet (winget install RubyMetric.chsrc), or use a PowerShell script to download the latest binary. Manual downloads are available from the releases page.
How do I install chsrc on Linux?
Debian/Ubuntu users can install via apt/deb packages. AUR packages are available for Arch Linux (yay -S chsrc-bin or chsrc-git). Manual downloads from GitHub Releases also work.
Can I add support for a new software source?
Yes, chsrc is designed as a framework. You can write a new recipe (even without C knowledge) using the provided macros. See the contributing documentation.
Is chsrc free to use?
Yes, chsrc is free and open-source software licensed under GPL-3.0-or-later and MIT.
What operating systems are supported?
chsrc supports Linux, Windows (native, MSYS2, Cygwin), macOS, BSD, and Android, with support for multiple CPU architectures.