Open shoffmeister opened 1 year ago
- backup transparently the history - e.g. atuin history list --json, sitting next to the --format option
- merge / append existing history, e.g. atuin history append --json < my-history.json
You might know we already have a sync service. This uses JSON already, but the payloads are encrypted.
In theory we could have a cli version too. But it needs a proper design. We have some ideas on the roadmap. I'll see if we can fit this in with our new ideas too.
Thanks for the suggestion
It could be a useful addition to atuin to offer history export, reimport/merge in a machine-readable, open, stable format.
I did find the SQLite database in ~/.local/share/atuin, but that's "locked away" in a sense, IMHO, requiring SQLite tooling.
Using JSON as data exchange format, it would be possible to
atuin history list --json
, sitting next to the--format
optionatuin history replace --json < my-history.json
atuin history append --json < my-history.json
atuin history list --json | jq ' <fancy-filtering-here> ' | atuin history append --json
This would be particularly useful in scenarios where there is no Atuin server around, only sneakernet.
Disclaimer: I only just installed
atuin
, with one major attraction being the global shell history across bash sessions (something thatfzf
does not / cannot offer).