feat: fold in the portable Claude Code, zsh and git config; add a drift check

Added (all now linked from their live locations):
- home_root/.claude/settings.json. The statusLine command now uses $HOME
  instead of a Linux-only absolute path.
- home_root/.claude/bin/ratecheck and home_root/.claude/skills/australis-design.
- home_config/zsh/claude-config-dir.zsh and home_root/.local/bin/claude-config-dir-init,
  the per-repo Claude Code login helper and its seeding script.
- home_root/.gitconfig and home_config/git/ignore.
- home_root/.zshenv, with the cargo env line guarded so boxes without rust start clean.

link-dotfiles --check reports drift without changing anything: tracked files whose
live copy is no longer a link (stow dry-run conflicts) and links into this repo
that dangle. Exits 1 on drift. Verified against a clean baseline and two planted
drifts, a detached .nanorc and a dangling link.

.mailmap maps every earlier identity to Vuong Hoang: the repo-local 'Your Name'
placeholder config (now removed), host-generated emails, and aider suffixes.

CLAUDE.md: the symlink warning now lists every linked file and points at --check.
README: documents what is and isn't tracked under .claude, the edit rule, and --check.
This commit is contained in:
vh
2026-09-24 09:07:16 -07:00
parent 77225b01d6
commit 7b16be02bf
49 changed files with 2675 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Seed a second Claude Code config dir that shares everything login-independent
# with ~/.claude (symlinks) but holds its own credentials and its own
# .claude.json (copied once, so MCP servers and onboarding carry over; /login
# then rebinds the account). Usage: claude-config-dir-init /abs/path/.claude-<name>
set -euo pipefail
target="${1:?usage: claude-config-dir-init /abs/path}"
case "$target" in /*) ;; *) echo "use an absolute path (no ~ inside quotes)" >&2; exit 2;; esac
src="$HOME/.claude"
mkdir -p "$target"
shared=(CLAUDE.md CONTEXT.md skills plugins hooks agents commands settings.json settings.local.json keybindings.json statusline-command.sh bin projects projects-archive plans feedback)
for item in "${shared[@]}"; do
[ -e "$src/$item" ] || continue
if [ -e "$target/$item" ] && [ ! -L "$target/$item" ]; then echo "skip $item: real file already in $target" >&2; continue; fi
ln -sfn "$src/$item" "$target/$item"
done
if [ ! -e "$target/.claude.json" ] && [ -f "$HOME/.claude.json" ]; then cp "$HOME/.claude.json" "$target/.claude.json"; chmod 600 "$target/.claude.json"; fi
echo "seeded $target"; ls -la "$target" | sed -n '2,40p'
echo
echo "next: CLAUDE_CONFIG_DIR=\"$target\" claude → /login once; credentials land in $target/.credentials.json"