hiSHtory Sync Service
hiSHtory is an open-source shell history sync tool that securely shares command history across multiple terminals. With end-to-end encryption, the server cannot decrypt command contents, ensuring user privacy and making terminal history management efficient.
## Self-hosted hiSHtory Server **Official Site:** https://hishtory.dev **Repository:** https://github.com/lazycatapps/hishtory.git hiSHtory is an open-source shell history sync tool. This project ports it to Lazycat Cloud platform, helping you securely share command history across multiple terminals. It uses end-to-end encryption, ensuring the server cannot decrypt command contents. ## Server Deployment Install this app in Lazycat Cloud and start the service. ## Client Installation Install the hiSHtory client on each machine that needs sync. Choose one of the following methods: 1. **Official Install Script (Recommended)** ```bash curl https://hishtory.dev/install.py | python3 - ``` 2. **Manual Binary Download** Visit https://github.com/ddworken/hishtory/releases to download the archive for your OS, extract it, place the executable in `~/bin` or `/usr/local/bin`, then run `hishtory install` During installation, a secret key will be generated. Save it securely. Other devices use `hishtory init <secret-key>` to join the sync group. ## Configure Server Address Add the environment variable to your shell config file (e.g., `~/.zshrc` or `~/.bashrc`): ```bash export HISHTORY_SERVER=https://hishtory.${LAZYCAT_BOX_NAME}.heiyu.space ``` Refresh your terminal and use `echo $HISHTORY_SERVER` to confirm it's set. ## Common Commands - **Initialize with key:** `hishtory init <secret-key>` - **Check status:** `hishtory status` - **Sync immediately:** `hishtory reupload` - **Query history:** `hishtory query --tail 20` - **View by host:** `hishtory query --host <hostname>` - **Disable sync:** `hishtory syncing disable` - **Reinstall hooks:** `hishtory install` - **Start Web UI:** `hishtory start-web-ui` ## Verify Sync 1. On machine A, run `echo hello-from-A` 2. Execute `hishtory reupload` to force upload 3. On machine B, run `hishtory query 'hello-from-A'`. If you see the command, sync is successful. ## Security & Privacy - Uses end-to-end encryption; server cannot decrypt command contents - Add space before command to skip recording - Use `hishtory syncing disable` to temporarily pause recording ## Troubleshooting - **History stalled:** Confirm `source ~/.hishtory/config.*` in shell config, re-run `hishtory install` - **Lost secret key:** Run `hishtory status` on any configured device - **Server unreachable:** Check network connectivity or verify service status - **Debug logs:** `tail -f ~/.hishtory/hishtory.log`


