Most repositories carry a xyz.radicle.project payload which has a name key.
{
"payload": {
"xyz.radicle.project": {
"defaultBranch": "master",
"description": "Radicle Heartwood Protocol & Stack",
"name": "heartwood"
}
}
}
These names are also printed by rad seed (only for seeded repositories obviously…).
I would like to propose that for user input that take a RID, e.g. CLI arguments such as rad inspect --identity <RID> or rad cob log --repo <RID> we allow passing names in addition to RIDs.
These names would then be matched against the set of names of seeded repositories, and if the match is unique, the RID of the seeded repository would be used.
The benefit is that many projects have names that are much shorter and much easier to memorize compared to RIDs.
There is precedent in https://app.radicle.xyz/nodes/radicle.liw.fi/rad:zwTxygwuz5LDGBq255RA2CbNGrz8/tree/src/bin/cibtoolcmd/event.rs#L119
rad lsalso show repository names.In either of those routes, we have to iterate and resolve the project and its name, and we could have to go over all of them to collect the list. I wonder if it might be better to keep something like an address book for repositories?
Maybe that’s a pre-optimisation. So I’d propose that we introduce a trait that has a method for returning a
BTreeSet<RepoId>given an infix string – similar to theAliasStore. This can be implented usingStorageinitially.Just want to make a note that there was a patch to add this to
unseed– I think we should archive it in favour of doing this as a more general solution.This is the patch:
rad patch show 76d850d32a4473d4b6c7d0fc869505c75487046d+1, I’ve copied or typed in the repo name using
radcli regularly just to see an error message.