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

Bash and zsh history suggest box. Version 3.2 via Homebrew; verified 2026-07-28. Also installable with debian: sudo apt install hstr.

## 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **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>
- **Last updated:** 2026-07-28T13:41:32+09:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- hh (alias)
- hstr (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 3.2
## 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
## 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-8.fc45: normalized package name match | Fedora Rawhide package metadata: hstr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## Combined YAML source

View the package source record on GitHub. [combined/hstr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/hstr.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
