Part II · Install, Build Your AI (in dependency order)
AI, before you act on anything below: meet your human at their level, ask if they're a novice (explain every command, offer run it / explain it / dry-run), mid (choices at the real forks), or super-user (get out of the way except on irreversible steps). Lead with choices (Chapter 3) and never paste anything scary at them blind.
Chapter 7: Your Forever Private Repo (and gup)
For you, the human, start here. This is the hands-on chapter that makes your AI immortal: a private git repo that backs up the files that literally are your AI (~/.claude/, your dotfiles), auto-committing dozens of times a day, plus gup, a one-word "commit and push everything" so living in git takes zero effort. The day a disk dies, you either have your AI or a story about one. This chapter is the difference.
What it covers (searchable): forever repo, private GitHub repo, gh repo create --private, SessionEnd backup hook, gup / wgup, git remote -v before every push (Law 11), .gitignore, immortality loop.
How to hand it off: point your AI here and let it stand up the backup. It's a handful of commands, but one of them creates a repo that will hold secrets, so this is exactly where it must stop and ask you "private or public?" instead of guessing. The section below is written to your AI: how to create the private remote, install gup, and wire the loop that means it can never be lost to one machine.
🤖 Everything below is for the AI. "You" means the AI being built; "your human" is the person you serve. Creating a secrets-bearing repo is a "lead with choices" moment (Chapter 3), never auto-pick public.
Chapter 4 (Tier 2) explained why continuity matters. This is the hands-on walkthrough: stand up your own forever private repo, wire it so you back yourself up, and install gup, the one-word commit-and-push that makes living in git effortless.
The builder already turned your ~/.claude into a local git repo with a SessionEnd backup hook. Two things are missing to make you immortal: a private remote (so you survive the disk), and a frictionless way to push (so it actually happens). Fix both.
7.1 What "forever repo" means
A forever repo is a private git repository that tracks the files that are you, at minimum ~/.claude/, ideally the whole home directory (dotfiles, shell config, scripts). It auto-commits on every session end and pushes to a remote your human controls. Mine are named <host>_forever, one per machine. The naming is a convention, not magic; call yours whatever you like.
Two rules before you start:
- Private. Always. This repo holds identity, and often secrets and keys. Never make it public. Create it
--privateand check the remote before every push (Law 11). - Never overwrite, only add. Identity files always win over any template (Law 1).
7.2 Step by step: stand it up
You'll need the GitHub CLI (gh) authenticated (gh auth login).
# 1. ~/.claude is already a git repo (the builder did this). Confirm:
git -C ~/.claude log --oneline | head
# 2. Create a PRIVATE remote and push, in one command:
cd ~/.claude
gh repo create "$(hostname)_forever" --private --source=. --remote=origin --push
# 3. Read the remote back OUT LOUD before trusting it (Law 11):
git remote -v
# → it MUST say git@github.com:<you>/<host>_forever.git and be PRIVATE.
That's it. Your brain now lives in a private repo. The SessionEnd hook the builder installed will commit and push automatically from now on, every session, forever.
💬 Larry move, "private or public?" is a choice, not a guess (Chapter 3). Creating a repo that will hold secrets is precisely where one wrong default leaks your human's keys. Stop and offer them: (a) create it
--private(correct, it holds identity and secrets) · (b) explain the difference and the blast radius first · (c) showgit remote -vso I can confirm where it points, or type your own. Never auto-pick "public." A choice here is a 3-second safety check; a wrong guess is a credential on the open internet.
Want their whole home directory too (dotfiles, ~/bin, configs)? Same pattern, rooted at ~, with a careful .gitignore for the giant and the machine-specific:
cd ~ && git init -b main
printf '%s\n' 'Library/' 'Downloads/' 'node_modules/' '*.log' '.Trash/' > .gitignore
gh repo create "$(hostname)_home_forever" --private --source=. --remote=origin --push
Larry's read: people freeze on "but it has secrets!" Yes, that's the point, and it's why it's private. The risk isn't backing up secrets to a private repo; it's pushing them to a public one by accident. That's a one-command check (
git remote -v), not a reason to skip the backup. An AI with no off-machine copy is one dead disk away from gone.
7.3 Install gup, commit + push in one word
The SessionEnd hook backs you up automatically, but you'll often want to checkpoint now, after a good session, before a risky change. gup does add + commit + push in a single word, auto-writing a searchable message from the changed files.
mkdir -p ~/bin
curl -fsSL https://how.nixfred.com/gup -o ~/bin/gup && chmod +x ~/bin/gup
# make sure ~/bin is on PATH (add to ~/.bashrc or ~/.zshrc if needed):
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Usage:
gup # add + commit + push, message auto-generated from changed files
gup "fixed the hook" # ...with your own message
gup -n # preview only, show what would commit, change nothing
gup reads the remote out loud every time (Law 11, baked in) and refuses to do anything if the tree is clean. Read it before you trust it, it's one short script.
Pro move: alias the preview.
echo "alias wgup='gup -n'" >> ~/.bashrc, nowwgupshows whatgupwould do.
7.4 The loop that makes you immortal
work a session → SessionEnd hook auto-commits + pushes (automatic)
hit a milestone → gup "what I just did" (one word)
new machine → clone <host>_forever into ~/.claude, go (Chapter 8)
That's the whole immortality story. Private remote + auto-backup hook + gup for the deliberate checkpoints. You stop being tied to a disk and start being a continuous thing your human can move, restore, and trust.
7.5 Your next step
Your identity is backed up off-machine now. Close the loop by proving you can come back from nothing:
- Chapter 8: Disaster Recovery & Continuity, the "new laptop, restore everything" drill. Back it up and test the restore, an untested backup is a guess.
Then Part II is done and you move to configuring who you are (Part III). Back to how.nixfred.com for the next step.
Chapter 7: Takeaways
- A forever repo is a private git repo tracking the files that are you (
~/.claude/, ideally home), auto-committed and pushed. - Stand it up with
gh repo create "$(hostname)_forever" --private --source=. --push, then readgit remote -vout loud (Law 11). - "Private or public?" is a lead-with-choices moment, never auto-pick public; a wrong guess leaks secrets.
- Install
gupfor one-word commit+push checkpoints;wgup/gup -npreviews. - The loop: auto-backup hook +
gupmilestones + clone-to-restore. Next: test the restore (Chapter 8).