Moving Atuin to a daemon

This works pretty well for me so far!

PR:

I’ll merge soon it as it seems usable, but it will still need a bunch more testing as I’m sure there are cases where it doesn’t work so well

If anyone fancies trying it, add

[daemon]
enabled = true
socket_path = "/some/path/to/where/you/want/the/unix/socket"

and run atuin daemon somewhere

It will

  1. Bind the unix socket, and start a grpc service
  2. Maintain a map of “in progress” commands in memory, rather than in sqlite
  3. Stop writing to the database while you’re using the terminal
  4. Run a regularly scheduled background sync, by default every 5m but configurable with daemon.sync_frequency, in seconds