atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.86k stars 562 forks source link

Sync server initial setup #301

Open conradludgate opened 2 years ago

conradludgate commented 2 years ago

If I understand correctly, if you intend to host your own sync server for just your single user you have to

  1. Deploy the sync server with registrations enabled
  2. Register to the server
  3. Redeploy the sync server with registrations disabled

It would be nice if it could work with just the 1 deployment.

I'm not 100% of what the exact flow would look, but I suspect that the deployment would need to log some token on first launch which the user could use the register for the first time

ellie commented 2 years ago

Ahh yeah very true, it is kinda annoying.

I think a "single user mode" would make sense, which could probably just auto generate a user at startup + provide a nice UX wrapper on the client 🤔

something like

atuin login --single THE_TOKEN

where the token is actually just the password we've generated, and --single just autofills the username as singleuser or something

Could coincide with a single_user_mode = true option on the server side, which does the normal server start except also automatically registers the user for you, with a rando generated password, which it then prints. That way nothing else in the backend would need changing + the flow for the end user would be nice as they wouldn't even need to register