# Install hidapi with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Library for communicating with USB and Bluetooth HID devices. Version 0.15.0 via Homebrew; verified 2026-06-15.

## Install

```sh
sudo av install brew:hidapi
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install hidapi
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install hidapi
```

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

### Linux

- apk (92%):

```sh
sudo apk add hidapi
```

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

- Debian apt (92%):

```sh
sudo apt install libhidapi-dev
```

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

- dnf (92%):

```sh
sudo dnf install hidapi
```

  Evidence: Fedora Rawhide package metadata: hidapi 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#hidapi
```

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

- pacman (92%):

```sh
sudo pacman -S hidapi
```

  Evidence: Arch Linux sync databases: hidapi from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libhidapi-devel
```

  Evidence: openSUSE Tumbleweed package metadata: libhidapi-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:hidapi
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/hidapi>
- **Version:** 0.15.0
- **Source summary:** Library for communicating with USB and Bluetooth HID devices
- **Homepage:** <https://libusb.info/hidapi/>
- **Repository:** <https://github.com/libusb/hidapi>
- **Upstream docs:** <https://github.com/libusb/hidapi#readme>
- **License:** GPL-3.0-only OR BSD-3-Clause OR HIDAPI
- **Source archive:** <https://github.com/libusb/hidapi/archive/refs/tags/hidapi-0.15.0.tar.gz>
- **Last updated:** 2026-06-15T10:20:18-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- hidtest_hidraw (cli)
- hidtest_libusb (cli)
- hidtest_hidraw (alias)
- hidtest_libusb (alias)

## Build dependencies

- cmake
- pkgconf

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.15.0
- Package-manager updated: 2026-06-15
- Local data: ok
- Upstream repository: https://github.com/libusb/hidapi
- Upstream latest detected: hidapi-0.15.0 (current)
## Project history and usage

HIDAPI is a small C library for talking to USB and Bluetooth HID-class devices across Windows, Linux, FreeBSD, and macOS. Its package-manager identity is both a development library and a pair of small test binaries used to verify HID access.

The project is valued because it hides the platform split between Windows `hid.dll`, macOS IOHidManager, Linux hidraw, and libusb-backed Unix builds behind one C API.

### Project history

HIDAPI was originally developed by Alan Ott of Signal 11 Software; the original license file carries a 2009 copyright notice. The tag history shows public 0.x releases beginning in 2010, with early work around test programs and platform makefiles.

The README records a major stewardship change on June 4, 2019, when the project moved to `libusb/hidapi` to merge important bug fixes and continue development. Release tags after that move include 0.9.0 in June 2019 and later work on CMake, Meson wrapping, API additions, and backend fixes.

The library kept its simple integration model across the move: applications can link a shared library or embed one platform-specific source file plus the public header. That made HIDAPI practical for hardware tools that need a low-friction C dependency.

### Adoption history

HIDAPI is widely packaged because it solves a cross-platform hardware problem at the C ABI level. The input package map lists packages for Alpine, Homebrew, Debian/Ubuntu, Fedora, MacPorts, Nix, Arch, and openSUSE-style systems.

The libusb-hosted repository also matters socially: libusb is a familiar home for USB users, and the README says the Linux/libusb backend uses libusb-1.0 while Linux/hidraw supports both USB and Bluetooth HID devices.

### How it is used

Typical application usage is to initialize the library, open a device by vendor ID and product ID, exchange input/output/feature reports, and close/finalize the handle. The README includes a compact C example and points developers to `hidtest/test.c` as a starting point.

On Linux, users choose between `libhidapi-hidraw` and `libhidapi-libusb` at link time, with udev rules needed for unprivileged device access. On macOS and Windows, HIDAPI uses the native HID frameworks exposed by the operating system.

### Why package nerds care

HIDAPI is a classic package-manager library: small, C ABI-friendly, cross-platform, and pulled into many higher-level device tools. It earns its slot in package sets because every downstream would rather not reinvent HID enumeration and report I/O per OS.

Its licensing is also package-relevant. The README and license files describe GPL-3.0, BSD-style, and original HIDAPI license options, letting open-source and closed-source consumers pick an appropriate licensing path.

### Timeline

- 2009: Original HIDAPI license text credits Alan Ott and Signal 11 Software.
- 2010: hidapi-0.1.0 tag starts the public release line.
- 2019: Project moves to libusb/hidapi for continued maintenance.
- 2019: hidapi-0.9.0 is released after the libusb stewardship move.
- 2023: hidapi-0.13.0 adds device-info API work and Meson wrapper support.
- 2025: hidapi-0.15.0 adds more report/error API surface.

### Related projects

- libusb is both a related project and one of HIDAPI's Unix backends.
- hidraw is the Linux kernel interface used by HIDAPI's Linux/hidraw backend.
- hidapitester is a console test application recommended by the README for trying HID devices before integrating HIDAPI into an application.

### Sources

