| Crates.io | rrcm |
| lib.rs | rrcm |
| version | 0.4.3 |
| created_at | 2023-07-17 10:52:56.421609+00 |
| updated_at | 2025-03-14 12:09:09.964777+00 |
| description | Rust RC file Management commands |
| homepage | |
| repository | https://github.com/mizuki0629/rrcm |
| max_upload_size | |
| id | 918395 |
| size | 168,633 |
A cross-platform compatible tool for deploying multiple dotfiles repositories.
Provides the location of these directories by leveraging the mechanisms defined by
The configuration file specifies the mapping between deployment sources and destinations for each platform. rrcm creates symbolic links to files and directories directly under the deployment targets in the deployment destination.
(dotfiles repository download directory)
dotiles
│ (local repositroy)
├── example1
│ │ (deploy target)
│ ├── home
│ │ │ (symbolic link)
│ │ ├── .profile <- $HOME/.profile (on Linux and Mac)
│ │ │ %PROFILE%\.profile (on Win)
│ │ ├── .vim <- $HOME/.vim (on Linux and Mac)
│ │ │ %PROFILE%\.vim (on Win)
│ │ └── ...
│ │
│ └── .config
│ ├── nvim <- $HOME/.config/nvim (on Linux and Mac),
│ │ %PROFILE%\AppData\LocalAppData\nvim (on Win)
│ └── ...
│
└── example2 (next local repositroy)
└── ...
Under the deployment target dierctory, files and directorys are deployed by symbolic link. Windows needs to be run as administrator.
configuration file path:
---
# dotfiles repositroy download directory
dotfiles:
windows: "%USERPROFILE%\\dotfiles"
mac: "${HOME}/.dotfiles"
linux: "${HOME}/.dotfiles"
# repositories. multiple repositories can be specified.
repos:
# local repository name
- name: example1
# git repository url
url: 'git@github:example/example1'
# deploy configuration
deploy:
# deploy target
# Example: deploy home directory to $HOME or %USERPROFILE%
home:
# deploy destination on each OS.
# if OS not defined, it will not be deployed.
windows: "%USERPROFILE%"
mac: "${HOME}"
linux: "${HOME}"
# Example: deploy .config directory to XDG_CONFIG_HOME or %USERPROFILE%\AppData\Roaming
.config:
windows: "%FOLDERID_RoamingAppData%"
mac: "${XDG_CONFIG_HOME}"
linux: "${XDG_CONFIG_HOME}"
# Example: deploy .config-LocalAppData to XDG_CONFIG_HOME or %USERPROFILE%\AppData\Local
.config-LocalAppData:
windows: "%FOLDERID_LocalAppData%"
mac: "${XDG_CONFIG_HOME}"
linux: "${XDG_CONFIG_HOME}"
# next repository
- name: example2
url: 'git@github:example/example2'
...
Environment variables can be used in deployment destination.
Format
The following special variables are available.
cargo install rrcm
initialize config file
rrcm init
# or initialize config file from http
rrcm init <url>
I recommend using gist like this. my config.yaml
update(git clone or pull) repositories and deploy
rrcm update
show deploy status
rrcm status