radicle-dev / radicle-cli

Radicle CLI
https://app.radicle.network/alt-clients.radicle.eth/radicle-cli
GNU General Public License v3.0
87 stars 22 forks source link

Unable to import keys automatically with a script other than doing so manually each time i use a new cloud instance #276

Open ltfschoen opened 1 year ago

ltfschoen commented 1 year ago

hi i want to switch to an identity with rad auth but i don't want to have to manually enter my username, passphrase. i'd prefer to create a script to do so, because otherwise i would have to do this mundate "manual" process of setting up rad each time i use a different cloud instance, which is something i do frequently. the fact that i can't do this automatically is the reason i haven't adopted radicle yet.

instead i want to run something like rad auth --file .rad/keys/keyfile.rad ---password password-file --output device-info --seed-node abc.radicle.garden to load an identity from an existing ed25519 keypair that has an associated passphrase encrypted file "keyfile.rad" (or .pem format) that was previously generated when i ran rad auth --init, and i want it to read the associated password from a file called "password-file". i also want it to output the peer id and personal URN that identifies my device and across devices to a file called "device-info" or to terminal output. then my script would detect those outputs in the terminal output or read them from that file and i'd use that info to create a Radicle git project that would automatically sync with the seed node that i provided in the cli params (without having to manually input it)

here it shows how rad auth currently works https://radicle.xyz/get-started.html https://docs.radicle.xyz/using-radicle/identity

i had a quick look at the source code and there is a Radicle authorized keys CLI tool rad-auth-keys, which appears to allow you to add keys in supported formats that you have created to be authorised keys for a Radicle git repository, but i can't see how i can use rad auth to choose from a list of keys which key i want to use from the list of authorised keys that i'd associated with a Radicle git repository using rad-auth-keys?