https://github.com/aocoronel/neostow-sh
✨ The declarative GNU Stow
https://github.com/aocoronel/neostow-sh
declarative shell stow symlink
Last synced: about 1 month ago
JSON representation
✨ The declarative GNU Stow
- Host: GitHub
- URL: https://github.com/aocoronel/neostow-sh
- Owner: aocoronel
- License: mit
- Created: 2025-05-04T16:39:49.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T18:23:28.000Z (about 1 month ago)
- Last Synced: 2025-08-29T00:44:50.895Z (about 1 month ago)
- Topics: declarative, shell, stow, symlink
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The declarative GNU Stow
`neostow` is a tool that streamline the process to manage symlinks like GNU stow, but using a configuration file. It allows for more flexible symlink management, enabling the creation of symlinks from anywhere to anywhere on your computer.
This declarative nature allows to easily make reproducible and granular symlinking, unlike GNU Stow. However, this project does not aims to fully replace GNU Stow, but to give a declarative feature missing from it.
You can also look for a version of this script written in Nim at [neostow-nim](https://github.com/aocoronel/neostow-nim).
## Features
- **Flexible Symlink Creation**: Create symlinks from any source to any destination.
- **Per-Project Configuration**: Maintain a `.neostow` configuration file per project.
- **Overwrite Symlinks**: Optionally overwrite existing symlinks.
- **Remove Symlinks**: Easily remove all created symlinks.## Installation
```bash
git clone https://github.com/aocoronel/neostow.git
chmod +x neostow/src/neostow
sudo cp neostow/src/neostow /usr/local/bin/
```## Usage
`neostow` reads from a `.neostow` file in the current directory to determine which symlinks to create. The `.neostow` file should contain lines in the following format: `source=destination`.
See the manpage for more details.
```
NeostowUsage: neostow [OPTION] [COMMAND]
Options:
-d Remove all symlinks
-h, --help Displays this message and exits
-p [PARALLEL] Set parallels
-r Overwrite symlinks
-c [ABSOLUTE_PATH] Use different configuration file
-v Enable verboseCommands:
edit Edit the .neostow file
```### Configuration File
The `.neostow` file should be placed in the root of your project directory.
#### Examples
Example `.neostow` file:
```
config/myconfig=/home/username/.config/myconfig/
scripts/myscript.sh=/home/username/bin/myscript/
```## Integrations
### [Just](https://github.com/casey/just)
`just` is a handy way to save and run `neostow` commands from any directory within the project.
In or `justfile`, you may create a recipe like this:
```just
# Neostow: Verbose and overwrite
neostow:
neostow -v -r
```Then, from any child directory where this `justfile` was placed, you can just run `just neostow`, and it will run the configured recipe.
## License
This repository is licensed under the MIT License, a very permissive license that allows you to use, modify, copy, distribute and more.