| name | repo-user |
| description | Operate the `repo` personal-git-hosting orchestrator —
init / stage / push / pull / sync repository identities
across account peers. Trigger when the user wants to
create a personal git repo, set up peer sync between
machines, work with one of the four repo types
(bare / stage / child / clone), or resolve cross-peer
conflicts.
|
repo-user skill
1. Design principles
- Educational. Reading
bin/repo end-to-end teaches
the four-typed repo identity model.
- Functional. Each verb wraps a small set of
git(1) calls.
- Decentralized. Each account holds its own bare;
sync is symmetric pull/push between peers.
- Simple.
repo calls only account and config
at runtime.
2. The model
A repository identity is a slug <name> with four
forms across the local + peer topology:
| Form | Where | Purpose |
|---|
bare | $XDG_DATA_HOME/repo/<name>.git | canonical receive-pack target |
stage | ~/src/<name> (working tree) | local user pushes here |
child | ~/src/<name> pointing at peer bare | seeds peer repos |
clone | ~/src/<name> (read-only clone) | vanilla clone |
Sync is git pull/push against peer bares; SSH
endpoints come from account remote-url <peer> <purpose> (FEAT-044).
3. Workflow recipes
-
Init a new repo identity.
repo init notes
repo bare notes
repo stage notes
-
Inspect.
repo source-home # ~/src
repo data-home # ~/.local/share/repo
repo identity # the slug
-
Sync to a peer.
repo sync notes alice@example.com
repo push notes alice@example.com
repo pull notes alice@example.com
-
Status across all repos.
repo status
-
Conflict resolution.
repo conflicts
repo resolve notes
-
Rename across all forms.
repo rename old new
-
Seed a peer's bare from a local stage.
repo child notes alice@example.com
cd ~/src/notes && git push alice@example.com master
4. Guardrails
- Never force-push to a bare without explicit
confirmation. A bare is the canonical
receive-pack target for one or more stages;
rewriting its history breaks every clone /
child / peer downstream. If
git push --force
feels necessary, confirm with the human owner
first.
- Don't manually
git remote add after repo stage. repo manages remotes via the
account remote-url resolver; manual edits drift
out of sync.
repo clean <name> runs git clean -f —
removes untracked files. Untracked directories
and gitignored files survive; run git clean -fdx
in the worktree if you need the deeper sweep.
- Conflict resolution defaults to
--theirs.
Override by editing the conflicted files manually
before repo resolve.
- Sync depends on
account online <peer> — if
the peer is unreachable, the verb warn-and-skips
silently. Verify with account status first.
repo data-home is the security boundary. Any
account with SSH access there can push to your
bares. Treat it like ~/.ssh.
5. Where to read more
man repo
man account's remote-url (FEAT-044)
- This package's
CLAUDE.md