Crates.io | lnkr |
lib.rs | lnkr |
version | 0.1.4 |
source | src |
created_at | 2023-07-10 11:25:00.624852 |
updated_at | 2023-07-25 15:14:07.549621 |
description | Linking stuff based on a config file |
homepage | |
repository | https://github.com/myFavShrimp/lnkr |
max_upload_size | |
id | 912863 |
size | 20,465 |
lnkr
is a powerful tool that allows you to symlink files and directories based on a simple configuration file. Say goodbye to manually creating symbolic links and let lnkr
handle it for you!
To install lnkr, use the following command:
cargo install lnkr
lnkr uses a configuration file to define the symlinks. Here's an example configuration from a lnkr.yaml
:
links:
- os: [linux]
destination: ~/.config
items:
- name: helix
path: ./helix
force: true
In the above example, we have a symlink configuration for Linux. The destination specifies where the symlink should be created, and the items array contains the individual symlinks to be created. Each item has a name
and a path
. The optional force
parameter can be set to true to overwrite existing files or directories.
lnkr will only create symlinks whose link groups' os
key matches the current operating system. For example, if you have a link group with os [linux, macos]
and your current operating system is Linux, lnkr will create the symlinks specified within that group.
You can specify the target operating system by using one or more of the following values in the os field:
Symlinks will be created by the following logic:
<destination>/<name> -> <path>
To symlink your files and directories using lnkr, follow these steps:
Open your terminal and navigate to the directory containing your lnkr.yaml
.
Run the following command:
lnkr
That's it! lnkr will symlink your files and directories, saving you valuable time and effort.