ddworken / hishtory

Your shell history: synced, queryable, and in context

Home Page:https://hishtory.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`hishtory uninstall` should have an option to delete from remote server

lamchau opened this issue · comments

When does hishtory delete commands that were uploaded to https://api.hishtory.dev/?

Context: Running hishtory uninstall only seems to remove the local installation. If you still have a $SECRET and hishtory init $SECRET on another machine - the history still persists. This is probably by design but is there a way to force delete or is there an expiration window I'm missing?

Steps to repro

  1. docker run --interactive --tty --name "hishtory-new" --rm ubuntu-hishtory
  2. [...] Go through installation/configuration flow, save $SECRET, execute commands to sync
  3. hishtory uninstall and exit container
  4. docker run --interactive --tty --name "hishtory-init" --rm ubuntu-hishtory
  5. hishtory init $SECRET
  6. hishtory query <query>
  7. Previous history from container "hishtory-new" and commands in step 2 are still visible

Expected: $SECRET is invalid and a new initialization starts

Thanks for the issue, this is a great point! The encrypted entries on the backend will in theory eventually be garbage collected, but we don't have custom handling for uninstalls--which we definitely should! I agree that it makes sense to delete entries when the user uninstalls, I'll add this as a feature very soon.

Thank you again for the feedback! This has now been fixed with the latest version.

Thank you for the quick feedback/response! Awesome project :)