Methods to store config password in memory?

I have been thinking that I really need to start keeping my config encrypted but I also don't want to be entering my password all of the time. I currently use RCLONE_CONFIG_PASS and the suggested method to enter it in non-plaint-text. But that (a) is still in the environment variables and (b) works session to session.

What I want is something more like how ssh-agent works. You enter your password to a daemon process and that stays in memory until a restart (or the process is killed).

It is pretty clear that it would make use of RCLONE_PASSWORD_COMMAND.

I am absolutely not above writing my own. I may do it anyway. But I was wondering if there were any existing ideas out there?

If I made my own, it would probably be a python too that deamonized itself after prompting and would listen on either a socket or something like that. Then I could have something like

export RCLONE_PASSWORD_COMMAND="curl http://localhost:XYZ"

and return.

But again, I am wondering if this is a solved problem.

Depending on which OS you are on - yes!

Provided your password agent has a command line interface you can join it to rclone. Here is some prior art from forum searches!

i also script rclone on windows with python.
i keep the rclone password crypted with my own function.
and pass it other apps via the windows registry.

I should have been more clear. I am talking about both macOS and Linux. I saw that Keychain one and it was interesting but alas, I do not want to rely on a macOS tool.

@asdffdsa, I saw your detailed reply to someone else (I forget which thread). Interesting but not what I am (at the moment) considering.

You could use this

Which works on Linux and macOS I think.

It relies on setting up gpg-agent to store your GPG password.