# 使用 Homebrew, Nix 安装 hishtory

查看 hishtory 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:hishtory
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hishtory
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#hishtory
```

  证据: nixpkgs package indexes: pkgs/by-name/hi/hishtory/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:hishtory
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/hishtory>
- **版本:** 0.335
- **来源摘要:** Your shell history: synced, queryable, and in context
- **主页:** <https://hishtory.dev>
- **仓库:** <https://github.com/ddworken/hishtory>
- **上游文档:** <https://github.com/ddworken/hishtory#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/ddworken/hishtory/archive/refs/tags/v0.335.tar.gz>
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- hishtory (cli)
- hishtory (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 0.335
- 本地数据: OK
- 上游仓库: https://github.com/ddworken/hishtory
- 检测到的最新版本: v0.335 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

hiSHtory is a Go-based shell-history manager that records commands with context, stores them locally, and can sync encrypted history across machines. In package-manager culture it sits in the modern shell-history wave: richer than `.bash_history`, friendlier to search than plain text, and designed around Control-R terminal recall.

### 项目历史

The repository begins on 2022-01-08 with commits for versioning, local and remote client separation, integration tests, installation, command timing, export, and web/backend pieces. The first public tags appeared in April 2022, with v0.1 and several subsequent tags on 2022-04-08.

The README presents the project as better shell history: command, working directory, exit status, runtime, host, user, and time are queryable through the CLI and terminal UI. It also documents a local SQLite database path for power users and encrypted synchronization for multi-machine setups.

Later docs added stronger offline options. The offline binary documentation describes install-time sync disabling, config-time sync disabling, and a build tag that statically links network-disabled code for users who want the binary to avoid HTTP requests.

### 采用历史

hiSHtory's adoption path is tied to shell integration rather than a language ecosystem. The install flow wires it into bash, zsh, and fish, then maps Control-R to the search UI so users can replace a built-in shell habit without learning a separate command first.

The Homebrew and Nix packages make it available to users who prefer package managers over the curl installer. The README also documents multi-computer setup with a secret key, self-hosted sync servers, SQLite or Postgres backend persistence, and S3-compatible storage.

### 使用方式

Users query history by opening the TUI with Control-R or by running `hishtory query`. The query language supports text terms plus filters such as hostname, user, exit code, and before/after dates. The README also documents redaction, duplicate filtering, displayed-column customization, custom columns, color schemes, default filters, and direct SQLite access.

For sync, hiSHtory stores data locally and sends encrypted history to a backend. Users can run without sync, self-host the backend, or use an S3-compatible backend. That range matters for shell-history tools because command history can contain sensitive operational context.

### 为什么软件包爱好者会关心

hiSHtory is significant because it packages shell memory as a database-backed, queryable, syncable tool while still preserving the muscle memory of Control-R. It is part of the same packaging niche as Atuin and older SQLite-backed shell-history experiments.

The package is also interesting for its privacy trade-offs. It offers a central sync service for convenience, but its docs also describe offline installs, self-hosting, and a compile-time network-disabled binary. That makes it unusually explicit about deployment modes for a developer productivity CLI.

### 时间线

- 2022-01-08: Repository history begins with versioning and client split commits.
- 2022-03-29: Website, install, update, status, Postgres setup, and backend work appear in repository history.
- 2022-04-08: First public v0.x tags appear.
- 2022: README documents contextual shell history, encrypted sync, bash/zsh/fish install, and Control-R search.
- 2025: Repository tags continue through a large v0.x sequence.

### Related projects

- Atuin is the closest well-known related package, also replacing shell history with contextual records and optional encrypted sync.
- zsh-histdb and other SQLite shell-history scripts are adjacent earlier approaches.
- SQLite and Postgres appear in hiSHtory's official materials as local and backend persistence options.

### 来源

- Official Git repository tags and commits for timeline dates.
- Official README for core behavior, query syntax, sync, TUI, self-hosting, and configuration.
- Official offline binary documentation for non-networked deployment modes.


## 安全说明

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal


## 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: ~/.hishtory/config.json
## 源数据库详情

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

## 其他软件包管理器记录

- Nix - hishtory: normalized package name match | nixpkgs package indexes: pkgs/by-name/hi/hishtory/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Build dependency declared by Homebrew.
- [historian](https://www.automicvault.com/zh-hans/pkg/brew/historian/) - Shares av.db curated category or tags: cli, developer-tools, history, shell, shell-history.
- [shml](https://www.automicvault.com/zh-hans/pkg/brew/shml/) - Shares av.db curated category or tags: cli, developer-tools, shell, terminal.
- [zplug](https://www.automicvault.com/zh-hans/pkg/brew/zplug/) - Shares av.db curated category or tags: cli, developer-tools, shell, terminal.
- [aliae](https://www.automicvault.com/zh-hans/pkg/brew/aliae/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [bar](https://www.automicvault.com/zh-hans/pkg/brew/bar/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [bashate](https://www.automicvault.com/zh-hans/pkg/brew/bashate/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [checkbashisms](https://www.automicvault.com/zh-hans/pkg/brew/checkbashisms/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [desk](https://www.automicvault.com/zh-hans/pkg/brew/desk/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [mcfly](https://www.automicvault.com/zh-hans/pkg/brew/mcfly/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, history, shell.

## Combined YAML source

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


## 来源

- 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
