Skip to main content

Dotfiles

nathan-roberts/dotfiles, private, cloned to ~/.dotfiles.

How it loads

~/.zshrc sources ~/.dotfiles/setup.init, which then runs in this order:

OrderWhatNote
1.zshenvEnvironment variables
2Adds $DOTFILES/bin to PATHMakes project-setup available
3Symlinks AI skills into ~/.claude/skillsSee below
4Every zsh/*.zsh
5.zsh_aliasesLoads after zsh/, so aliases here win
6.nr-bash-commandsNearly empty
7.zshrc.localGitignored, machine-specific, beats everything

Skills are symlinked on every shell start

Step 3 is the surprising one. Each folder in ai/skills/ is symlinked individually into ~/.claude/skills/<name>.

Individually, not as one folder symlink, so skills installed by other tools can sit in ~/.claude/skills without ending up in the repo. It also prunes dead symlinks and refuses to overwrite a real directory.

This is why editing a SKILL.md in the repo takes effect immediately. No install step.

Commands worth remembering

CommandDoes
scanInteractive UpdraftPlus restore picker. See below
skill-new <name>Scaffolds ai/skills/<name>/SKILL.md plus references/, opens it. Refuses if it exists
skill-edit, skill-cat, skills, skills-lsOpen, print, cd to, list skills
sslcerts <domain>Certificate validity window, subject and issuer
mkcd <dir>Make a directory and cd into it
backup <file>Copy to <file>.bak
wpinitNew WordPress project from scratch, creates the private GitHub repo too
project-setupBootstraps an existing WordPress directory
dludDownloads UpdraftPlus Premium from a Dropbox link
devOpens three things at once: Surf, Tower, and ddev launch

scan

The most substantial thing in here, 616 lines of Python behind a one-word command, and nothing about the name says "restore".

Run scan anywhere inside a DDEV project. It walks up to find .ddev/config.yaml, reads docroot: from it, lists backups in <docroot>/wp-content/updraft, and gives an arrow-key picker for the backup and which components to restore. Then it runs ddev wp updraftplus rescan-storage local and restore <nonce> --components=....

Solves "which of these forty zips do I restore, and what's the nonce" without opening wp-admin.

wpinit vs project-setup

Easy to reach for the wrong one.

wpinitproject-setup
Starting fromNothingAn existing WordPress directory
Creates GitHub repoYes, private, via ghNo
Branchesmain then devCurrent only
UpdraftPlusPremium, from DropboxFree, from wordpress.org
FinishesPrints commands for you to run manuallyFully automatic

wpinit not finishing on its own is the bit that catches you out.

Known problems

ProblemDetail
gp commits the wrong dateDefined with double quotes, so $(date) is evaluated once at shell start. Every gp commit is stamped with when the shell opened. Single quotes fix it
oh-my-zsh may be dead configsource $ZSH/oh-my-zsh.sh is commented out at zsh/ohmyzsh.zsh:70, so the whole plugins=(...) array and the powerlevel10k theme do nothing from this file
l and la broken on macOSRedefined at .zsh_aliases:195 using GNU --color, clobbering the earlier correct ${colorflag} versions
wpsetup likely brokenPoints at ~/scripts/wp-setup.sh, which isn't in this repo
precmd overridden wholesale.zshenv:43 replaces the hook, which can quietly break a powerlevel10k prompt
Fourteen aliases defined twicegs, l, la, ll, localip, map, myip, o, p, qc, reload, show, sniff, t. The later ones win
c is surf ., not code .WARP.md says otherwise

Docs in here are stale

README.md and WARP.md both describe a repo that no longer exists. README omits ai/skills/, wp-scripts/, scripts/, most of zsh/, and says nothing about skills symlinking. It still has github.com/yourusername/dotfiles placeholder text. WARP.md gets c, dev and scan wrong.

Treat this page as the accurate one until those are fixed.

Global Claude preferences

~/.claude/CLAUDE.md is a symlink to ai/CLAUDE.md in this repo, so it's version controlled rather than a loose file in the home directory.

setup.init recreates the symlink on every shell start, the same way it does for skills. If a real file is already sitting at ~/.claude/CLAUDE.md it refuses to overwrite it and says so, so on a new machine move that file into ai/ first.