Skip to content

feat: remote recipe sources ([[recipe_sources]]) - #26

Merged
mad01 merged 6 commits into
mainfrom
alexander/mad-185-ralph-remote-recipe-sources-recipe_sources
Jul 5, 2026
Merged

feat: remote recipe sources ([[recipe_sources]])#26
mad01 merged 6 commits into
mainfrom
alexander/mad-185-ralph-remote-recipe-sources-recipe_sources

Conversation

@mad01

@mad01 mad01 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Recipes can now live in remote git repositories, pinned to a branch, tag, or commit:

[[recipe_sources]]
name = "thismoon"
url  = "git@github.com:mad01/thismoon.git"
ref  = "main"
update = true

Sources are cached under ~/.config/ralph/sources/<name>, cloned on first config load and re-pinned when ref changes. Recipes merge with the identity <source>/<recipe>; overrides, host gates, profiles, and waves apply unchanged. update = true branch sources are pulled during the ralph up sync phase, with a config reload when a source advances. Git clone/fetch/checkout/pull primitives moved from internal/repo to internal/gitutil so internal/config can reuse them without an import cycle.

MAD-185

mad01 added 6 commits July 5, 2026 17:41
internal/repo delegates to gitutil so internal/config can reuse the same
git operations for recipe sources without an import cycle.

Refs: MAD-185
Enabled [[recipe_sources]] entries are cloned/pinned under
~/.config/ralph/sources/<name> at load time, their recipes discovered and
merged with identity <source>/<recipe>. Source recipe paths resolve
absolute against the checkout; JoinSourcePath passes them through at
every dotfiles-repo join site. Enable/hosts overrides use the
namespaced key (overrides."<source>/<recipe>").

Refs: MAD-185
Pinned (detached HEAD) sources are skipped; the config-reload trigger
now fingerprints recipe source checkouts alongside the dotfiles repo.

Refs: MAD-185
- ralph doctor resolves absolute source paths via JoinSourcePath
  (three missed join sites in doctor_validate.go)
- config.local.toml overlay no longer drops [[recipe_sources]]
- ralph enable/disable accept namespaced <source>/<recipe> names
- EnsureSourceCheckout re-pins to remote-only branches via checkout
  DWIM instead of hard-failing on local ref resolution

Refs: MAD-185
@mad01
mad01 merged commit 55b3417 into main Jul 5, 2026
1 check passed
mad01 added a commit that referenced this pull request Jul 7, 2026
…pe-sources-recipe_sources

feat: remote recipe sources ([[recipe_sources]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant