What it does
If you maintain a folder of symlinks in your PATH — shortcuts to scripts, binaries bundled inside GUI apps like Sublime Text or VS Code, language-manager shims — sym gives you a handful of commands for working with them: ls, info, create, edit, rm, verify, fix, plus undo and snapshot.
It's small and opinionated: one file, one directory, no config.
Why it might be useful
Doing any of this with ln, readlink, and find is straightforward. Doing it often is not. sym mostly just saves typing and surfaces a few things plain ln doesn't make obvious:
- which of your symlinks are broken, and where they used to point;
- whether the swap you're making is atomic, so there's no window where the link is missing;
- an escape hatch when you mistype —
sym undoreverses the last operation.
It isn't a dotfile manager or a package manager. It's for the pile of one-off symlinks that ends up in everyone's ~/.local/bin.
Install
On macOS or Linuxbrew:
Or clone the repository and run make install-local.
Quick start
Then sym ls to see what you've linked, sym verify to check nothing is dangling, sym fix to sweep up.
Changelog
- New
sym doctorcommand: a one-shot setup check (PATH, writable dirs, broken links, completions, man page). Exits non-zero on failure so post-install scripts and CI can verify setup. --format=jsonsupported fordoctoroutput.
- New commands:
edit,undo,snapshot save/list/restore,completion. - New flags:
ls --name,create --from,rm --match. verifynow exits non-zero when broken links exist, for CI use.- Create and edit replace existing links atomically via
rename(2). - Bulk operations install a SIGINT trap instead of leaving partial state on Ctrl-C.
- Pure-bash
realpathfallback for systems without coreutils.
- Fixed: valid relative symlinks were being reported as broken.
- Fixed:
ls --format=json|csvnow escapes quotes, commas, backslashes, and newlines. - Fixed:
((counter++))underset -ecould abortverifyandfix. - Fixed: PATH-not-in-PATH warning no longer fires after read-only commands.
- macOS bash 3.2 compatibility fix.
- Ship a pre-built man page so installation no longer requires
pandoc.
- Initial release:
ls,info,create,rm,verify,fix. Text, JSON, and CSV output.
Documentation
Full reference is in the man page: man sym, or see the README on GitHub.