This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Personal Arch-centric dotfiles plus a stow bootstrap (install.sh) and two standalone helper scripts. GNU Stow packages live at the repo root (one directory per package); install.sh stows them into $HOME. The canonical checkout is ~/Projects/dotfiles — never ~/.dotfiles or a second clone, which produces duplicate stow sources and configs symlinked into the wrong tree. An older scripts//config//ansible/ installer was removed; treat those paths as gone, not as code to resurrect.
.github/copilot-instructions.md still describes the old installer and is stale. If a task contradicts that file and the current tree, trust the tree.
- Each top-level directory is a GNU Stow package rooted at
$HOME, mirroring the target layout (e.g.fish/.config/fish/config.fish→~/.config/fish/config.fish;bash/.bashrc→~/.bashrc).clamav/clamav/*.confis the exception: those link into/etc/clamavand need a root stow target, not$HOME. install.sh— POSIX/bin/sh -ebootstrap. Installs stow, then loops the top-level package dirs and stows each into$HOME(skipsclamav; also skips any dir that isn't a$HOMEpackage — one with a non-hidden top-level entry, e.g. a stray packages dir). Default is repo-wins (drops conflicting symlinks,--adopts, thengit restores so tracked versions win);--adoptflips to local-wins.system.yaml— blendOS package manifest (historical; kept for package-list reference, not consumed by any script).sftp-setup.sh— interactive SSHFS mount manager. Installssshfsvia the detected package manager, generates a systemd user unit at~/.config/systemd/user/sshfs-<host>.service, enables it. Supports add/remove flows. POSIX/bin/sh -e.symlink-nas.sh— idempotent script that symlinks NAS paths (default$HOME/nas) into XDG user dirs (~/Documents,~/Pictures,~/Music,~/Videos,~/Downloads) using theNAS-<source>naming convention. Bash,set -euo pipefail. Flags:--dry-run,--force,--nas PATH. Refuses to clobber real files/dirs; only replaces existing symlinks when--force.
# Stow a single package into $HOME (run from the repo root)
cd ~/Projects/dotfiles && stow -t ~ fish
# Preview (dry run)
stow -n -v -t ~ fish
# Adopt existing configs into the repo (moves files into <pkg>/, then links back)
stow --adopt -t ~ fish
# Re-link after changes
stow -R -t ~ fish
# Unlink
stow -D -t ~ fish
# SSHFS mount manager (interactive)
./sftp-setup.sh
# NAS symlinks
./symlink-nas.sh --dry-run
./symlink-nas.sh --nas /mnt/nasNo test suite, no lint config, no build step.
- Commits: Conventional prefixes per
.github/COMMIT_MESSAGE_GUIDELINES.md(feat:,fix:,docs:,refactor:,chore:,ci:,config:,remove:,update:, etc.). Imperative mood, wrap body at 72 chars. - Shell scripts:
symlink-nas.shstyle: bash,set -euo pipefail, explicit flags, idempotent, never clobber real files.sftp-setup.shstyle: POSIXsh, detectsudo/doasviaESCALATION_TOOL, detect package manager by probingnala apt-get dnf pacman zypper apk xbps-install eopkgin order. Match this pattern if adding new distro-portable scripts.
- Adding a new dotfile package: create
<name>/at the repo root mirroring the home-relative target path (e.g.<name>/.config/<name>/...for XDG configs, or<name>/.<file>for a top-level dotfile). Stow derives the symlink target from that structure — don't flatten it. Every top-level entry a$HOMEpackage places must be hidden (.config,.bashrc, …);install.shskips any package dir with a non-hidden top-level entry. - Secrets:
.gitignoreblocks.env*globally but keeps*.env.example. When adding config that references secrets, ship a.env.exampleand keep the real file untracked.
.github/workflows/sync-wiki.yml and update-readme.yml trigger on paths (scripts/**, config/**, output/**, install.sh) that no longer exist. They'll still run on **/*.md changes but most of their logic is dead. Don't rely on them; flag them for cleanup if touching CI.