# HSTR

> Shell history TUI suggest box for bash and zsh that searches, navigates, and manages command history, with bookmarking of favorite commands.

Stars: 4.5k · Language: C · License: Apache-2.0 · Categories: Shell

- Repository: https://github.com/dvorka/hstr
- Website: https://projects.mindforger.com/
- Page: https://www.trmn.sh/tools/hstr

## Overview

HSTR (HiSToRy) is a command line utility that provides command completion from shell history for bash and zsh. It presents history in a TUI suggest box and is intended as a replacement for the Ctrl-r reverse search, for finding and reusing earlier commands, particularly long ones.

Beyond search and navigation, HSTR can manage the history itself. You can delete commands that are obsolete or that contain sensitive information, and you can bookmark favorite commands so they are easy to find again. The project's tips documentation covers hiding commands from history, using command tags for fast lookup, and curating favorites.

Setup is done by appending generated configuration to your shell rc file: `hstr --show-bash-configuration >> ~/.bashrc` for bash or `hstr --show-zsh-configuration >> ~/.zshrc` for zsh. The README links installation instructions for many platforms, including Ubuntu, Debian, Fedora, RHEL/CentOS, openSUSE, Gentoo, Alpine, Arch, FreeBSD, macOS, nix, and Guix, as well as build-from-source guides for Linux, WSL, Cygwin, and macOS. It targets anyone working in a bash or zsh terminal who relies on command history. Documentation is available through `man hstr`.

## Alternatives

- [tmuxp](https://www.trmn.sh/tools/tmuxp.md): Session manager for tmux that loads and freezes sessions from YAML or JSON workspace files, built on libtmux. (Python, 4.6k stars)
- [X-CMD](https://www.trmn.sh/tools/x-cmd.md): Shell toolkit with command modules, on-demand CLI packages, completions, themes, and AI service integrations. (Awk, 4.8k stars)
- [pet](https://www.trmn.sh/tools/pet.md): Command-line snippet manager written in Go. Save, tag, search, and run shell command snippets with parameters, stored in TOML and synced via Gist or GitLab. (Go, 5.4k stars)
- [vivid](https://www.trmn.sh/tools/vivid.md): Generates LS_COLORS values from YAML filetype databases and color themes, for ls, tree, fd, bfs, dust and other tools. (Rust, 2.3k stars)
- [Carapace](https://www.trmn.sh/tools/carapace-bin.md): A single binary providing argument completion for many CLI commands across Bash, Zsh, Fish, Nushell, Elvish, PowerShell, Xonsh and other shells. (Go, 2.0k stars)

---

Canonical: https://www.trmn.sh/tools/hstr
