# Install htslib with Homebrew

C library for high-throughput sequencing data formats. Version 1.24 via Homebrew; verified 2026-07-09.

## Install

```sh
sudo av install brew:htslib
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install htslib
```

  Evidence: provider-native install command

## Package facts

- **Package key:** brew:htslib
- **Package manager:** Homebrew
- **Version:** 1.24
- **Source summary:** C library for high-throughput sequencing data formats
- **Homepage:** <https://www.htslib.org/>
- **Repository:** <https://github.com/samtools/htslib>
- **Last updated:** 2026-07-09T19:51:46Z
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- annot-tsv (alias)
- bgzip (alias)
- htsfile (alias)
- ref-cache (alias)
- tabix (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.24
## Project history and usage

HTSlib is the C library layer of the Samtools family, providing shared reading and writing support for high-throughput sequencing formats such as SAM, BAM, CRAM, VCF, and BCF. It matters beyond a single command-line package because many genomics tools build on the same file-format and indexing behavior.

### Project history

The Samtools site describes the project as three related repositories: Samtools for alignment manipulation, BCFtools for variant data, and HTSlib as the common C library. Its download page preserves the split in historical context, noting that before HTSlib was introduced, Samtools and BCFtools were shipped together in a single samtools-0.1.x source package.

The annotated 1.0 tag in the official GitHub repository, dated 2014-08-15, describes the first HTSlib release as supporting SAM, BAM, CRAM, VCF, and BCF. Later release notes show the library continuing to absorb format, indexing, threading, remote-I/O, and ABI changes that affect downstream tools.

### Adoption history

HTSlib's adoption is tightly coupled to the Samtools ecosystem: the Samtools site says Samtools and BCFtools use HTSlib internally, while HTSlib is also distributed separately for developers writing programs against its API. Packaging across Homebrew, Debian-family distributions, Fedora, MacPorts, Nix, and openSUSE reflects its role as a build-time and runtime dependency rather than only an end-user utility.

### How it is used

Package users often encounter HTSlib through utilities installed with the library, especially bgzip, htsfile, tabix, ref-cache, and annot-tsv. Developers use the C API for compressed genomic files, indexes, region queries, remote access, and format detection in sequencing and variant-analysis workflows.

### Why package nerds care

HTSlib is package-nerd significant because it is both a library ABI and a bundle of small Unix-style genomics tools. Changes such as the 2019 1.10 release's SAM header API, multi-threaded SAM I/O, on-the-fly indexing, S3 updates, and 64-bit reference-position support are the sort of low-level package events that can ripple through many bioinformatics builds.

### Timeline

- 2012: The samtools/htslib repository was created on GitHub.
- 2014: The 1.0 tag marked the first HTSlib release, supporting SAM, BAM, CRAM, VCF, and BCF.
- 2019: Release 1.10 added a SAM header API, multi-threaded SAM reading and writing, on-the-fly indexing, and S3 interface updates.
- 2026: Release notes for 1.23.1 documented CRAM decoder security fixes and related build updates.

### Related projects

- Samtools and BCFtools are the closest sibling projects, both using HTSlib internally. Related file-format work includes the SAM, BAM, CRAM, VCF, BCF, BGZF, and tabix indexing formats that HTSlib reads, writes, or helps index.

### Sources

- Samtools project site, HTSlib download notes, GitHub repository metadata, and official release/tag metadata.


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals


## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
