Better support for remote recipes - DRAFT PR #870

Open
ineiti wants to merge 5 commits from ineiti/abra:type_remote into main
Contributor

This PR allows to directly add remote recipes with abra:

abra app new <git-url>

The following syntaxes are supported:

  • git@domain/path
  • https://domain/path
  • domain/path

It adds a line

RECIPE=<git-url>

to the .env file of the app, and also uses that line to fetch the remote repo, so you can use the same configuration on multiple computers. Our use-case is to have a configuration for our servers, put that configuration in git, and use it on several developers machines.

This is a first draft PR - "it works on my machine". But if somebody else can test it and tell me if it's useful to them, and it works, I would be very happy!

This PR allows to directly add remote recipes with abra: ``` abra app new <git-url> ``` The following syntaxes are supported: - `git@domain/path` - `https://domain/path` - `domain/path` It adds a line ``` RECIPE=<git-url> ``` to the `.env` file of the app, and also uses that line to fetch the remote repo, so you can use the same configuration on multiple computers. Our use-case is to have a configuration for our servers, put that configuration in git, and use it on several developers machines. This is a first draft PR - "it works on my machine". But if somebody else can test it and tell me if it's useful to them, and it works, I would be very happy!
ineiti added 5 commits 2026-06-16 19:46:48 +00:00
ShortenID and SmallSHA sliced their input to a fixed length without
checking it was long enough, panicking on shorter strings. Return the
input unchanged when it is already shorter than the cut. Also replace the
blank Commit placeholder with an explicit "unknown-commit" sentinel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Passing a branch as the ":version" suffix previously failed with an
opaque "unable to resolve" error from go-git. Detect when the requested
revision matches a branch on a configured remote and fail with a message
explaining that ":<version>" only supports tags or commit hashes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add NormalizeRecipeName to canonicalize the various ways a recipe can be
referenced - https/http/ssh URLs, SCP-style git@host:path, already-
canonical host/path, and short catalogue names - to a single stable
"host/path" form, preserving any ":version" suffix. Wire it into
recipe.Get and ValidateRecipe so every entry point accepts git URLs, and
add Recipe.ShortName to recover the bare recipe name from a prefixed one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Allow `abra app new <git-url>` to use a recipe from outside the
catalogue. On clone, a `.abra-source` sidecar records the canonical
host/path name (the on-disk directory escapes "/" and "." lossily), and
IsClean ignores it. When templating the app's .env, a `RECIPE=<canonical
name>` line is injected so a later `abra app deploy`, possibly on another
machine, re-fetches the recipe from the same git source. `recipe ls` now
shows a source column listing these external recipes alongside catalogue
ones.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
merge upstream
Some checks failed
continuous-integration/drone/pr Build is failing
4578169f0a
Owner

Ah, given toolshed/organising#678 (comment) @ineiti, can you confirm if the changes you're submitting are llm generated? Was that also the case for #855 and #869?

Ah, given https://git.coopcloud.tech/toolshed/organising/issues/678#issuecomment-35636 @ineiti, can you confirm if the changes you're submitting are llm generated? Was that also the case for https://git.coopcloud.tech/toolshed/abra/pulls/855 and https://git.coopcloud.tech/toolshed/abra/pulls/869?
Author
Contributor

Yes, with the following caveats:

  • I did review all the changes manually and made sure I understand what's happening
  • I am happy with the PRs #855 and #869 and tested them on my deployment, too
  • for this PR I'm not sure it's the best approach, this is why I added DRAFT to the title, and am asking other people to chime in
Yes, with the following caveats: - I did review all the changes manually and made sure I understand what's happening - I am happy with the PRs #855 and #869 and tested them on my deployment, too - for this PR I'm not sure it's the best approach, this is why I added DRAFT to the title, and am asking other people to chime in
Owner

OK, thanks for letting me know. I will wait to see what becomes of toolshed/organising#678 before taking an action here.

OK, thanks for letting me know. I will wait to see what becomes of https://git.coopcloud.tech/toolshed/organising/issues/678 before taking an action here.
Some checks failed
continuous-integration/drone/pr Build is failing
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u type_remote:ineiti-type_remote
git checkout ineiti-type_remote
Sign in to join this conversation.
No description provided.