RCUP(1)
π RCUP(1) β the group chat edition π
okay bestie, gather round, because this is rcup from the General Commands Manual, and she is that girl. she updates and installs the dotfiles you've been hoarding in your separate dotfiles directory. the whole point: you keep your precious configs in their own little folder, and rcup yeets them into place from your dotfiles directories, or from the host- or tag-specific subfolders inside them. β¨
wanna know the layout? scroll to βDIRECTORY LAYOUTβ below, it's all there, no cap.
β¨ SYNOPSIS β¨
rcup [-CfhiKkqVv] [-B hostname] [-d dir] [-g] [-I excl_pat]
[-S excl_pat] [-s excl_pat] [-t tag] [-U excl_pat] [-u excl_pat]
[-x excl_pat] [files ...]
π«Ά DESCRIPTION π«Ά
this is the program that updates and installs your personal dotfiles, and those dotfiles live in their own separate directory. use rcup to install files from your dotfiles directories, or from the host- or tag-specific directories hanging out inside them. π
want the full tea on how the folders are arranged? it's in βDIRECTORY LAYOUTβ, go look.
she supports these options, and yes we're going through all of them, no skipping:
-BHOSTNAME β treathost-HOSTNAMEas the host-specific directory instead of computing it yourself. let her do the math, it's fine.-Cβ copy the files instead of symlinking them.-dDIR β install dotfiles from the DIR. and you can say this one multiple times, she can handle it. πͺ-fβ if the rc file is already sitting in your home directory but it does not match the file in your dotfiles directory, remove the rc file and then create the symlink. out with the old, in with the slay.-gβ print to stdout a standalone shell script that will run thercupcommand as specified. and here's the iconic part: nothing on your filesystem will be modified byrcupwhen this flag is passed. window shopping only, bestie. π-hβ show usage instructions.-IEXCL_PAT β install rc files that match EXCL_PAT even though they got excluded by the-xflag or by a setting inrcrc(5). can be repeated with additional patterns. checklsrc(1), βEXCLUDE PATTERNβ, for more details.-iβ if the rc file already exists in your home directory but doesn't match the file in your dotfiles directory, prompt for how to handle it. this is the default. she'll always ask first, consent queen. π-Kβ skip pre- and post-hooks.-kβ run pre- and post-hooks (peep βDIRECTORY LAYOUTβ for the hook deets). this is the default.-SEXCL_PAT β any rc file that matches EXCL_PAT is installed using a symlink even if it's a directory. repeatable, go off.-sEXCL_PAT β any file that matches EXCL_PAT is installed as normal, in accordance with the βALGORITHMβ section below. this is the opposite of-S. repeatable, obviously.-tTAG β install dotfiles according to TAG.-UEXCL_PAT β any rc file that matches EXCL_PAT is installed without a leading dot. repeatable. see the documentation of the-Uoption inlsrc(1)for more info.-uEXCL_PAT β any rc file that matches EXCL_PAT is installed with a leading dot. this is the opposite of-U. repeatable. and it's the default. see the documentation of the-uoption inlsrc(1)for more info.-qβ decrease verbosity. shhh. π€«-Vβ show the version number.-vβ increase verbosity. repeat it for extra verbosity. and heads up: verbose messages are printed to stderr. π’-xEXCL_PAT β do not install rc files that match EXCL_PAT. repeatable with additional patterns. seelsrc(1), βEXCLUDE PATTERNβ, for more details.- files β only install the specified file(s). picky, love that for you.
π¦ DIRECTORY LAYOUT π¦
any non-dot, non-meta file or directory under your dotfiles directory gets installed as a dotfile. for example, .dotfiles/zshrc will be installed into ~/.zshrc. cute, right?
files are installed as symlinks. directories are installed by making directories. the -C flag makes files install as copies instead of symlinks. and the COPY_ALWAYS option in rcrc(5) lets you list files that must only be copied. important: copied files are not updated in your dotfiles directory. so like, don't expect them to sync back, that's not the vibe.
three meta files are supported: host-specific files, tagged files, and hooks.
Host-specific files go in a directory named for the host, prefixed with host-. for example, .dotfiles/host-scarlett contains files specific to the computer with hostname scarlett, and those files will only be installed on the computer with hostname scarlett. exclusive. π
Tagged files go in a directory named for the tag, prefixed with tag-. so files under .dotfiles/tag-git are only installed when you install using the git tag.
Hooks go in a directory named hooks. rcup supports two hooks: pre-up and post-up. these live in files or directories with predictable filenames: .dotfiles/hooks/pre-up and .dotfiles/hooks/post-up, or .dotfiles/hooks/pre-up/* and .dotfiles/hooks/post-up/*. these files must be executable. they run every single time rcup is run, which means they must be idempotent. no cap, if your hook isn't idempotent you're gonna have a bad time. π
hooks get executed one at a time, sorted alphabetically. for instance, hooks/pre-up/animals will run before hooks/pre-up/aquariums, and hooks/pre-up/4-eyes will run before hooks/post-up/2-u-nothing-compares. alphabetical, periodt.
π ALGORITHM π
ngl, it's genuinely useful to understand the process rcup uses when synchronizing your rc files. here's the whole storyline:
- the
pre-uphook is run. - all non-host, non-tag files without a dot prefix are symlinked to the dotted filename in your home directory. so,
.dotfiles/tigrcis symlinked to~/.tigrc. - all non-host, non-tag directories have their structure copied to your home directory, then a non-dotted symlink is created within. so for example,
.dotfiles/vim/autoload/haskell.vimcauses the~/.vim/autoloaddirectory to be created, thenhaskell.vimis symlinked within. - steps (2) and (3) are applied to host-specific files. these are files under a directory named
host-$HOSTNAME. - steps (2) and (3) are applied to tag-specific files. these are files under directories named
tag-$TAG_NAME, where$TAG_NAMEis the name of each specified tag in turn, taken from the command line or fromrcrc(5). - the
post-uphook is run.
and that's the whole arc, bestie. beginning to end. π§
πΈ ENVIRONMENT πΈ
RCRCβ user configuration file. defaults to~/.rcrc.
π FILES π
~/.dotfiles~/.rcrc
π SEE ALSO π
lsrc(1), mkrc(1), rcdn(1), rcrc(5), rcm(7)
β AUTHORS β
rcup is maintained by Mike Burns <mburns@thoughtbot.com> and thoughtbot: http://thoughtbot.com
okay that's the whole page, you ate it, you understood it, main character energy fr fr. π
this edition came from Debian, dated July 28, 2013 β so yeah, she's been iconic since way back, and she still slays. byeee πβ¨
π¦ where this page comes from
- alpine 3.24: rcm-doc 1.3.6-r0 Β· BSD-3-Clause
- epel 9: rcm 1.3.6-1.el9 Β· BSD
- fedora 43: rcm 1.3.6-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: rcm 1.3.6-10.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: rcm 1.3.6
- nixpkgs unstable: rcm 1.3.6
- opensuse-leap 16.0: rcm 1.3.6-bp160.1.9 Β· BSD-3-Clause
- ubuntu stonking: rcm 1.3.6-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms