#stream #devices #deck #driver #usb-device #elgato #interface

bin+lib streamdeck

Elgato Stream Deck driver and command line interface

19 releases

0.9.0 Apr 19, 2024
0.8.0 Jan 10, 2024
0.7.0 Jul 30, 2022
0.6.2 Mar 27, 2022
0.4.1 Dec 24, 2019

#83 in Hardware support

Download history 15/week @ 2024-02-01 23/week @ 2024-02-08 13/week @ 2024-02-15 35/week @ 2024-02-22 28/week @ 2024-02-29 43/week @ 2024-03-07 54/week @ 2024-03-14 53/week @ 2024-03-21 84/week @ 2024-03-28 47/week @ 2024-04-04 42/week @ 2024-04-11 191/week @ 2024-04-18 22/week @ 2024-04-25 1/week @ 2024-05-02

215 downloads per month
Used in 7 crates (3 directly)

MPL-2.0 license

757 lines

Rust Elgato StreamDeck Driver and Utility

An hidapi based driver for direct interaction with Elgato StreamDeck devices, this is intended to allow applications to use these devices directly and on arbitrary platforms (without the use of the Elgato SDK), heavily based on the python streamdeck library.


GitHub tag Travis Build Status Crates.io Docs.rs

WIP. Pull requests more than welcome!


  • Connecting to devices
    • Connecting by VID/PID/Serial
    • Matching device types (Mini etc.)
  • Reading buttons
    • Poll based mode (w/ blocking / non-blocking selection and timeouts)
    • Multi-threaded / async / callback driven mode
  • Writing brightness
  • Setting buttons
    • Writing colours
    • Writing images
  • Devices
    • Stream Deck Mini
    • Stream Deck Original (untested)
    • Stream Deck Original V2
    • Stream Deck XL

Getting started

  • cargo add streamdeck to add this library to your project (with cargo-edit)
  • cargo install streamdeck to install the utility only
  • git clone git@github.com:ryankurte/rust-streamdeck.git to clone the repo

Building requires libusb and hidapi packages.

Setting up permissions on linux

  • cp 40-streamdeck.rules /etc/udev/rules.d/ to allow user access to streamdeck devices
    • note this may need to be edited with other vid/pid combinations for other devices
  • sudo udevadm control --reload-rules to reload udev rules

Using the CLI

streamdeck-cli --help displays available subcommands and options, passing --help to subcommands (ie. streamdeck set-image --help) displays options for that subcommand

streamdeck-cli 0.4.1
A CLI for the Elgato StreamDeck

    streamdeck-cli [OPTIONS] <SUBCOMMAND>

    -h, --help       Prints help information
    -V, --version    Prints version information

        --log-level <level>    Enable verbose logging [default: info]
        --pid <pid>            USB Device Product ID (PID) in hex [env: USB_PID=]  [default: 0063]
        --serial <serial>      USB Device Serial [env: USB_SERIAL=]
        --vid <vid>            USB Device Vendor ID (VID) in hex [env: USB_VID=]  [default: 0fd9]

    get-buttons       Fetch button states
    help              Prints this message or the help of the given subcommand(s)
    reset             Reset the attached device
    set-brightness    Set device display brightness
    set-colour        Set button colours
    set-image         Set button images
    version           Fetch the device firmware version

This library stands on the shoulders of giants (who had already done all the reversing work)...

You might also like to look at:

Icons from material.io and brandeps.com


~284K SLoC