chsrc(1)

๐Ÿ“ฆ
version 0.2.7 ยท 2 versions
, in nixpkgs unstable

๐Ÿฆ‹ NAME

chsrc โ€” Change Source for every software on every platform from the command line โœจ like it literally does what it says, no cap, one CLI to swap sources for everything.

This is chsrc(1) from the RubyMetric chsrc fam, bestie โ€” buckle up ๐ŸŽ€


๐ŸŒธ SYNOPSIS

chsrc <command> [options] [dish] [mirror]

That's the whole vibe check: a command, some options, then maybe a dish and maybe a mirror. Simple. Iconic. Periodt ๐Ÿ’…


๐Ÿ’– DESCRIPTION

Okay so here's the tea โ€” chsrc is organized into four little families of commands and I'm gonna walk you through each one, no skipping, we're doing all of it ๐Ÿซถ

ๅŸบๆœฌๅ‘ฝไปค (basic commands) ๐Ÿงš

  • help โ€” prints this help. also answers to h, -h, and --help because it's that girl with the many nicknames.
  • issue โ€” go peek at the related issue.
  • list (or ls, or l) โ€” lists the available mirrors, plus the dishes you're allowed to change the source of.
  • list mirror/dish โ€” lists the available mirrors, or the dishes you can switch sources on. And list os/lang/ware lists the switchable operating systems / programming languages / software. literally so organized ๐Ÿ’…

ๆต‹้€Ÿๅ‘ฝไปค (speed test commands) ๐Ÿ”ฅ

  • measure / cesu <dish> โ€” runs a speed test against every source for that dish. all of them. we're thorough here.

ๆŸฅ็œ‹้…็ฝฎๅ‘ฝไปค (peek-at-the-config commands) ๐Ÿ”

  • list <dish> โ€” shows the available sources for that dish and which features it supports.
  • get <dish> โ€” shows how that dish's current source is doing / which source it's on.

ๆขๆบๅ‘ฝไปค (the actual source-swapping commands) ๐Ÿ‘‘

  • set <dish> โ€” swaps the source. it auto-run a speed test first, then picks the fastest one for you ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ
  • set <dish> first โ€” swaps the source using the one the maintenance team speed-tested as number one.
  • set <dish> <mirror> โ€” swaps to a specific mirror you name (you can find them via list <dish>).
  • set <dish> <https://url> โ€” swaps to your very own custom source URL, main character energy, you do you ๐ŸŽ€
  • reset <dish> โ€” resets it back to the source upstream defaults to.

โœจ OPTIONS โœจ

  • -dry โ€” Dry Run, bestie. it simulates the whole source-swap process; the command only prints what it would do and does not actually run it. rehearsal era ๐Ÿ’…
  • -scope โ€” sets the scope of the source swap. the values you can pick are: project|user|system|default (check what your dish supports with ls <dish>).
  • -ipv6 โ€” do the speed test over IPv6.
  • -en / -english โ€” output in English.
  • -no-color โ€” output with no color at all.

๐Ÿ’€ EXIT STATUS

  • 0 โ€” ran normally; usually means the source swap succeeded ๐ŸŽ‰
  • 1 โ€” an error caused by your environment, like a missing command ๐Ÿ˜ญ
  • 2 โ€” chsrc doesn't support this yet. not implemented, soz ๐Ÿ™ˆ
  • 3 โ€” a mirror/source-info error caused by the maintainer ๐Ÿซ 
  • 4 โ€” fatal error, caused by an internal bug ๐Ÿ’€
  • 5 โ€” fatal unknown error, which usually means an internal unknown bug. yeah. that one. ๐Ÿ˜ฌ

๐ŸŒˆ EXAMPLES

# ๆต‹้€Ÿ๏ผŒๅฏปๆ‰พๆœ€ๅฟซ่€…๏ผŒๆขๆบ
$ chsrc set ruby

# ๅˆ—ๅ‡บๅฏ็”จ็š„้•œๅƒ็ซ™
# ไฝฟ็”จ RubyChina ไฝœไธบ้•œๅƒ็ซ™
$ chsrc ls  ruby
$ chsrc set ruby rubychina

# ๅฏไปฅไฝฟ็”จ่‡ชๅฎšไน‰URL
$ chsrc set ruby https://gems.ruby-china.com/

# ไฝฟ็”จ็ปดๆŠคๅ›ข้˜Ÿๆต‹่ฏ•็š„ๆœ€ๅฟซ้•œๅƒ็ซ™
$ chsrc set ruby first

Look at that. flawless. ate and left no crumbs ๐Ÿ”ฅ


๐Ÿ“ FILES

We follow the No UFO (Unidentified File Objects) principle: https://www.yuque.com/ccmywish/blog/no-ufo

So there will be no files stored on your computer at all! not one! your filesystem stays clean, bestie ๐Ÿงšโœจ

๐Ÿ’œ AUTHOR

Written by Aoran Zeng, Heng Guo and contributors. (See chsrc.c)


๐ŸŽ€ REPORTING BUGS

On Gitee: https://gitee.com/RubyMetric/chsrc/issues On GitHub: https://github.com/RubyMetric/chsrc/issues

come yell at us (lovingly) ๐Ÿซถ


Copyright (C) 2026 Aoran Zeng, Heng Guo. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

ok that warranty bit is real โ€” NO WARRANTY, to the extent permitted by law. don't come for us ๐Ÿ’€

version v0.2.6, dated 2026-08-12 โ€” that's the whole chsrc(1) page, mwah, ily, go change some sources ๐Ÿ’–๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from