dot.sh / bootstrap

Connect the files. Keep control.

The repository mirrors paths below the home directory. dot.sh links those paths into place conservatively: it reports conflicts, avoids silently replacing existing data and treats the .config directory as a special case.

The normal path

Plan before apply.

Use the same repository on another Mac without treating every existing file as disposable.

01 / PLAN

Preview links

dot.sh plan shows what is already correct, what could be linked and where conflicts exist. It does not change the home directory.

02 / REVIEW

Resolve conflicts

dot.sh conflicts lists only blockers. Existing real files, directories and links to other targets are not overwritten by default.

03 / APPLY

Create safe links

dot.sh apply creates the links it can make without replacing existing content.

A deliberate exception

.config stays real.

The script never makes one symlink for the whole .config directory. It links managed children individually, leaving other applications' configuration folders alone.

For an existing real directory, the optional --merge-existing-dirs mode lets dot.sh enter it and add only missing child links. It does not delete the existing contents.

home directory layout
~/.config/             # real directory
├── nvim     → ~/.dotfiles/home/.config/nvim
├── wezterm  → ~/.dotfiles/home/.config/wezterm
├── theme    → ~/.dotfiles/home/.config/theme
└── ...      # other apps remain independent

Explicit operations

When a path already exists.

ADD

Adopt a path

dot.sh add and dot.sh adopt move an existing path into the repository, then link it back. They refuse a path already present in the repository.

REPLACE

Replace a directory

dot.sh replace works only for a directory already managed under home/. It moves the old local target into timestamped backups before creating the link.

commands to inspect
./scripts/dot.sh plan
./scripts/dot.sh conflicts
./scripts/dot.sh apply

# Optional, explicit actions:
./scripts/dot.sh plan --merge-existing-dirs
./scripts/dot.sh add ~/.example
./scripts/dot.sh replace ~/.config/wezterm