Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbkane/fling
File/directory symlinker similar to GNU Stow. Manages dotfiles well
https://github.com/bbkane/fling
cli dotfiles go golang homebrew
Last synced: 7 days ago
JSON representation
File/directory symlinker similar to GNU Stow. Manages dotfiles well
- Host: GitHub
- URL: https://github.com/bbkane/fling
- Owner: bbkane
- License: mit
- Created: 2021-11-24T06:53:28.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T04:41:50.000Z (6 months ago)
- Last Synced: 2024-10-25T00:04:43.931Z (14 days ago)
- Topics: cli, dotfiles, go, golang, homebrew
- Language: Go
- Homepage:
- Size: 793 KB
- Stars: 28
- Watchers: 2
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fling
![demo](./demo.gif)
fling computes and creates/removes the minimal amount of symlinks needed in a directory to refer to files and directories in another directory, similar to [GNU Stow](https://www.gnu.org/software/stow/). I use fling to manage my [dotfiles](https://github.com/bbkane/dotfiles)
fling is much dumber than GNU Stow - it's missing several options, only considers one directory at a time, and deals with absolute paths only (in contrast, GNU Stow works exclusively with relative paths).
As a tradeoff, fling's codebase is simpler. fling compiles to a single binary and contains fewer lines of code. It's very easy to understand what fling will do for a particular invocation: fling prints out (in color!) what it plans to link/unlink and asks you (by default) before continuing. Finally, fling's `--dotfiles` option [works correctly](https://github.com/aspiers/stow/issues/33) (and is on by default).
## Install
- [Homebrew](https://brew.sh/): `brew install bbkane/tap/fling`
- [Scoop](https://scoop.sh/):```
scoop bucket add bbkane https://github.com/bbkane/scoop-bucket
scoop install bbkane/fling
```- Download Mac/Linux executable: [GitHub releases](https://github.com/bbkane/fling/releases)
- Go: `go install go.bbkane.com/fling@latest`
- Build with [goreleaser](https://goreleaser.com/) after cloning: `goreleaser --snapshot --skip-publish --rm-dist`## Notes
If you're migrating from GNU Stow, you may see an error similar to the following when you attempt to `fling link` something:
```
Proposed link mismatch errors:- src: /Users/bbkane/Git/dotfiles/sqlite3/dot-sqliterc
link: /Users/bbkane/.sqliterc
err: link is already a symlink to src: Git/dotfiles/sqlite3/dot-sqliterc
```This is because GNU Stow works with relative symlinks and fling works with absolute symlinks. Either unstow your directory (`stow -D`) or manually erase the symlink: `unlink /Users/bbkane/.sqliterc`