macOS
brew install hidapilocal Homebrew formula metadata
sudo port install hidapiMacPorts ports tree · comms/hidapi/Portfile · 来源: api.github.com
安装
brew install hidapilocal Homebrew formula metadata
sudo port install hidapiMacPorts ports tree · comms/hidapi/Portfile · 来源: api.github.com
sudo apk add hidapiAlpine Linux edge package indexes · hidapi · 来源: dl-cdn.alpinelinux.org
sudo dnf install hidapiFedora Rawhide package metadata · hidapi · 来源: dl.fedoraproject.org
nix profile install nixpkgs#hidapinixpkgs package indexes · pkgs/by-name/hi/hidapi/package.nix · 来源: api.github.com
sudo pacman -S hidapiArch Linux sync databases · hidapi · 来源: geo.mirror.pkgbuild.com
sudo apt install libhidapi-devDebian stable package indexes · libhidapi-dev · 来源: deb.debian.org
sudo zypper install libhidapi-developenSUSE Tumbleweed package metadata · libhidapi-devel · 来源: download.opensuse.org
概览
Library for communicating with USB and Bluetooth HID devices
历史
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.
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.
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.
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.
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.
安全态势
library-like package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
hidtest_hidraw | cli | 全局可执行文件 | |
hidtest_libusb | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/libusb/hidapi
安装元数据
| 软件包键 | brew:hidapi |
|---|---|
| 版本 | 0.15.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/hidapi |
| 主页 | https://libusb.info/hidapi/ |
| 仓库 | https://github.com/libusb/hidapi |
| 上游文档 | https://github.com/libusb/hidapi#readme |
| 许可证 | GPL-3.0-only OR BSD-3-Clause OR HIDAPI |
| 源码归档 | https://github.com/libusb/hidapi/archive/refs/tags/hidapi-0.15.0.tar.gz |
| 最后更新 | 2026-06-15T10:20:18-04:00 |
| Pulse | updated |
| 构建依赖 | cmake, pkgconf |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
libhidapi-dev 0.14.0-1+b2
Multi-Platform library for communication with HID devices (development files)
https://github.com/libusb/hidapi
sudo apt install libhidapi-devlibhidapi-hidraw0 0.14.0-1+b2
Multi-Platform library for communication with HID devices (hidraw backend)
https://github.com/libusb/hidapi
sudo apt install libhidapi-hidraw0libhidapi-libusb0 0.14.0-1+b2
Multi-Platform library for communication with HID devices (libusb backend)
https://github.com/libusb/hidapi
sudo apt install libhidapi-libusb0hidapi
nix profile install nixpkgs#hidapilibhidapi-dev 0.14.0-1build1
Multi-Platform library for communication with HID devices (development files)
https://github.com/libusb/hidapi
sudo apt install libhidapi-devlibhidapi-hidraw0 0.14.0-1build1
Multi-Platform library for communication with HID devices (hidraw backend)
https://github.com/libusb/hidapi
sudo apt install libhidapi-hidraw0libhidapi-libusb0 0.14.0-1build1
Multi-Platform library for communication with HID devices (libusb backend)
https://github.com/libusb/hidapi
sudo apt install libhidapi-libusb0hidapi 0.15.0-r0
Simple library for communicating with USB and Bluetooth HID devices
https://github.com/libusb/hidapi
sudo apk add hidapihidapi-dev 0.15.0-r0
Simple library for communicating with USB and Bluetooth HID devices (development files)
https://github.com/libusb/hidapi
sudo apk add hidapi-devhidapi 0.15.0-3.fc44
Library for communicating with USB and Bluetooth HID devices
https://github.com/libusb/hidapi
sudo dnf install hidapihidapi-devel 0.15.0-3.fc44
Development files for hidapi
https://github.com/libusb/hidapi
sudo dnf install hidapi-develmingw32-hidapi 0.15.0-3.fc44
Development files for hidapi
https://github.com/libusb/hidapi
sudo dnf install mingw32-hidapimingw64-hidapi 0.15.0-3.fc44
Development files for hidapi
https://github.com/libusb/hidapi
sudo dnf install mingw64-hidapihidapi 0.15.0-1
Simple library for communicating with USB and Bluetooth HID devices
https://github.com/libusb/hidapi
sudo pacman -S hidapilibhidapi-devel 0.14.0-1.7
Development libraries and header files for hidapi
https://github.com/libusb/hidapi
sudo zypper install libhidapi-devellibhidapi-hidraw0 0.14.0-1.7
Simple library for communicating with USB and Bluetooth HID devices
https://github.com/libusb/hidapi
sudo zypper install libhidapi-hidraw0来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.