Skip to content

Installation

HID Declarative is modular. You can install only what you need to keep your environment lightweight.

1. Core Library (Runtime & Compiler)

For embedded scripts, py-usb-gadget integration, or purely generating binary files. Zero dependencies.

pip install hid-declarativeSuccessfully installed hid-declarative-1.2.3

If you want to use the hid-declarative command line tool (inspect, compile, decode). Adds dependencies on typer and rich.

pip install "hid-declarative[cli]"

3. Full Hardware Support (Linux/Mac/Windows)

If you want to Monitor live devices or Dump descriptors from hardware. Adds dependency on hidapi (C bindings).

pip install "hid-declarative[cli,hidapi]"

4. For Contributors

If you want to run tests and build documentation locally:

# Using uv (Recommended)
uv sync --all-extras --dev

# Using pip
pip install -e ".[cli,hidapi,test,docs]"