# Install hstr with Homebrew, apk, apt, dnf, MacPorts, Nix

Bash and zsh history suggest box. Version 3.2 via Homebrew; verified 2026-07-04.

## Install

```sh
sudo av install brew:hstr
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install hstr
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install hstr
```

  Evidence: MacPorts ports tree: shells/hstr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add hstr
```

  Evidence: Alpine Linux edge package indexes: hstr from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install hstr
```

  Evidence: Debian stable package indexes: hstr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install hstr
```

  Evidence: Fedora Rawhide package metadata: hstr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#hstr
```

  Evidence: nixpkgs package indexes: pkgs/by-name/hs/hstr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:hstr
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/hstr>
- **Version:** 3.2
- **Source summary:** Bash and zsh history suggest box
- **Homepage:** <https://github.com/dvorka-oss/hstr>
- **Repository:** <https://github.com/dvorka-oss/hstr>
- **Upstream docs:** <https://github.com/dvorka-oss/hstr>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/dvorka-oss/hstr/archive/refs/tags/v3.2.tar.gz>
- **Last updated:** 2026-07-04T16:53:43+09:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- hh (cli)
- hstr (cli)
- hh (alias)
- hstr (alias)

## Dependencies

- readline

## Build dependencies

- autoconf
- automake
- libtool
- pkgconf

## Uses from macOS

- ncurses

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.2
- Package-manager updated: 2026-07-04
- Local data: ok
- Upstream repository: https://github.com/dvorka-oss/hstr
- Upstream latest detected: v3.2 (current)
## Project history and usage

HSTR is a terminal user-interface for viewing, searching, curating, and reusing bash and zsh command history, with the hh command as a common shortcut.

### Project history

The README expands HSTR as HiSToRy and presents it as a more efficient alternative to Ctrl-r for shell history completion. It combines search, navigation, deletion of sensitive or obsolete commands, and bookmarking of favorite commands.

The project evolved into a broadly packaged shell productivity tool, with documentation for bash and zsh bindings, aliases, environment-driven configuration, blacklist behavior, color and layout settings, and shell-history tuning.

### Adoption history

The README lists installation documentation for many distributions and package systems, including Ubuntu, Debian, Fedora, CentOS, openSUSE, Gentoo, Alpine, Arch, FreeBSD, Slackware, Void, Haiku, macOS, Nix, Guix, and others. The input metadata also records packages in Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, and Ubuntu.

The project page collects coverage from Linux Magazine, UbuntuGeek, DebianAdmin, Tuxdiary, Softpedia, OSTechNix, videos, and community posts, which fits its role as a discoverable shell workflow enhancer.

### How it is used

Users typically add generated bash or zsh configuration to ~/.bashrc or ~/.zshrc, bind HSTR to a key such as Ctrl-r, and optionally define alias hh=hstr.

Configuration is intentionally shell-native: HSTR reads HISTFILE, HSTR_PROMPT, HSTR_IS_SUBSHELL, and HSTR_CONFIG, with options for color, prompt placement, matching mode, duplicate handling, favorites, and blacklists.

### Why package nerds care

HSTR is significant in package-manager culture because it is a shell-history tool that crosses the boundary between a packaged executable and user dotfile integration. A package can install the binary, but value comes when the user wires it into readline or zsh keybindings.

It is also one of the better-known examples in the family of TUI shell-history searchers, alongside tools such as fzf-based history widgets and newer history managers.

### Timeline

- 0.2: Early upstream tag appears in the repository.
- 1.x: The project accumulated a long sequence of tagged releases.
- 2.x: Later tags continued the shell-history TUI series.
- 3.x: The v3.2 tag appears after the 3.0 and 3.1 tags.

### Related projects

- Related projects include bash, zsh, readline, fzf history bindings, shell history managers, and terminal bookmark or snippet workflows.

### Sources

- <https://github.com/dvorka-oss/hstr>
- <https://github.com/dvorka-oss/hstr/blob/master/CONFIGURATION.md>
- <https://github.com/dvorka-oss/hstr/blob/master/TIPS.md>
- <https://github.com/dvorka-oss/hstr/releases>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.bashrc, ~/.zshrc, ~/.hstr_blacklist
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hstr
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - hstr - 3.1+ds-1+b1: normalized package name match | Debian stable package indexes: hstr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Suggest box like shell history completion | https://github.com/dvorka/hstr
- Nix - hstr: normalized package name match | nixpkgs package indexes: pkgs/by-name/hs/hstr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - hstr - 3.1+ds-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: hstr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Suggest box like shell history completion | https://github.com/dvorka/hstr
- apk - hstr - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: hstr from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash and ZSH shell history suggest box | https://github.com/dvorka/hstr
- apk - hstr-bash-completion - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: hstr-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for hstr | https://github.com/dvorka/hstr
- apk - hstr-doc - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: hstr-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash and ZSH shell history suggest box (documentation) | https://github.com/dvorka/hstr
- dnf - hstr - 3.1-7.fc44: normalized package name match | Fedora Rawhide package metadata: hstr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Suggest box like shell history completion | https://github.com/dvorka/hstr
- MacPorts - hstr: normalized package name match | MacPorts ports tree: shells/hstr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [bashish](https://www.automicvault.com/pkg/brew/bashish/) - Shares av.db curated category or tags: bash, cli, shell, system.
- [bash](https://www.automicvault.com/pkg/brew/bash/) - Shares av.db curated category or tags: cli, shell, system.
- [brush](https://www.automicvault.com/pkg/brew/brush/) - Shares av.db curated category or tags: cli, shell, system.
- [dash-shell](https://www.automicvault.com/pkg/brew/dash-shell/) - Shares av.db curated category or tags: cli, shell, system.
- [elvish](https://www.automicvault.com/pkg/brew/elvish/) - Shares av.db curated category or tags: cli, shell, system.
- [murex](https://www.automicvault.com/pkg/brew/murex/) - Shares av.db curated category or tags: cli, shell, system.
- [nsh](https://www.automicvault.com/pkg/brew/nsh/) - Shares av.db curated category or tags: cli, shell, system.
- [nushell](https://www.automicvault.com/pkg/brew/nushell/) - Shares av.db curated category or tags: cli, shell, system.
- [clifm](https://www.automicvault.com/pkg/brew/clifm/) - Local package facts share a topical domain. Shared terms: cli, readline, shell, system.
- [oksh](https://www.automicvault.com/pkg/brew/oksh/) - Local package facts share a topical domain. Shared terms: cli, shell, system.

## Combined YAML source

View the package source record on GitHub. [combined/hstr.yml](https://github.com/automic-vault/db/blob/main/combined/hstr.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
