Creates or updates symlinks from a config file
- Develop packages locally (composer, npm, ansible-galaxy)
$ git clone [email protected]:linkorb/symlinker.git
$ cd symlinker
$ composer install
Then update your PATH
environment to include the bin/
directory of the symlinker repository.
Create a file called symlinker.yaml
in the root of your project, for example:
links:
- "~/git/my-composer-package:./vendor/my-org/my-composer-package" # PHP / Composer
- "~/git/my-node-package:./node_modules/my-node-package" # Node / NPM
- "~/git/ansible-role-example:./roles/example" # Ansible / Galaxy
- "~/my-content:./my-content" # ... or any other arbitrary symlink
Your symlinker.yaml
file is specific for your development environment, so be sure to add it to your ~/.gitignore
(in your home-dir, not ./.gitignore
in the repo!)
Then you can quickly (re)install the symlinks:
$ symlinker link
symlinker loops over your configured "links". for every link it:
- checks if the "from" directory or file exists
- checks if the "to" symlink already exists at the target. if so, it removes it.
- checks if "to" is a directory or file. if so, it archives the existing data to
/tmp/symlinker/archive/
+ full path + date + time - sets up the symlink from "from" to "to".
So if you've accidentally replaced a directory with valuable files with a symlink, you can always recover it from the archive directory.
We welcome contributions to make this repository even better. Whether it's fixing a bug, adding a feature, or improving documentation, your help is highly appreciated. To get started, fork this repository then clone your fork.
Be sure to familiarize yourself with LinkORB's Contribution Guidelines for our standards around commits, branches, and pull requests, as well as our code of conduct before submitting any changes.
If you are unable to implement changes you like yourself, don't hesitate to open a new issue report so that we or others may take care of it.
Check out our other projects at linkorb.com/engineering.
By the way, we're hiring!