55 lines
1.1 KiB
Markdown
55 lines
1.1 KiB
Markdown
# Sigil
|
|
|
|
Sigil is a minimal symlink-based dotfile manager with per-package Lua config.
|
|
|
|
## Install (dev)
|
|
|
|
```
|
|
go run . <command>
|
|
```
|
|
|
|
## Commands
|
|
|
|
- `sigil apply` — apply symlinks from `~/.dotfiles`
|
|
- `sigil apply --prune` — prune stale links without prompting
|
|
- `sigil add <path>` — add a file/dir to the repo and symlink it
|
|
- `sigil status` — show stale links
|
|
- `sigil unlink <spec>` — restore file(s) and remove from repo
|
|
- `sigil remove <spec>` — same as unlink, plus remove package/subpath
|
|
|
|
## Repo layout
|
|
|
|
```
|
|
~/.dotfiles/
|
|
<package>/
|
|
config.lua
|
|
files/
|
|
...
|
|
```
|
|
|
|
## `config.lua`
|
|
|
|
```lua
|
|
return {
|
|
target = {
|
|
linux = "~/.config/nvim",
|
|
macos = "~/Library/Application Support/nvim",
|
|
default = "~/.config/nvim",
|
|
},
|
|
}
|
|
```
|
|
|
|
## Spec formats
|
|
|
|
`unlink/remove` accept:
|
|
- `package`
|
|
- `package:relative/path`
|
|
- repo path: `~/.dotfiles/<pkg>/files/...`
|
|
- target path: e.g. `~/.config/<app>/...`
|
|
|
|
## Notes
|
|
|
|
- Uses `SIGIL_REPO` env var to override the repo path.
|
|
- Conflicts are detected (existing non-symlink files will stop apply).
|
|
- Prefer `sigil add` over manual edits in `files/`.
|