0.1.0 |
|
---|
#30 in #restore
9KB
218 代码行
Hoarder
一个简单的配置文件管理器,让事情更清晰。
安装
cargo install hoarder
用法
示例: plimeor/dotfiles
设置
- 运行
hoarder init
以在当前目录创建一个hoarder.json
- 将环境变量
HOARDER
设置为该目录 - 更新
hoarder.json
以指定要收集的文件,例如
{
"nvim": {
".config/nvim": "~/.config/nvim"
},
"zsh": {
".zshrc": "~/.zshrc",
".zsh_profile": "~/.zsh_profile"
}
}
收集
使用 hoarder collect
收集指定的文件并在原地留下符号链接,例如
- dotfiles # you should use env `HOARDER` to specify this dir
- nvim
- .config
- nvim
- zsh
- .zshrc
- .zsh_profile
- hoarder.json # configuration
还原
使用 hoarder restore
将文件复制回原始位置。
依赖关系
~0.7–1.6MB
~35K SLoC