- Build documentation: https://github.com/libusb/hidapi/blob/master/BUILD.md
- License files: https://github.com/libusb/hidapi/blob/master/LICENSE.txt
- Public API header: https://github.com/libusb/hidapi/blob/master/hidapi/hidapi.h
- README: https://github.com/libusb/hidapi#readme
- Repository tags: https://github.com/libusb/hidapi/tags


## Security Notes

library-like package without higher-risk signals.

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

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hidapi
- **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

## Other Package-Manager Records

- Debian apt - libhidapi-dev - 0.14.0-1+b2: normalized package name match | Debian stable package indexes: libhidapi-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multi-Platform library for communication with HID devices (development files) | https://github.com/libusb/hidapi
- Debian apt - libhidapi-hidraw0 - 0.14.0-1+b2: normalized package name match | Debian stable package indexes: libhidapi-hidraw0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multi-Platform library for communication with HID devices (hidraw backend) | https://github.com/libusb/hidapi
- Debian apt - libhidapi-libusb0 - 0.14.0-1+b2: normalized package name match | Debian stable package indexes: libhidapi-libusb0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multi-Platform library for communication with HID devices (libusb backend) | https://github.com/libusb/hidapi
- Nix - hidapi: normalized package name match | nixpkgs package indexes: pkgs/by-name/hi/hidapi/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libhidapi-dev - 0.14.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libhidapi-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Multi-Platform library for communication with HID devices (development files) | https://github.com/libusb/hidapi
- Ubuntu apt - libhidapi-hidraw0 - 0.14.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libhidapi-hidraw0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Multi-Platform library for communication with HID devices (hidraw backend) | https://github.com/libusb/hidapi
- Ubuntu apt - libhidapi-libusb0 - 0.14.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libhidapi-libusb0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Multi-Platform library for communication with HID devices (libusb backend) | https://github.com/libusb/hidapi
- apk - hidapi - 0.15.0-r0: normalized package name match | Alpine Linux edge package indexes: hidapi from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Simple library for communicating with USB and Bluetooth HID devices | https://github.com/libusb/hidapi
- apk - hidapi-dev - 0.15.0-r0: normalized package name match | Alpine Linux edge package indexes: hidapi-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Simple library for communicating with USB and Bluetooth HID devices (development files) | https://github.com/libusb/hidapi
- dnf - hidapi - 0.15.0-3.fc44: normalized package name match | Fedora Rawhide package metadata: hidapi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library for communicating with USB and Bluetooth HID devices | https://github.com/libusb/hidapi
- dnf - hidapi-devel - 0.15.0-3.fc44: normalized package name match | Fedora Rawhide package metadata: hidapi-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for hidapi | https://github.com/libusb/hidapi
- dnf - mingw32-hidapi - 0.15.0-3.fc44: normalized package name match | Fedora Rawhide package metadata: mingw32-hidapi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for hidapi | https://github.com/libusb/hidapi
- dnf - mingw64-hidapi - 0.15.0-3.fc44: normalized package name match | Fedora Rawhide package metadata: mingw64-hidapi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for hidapi | https://github.com/libusb/hidapi
- pacman - hidapi - 0.15.0-1: normalized package name match | Arch Linux sync databases: hidapi from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Simple library for communicating with USB and Bluetooth HID devices | https://github.com/libusb/hidapi
- zypper - libhidapi-devel - 0.14.0-1.7: normalized package name match | openSUSE Tumbleweed package metadata: libhidapi-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development libraries and header files for hidapi | https://github.com/libusb/hidapi
- zypper - libhidapi-hidraw0 - 0.14.0-1.7: normalized package name match | openSUSE Tumbleweed package metadata: libhidapi-hidraw0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Simple library for communicating with USB and Bluetooth HID devices | https://github.com/libusb/hidapi


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [avrdude](https://www.automicvault.com/pkg/brew/avrdude/) - Popular package that depends on this formula.
- [direwolf](https://www.automicvault.com/pkg/brew/direwolf/) - Popular package that depends on this formula.
- [keepkey-agent](https://www.automicvault.com/pkg/brew/keepkey-agent/) - Popular package that depends on this formula.
- [liquidctl](https://www.automicvault.com/pkg/brew/liquidctl/) - Popular package that depends on this formula.
- [monero](https://www.automicvault.com/pkg/brew/monero/) - Popular package that depends on this formula.
- [mspdebug](https://www.automicvault.com/pkg/brew/mspdebug/) - Popular package that depends on this formula.
- [onlykey-agent](https://www.automicvault.com/pkg/brew/onlykey-agent/) - Popular package that depends on this formula.
- [flickcurl](https://www.automicvault.com/pkg/brew/flickcurl/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [gwenhywfar](https://www.automicvault.com/pkg/brew/gwenhywfar/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [json-glib](https://www.automicvault.com/pkg/brew/json-glib/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [libcmph](https://www.automicvault.com/pkg/brew/libcmph/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [libdatrie](https://www.automicvault.com/pkg/brew/libdatrie/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [libdeflate](https://www.automicvault.com/pkg/brew/libdeflate/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [nspr](https://www.automicvault.com/pkg/brew/nspr/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
