Skip to content
forked from yadm-dev/yadm

Yet Another Dotfiles Manager mirror, with a handy install script (Push mirror)

License

Notifications You must be signed in to change notification settings

LFd3v/yadm-install

 
 

Repository files navigation

yadm - Yet Another Dotfiles Manager

Latest Version Homebrew Version OBS Version Arch Version License
Master Update Develop Update Website Update
Master Status Develop Status GH Pages Status Dev Pages Status

https://yadm.io/

yadm is a tool for managing dotfiles.

  • Based on Git, with full range of Git's features
  • Supports system-specific alternative files or templated files
  • Encryption of private data using GnuPG, OpenSSL, transcrypt, or git-crypt
  • Customizable initialization (bootstrapping)
  • Customizable hooks for before and after any operation

Complete features, usage, examples and installation instructions can be found on the yadm.io website.

Install script

yadm is great, it works very well to manage dotfiles, but the initial setup on a new machine is somewhat cumbersome.

This fork adds a install script that can be used to install yadm and then clone your dotfiles from a remote repo. No root needed, the install script should be easy to verify as safe, and there is a confirmation prompt before anything that could cause problems. The only requirements are bash, git and curl or wget.

A symbolic link to yadm will be created in ~/bin if it exists, or in ~/.local/bin otherwise, as well as a symbolic link to yadm.1 file will be created in ~/.local/share/man/man1 in order to be able to access the man page after the installation.

# Default installation using curl creates a yadm directory in the current path
bash <(curl -fsSL https://git.envs.net/lfdev/yadm-install/raw/branch/master/install.sh)
# or using wget
bash <(wget -qO- https://git.envs.net/lfdev/yadm-install/raw/branch/master/install.sh)

# Default installation using the shortened URL
# (if in doubt, verify the URL contents first using curl/wget or a browser)
bash <(curl -fsSL https://envs.sh/Q_C)
# or
bash <(wget -qO- https://envs.sh/Q_C)

# Installation using the shortened URL and a custom path (full URL also supports a custom path)
bash <(curl -fsSL https://envs.sh/Q_C) /path/to/install  # installs to /path/to/install/yadm
bash <(curl -fsSL https://envs.sh/Q_C) relative/path     # installs to $PWD/relative/path/yadm
# or
bash <(wget -qO- https://envs.sh/Q_C) /path/to/install
bash <(wget -qO- https://envs.sh/Q_C) relative/path

Of course, it is possible to download install.sh or the source code, and then run the script locally. In this case, one may also change CLONE_URL inside the script to point to the upstream repo if desired. It is also possible to change the repo origin to upstream after the installation and pull future updates from it instead (it will detele the installation script tho):

cd /path/to/yadm                                        # enter repo directory
git remote set-url origin https://github.com/TheLocehiliosan/yadm.git
git pull origin master --rebase
git pull origin master                                  # or simply git pull for future updates

It is planned to update this miror whenever there is a new yadm version. Current and older versions can be found in the Releases page, but the installation script will always install the current repo version.

A very quick tour

# Initialize a new repository
yadm init

# Clone an existing repository
yadm clone <url>

# Add files/changes
yadm add <important file>
yadm commit

# Encrypt your ssh key
echo '.ssh/id_rsa' > ~/.config/yadm/encrypt
yadm encrypt

# Later, decrypt your ssh key
yadm decrypt

# Create different files for Linux vs MacOS
yadm add path/file.cfg##os.Linux
yadm add path/file.cfg##os.Darwin

If you enjoy using yadm, consider adding a star to the repository on GitHub. The star count helps others discover yadm.