Make connecting to daemon optional?

Currently the atuin daemon is either disabled or enabled via the config file; it can’t try to connect and fallback if a connection can’t be made.

This causes a problem in a variable environment, e.g. I have a rootfs for a virtual machine in which it is fully booted and the daemon is running, but I also do some lightweight checks and maintenance work with nspawn and the shell as pid 1, thus no daemon is running, and atuin is complaining.

2 Likes

A fall-back trying to open the db directly (as if daemon was disabled) seems like a good idea

My main concern here would be ensuring the user has visibility on the daemon not functioning. With this, they could think they’re using the daemon, but have no idea that it’s not functioning OK

There’s an easy solution to this. atuin can spit out a warning (although I’d make this an option) whenever the daemon is configured but the fallback is used.

Yeah… I’m really trying to avoid having an option for literally everything lol. Let’s confirm this is actually desireable enough first.

The warnings need to be not too many however, maybe once at session start?