whatisgithub

What is usbtree?

gnomeria/usbtree — explained in plain English

Analysis updated 2026-05-18

273RustAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A terminal app that shows a live, color coded tree of every USB device plugged into your computer, with details and real time activity graphs on Linux.

Mindmap

mindmap
  root((usbtree))
    What it does
      Live USB device tree
      Cross platform TUI
      Hot plug detection
    Tech stack
      Rust
      Ratatui
      nusb library
    Use cases
      Inspect USB devices
      Monitor live activity
      Safe eject storage
    Audience
      Developers
      Linux power users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Inspect which USB devices are connected and how they are nested under hubs.

USE CASE 2

Watch live activity graphs to see which USB device is transferring data.

USE CASE 3

Safely eject a USB storage device from the terminal on Linux.

USE CASE 4

Debug USB hardware issues by viewing vendor IDs, speeds, and power draw.

What is it built with?

RustRatatuinusb

How does it compare?

gnomeria/usbtreedeeplethe/forkdchange-42-yhmm/quota-float
Stars273282291
LanguageRustRustRust
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Ships as a single dependency free binary installable via Homebrew, shell script, or Cargo, no root access needed for basic use.

MIT license: you can use, copy, modify, and distribute this freely, including commercially, as long as you keep the copyright notice.

So what is it?

usbtree is a terminal app that shows you a live picture of every USB device plugged into your computer, arranged as a tree so you can see which devices are connected through which hubs. It works on Linux, macOS, and Windows, and it does not need root access or any extra libraries installed, since it talks to USB devices through a pure Rust library instead. The tree updates once a second and shows each device's speed, its class such as audio or storage, and how it is nested under hub devices. When you plug something in or unplug it, the change shows up immediately with a timestamped log of the event, and unplugged devices linger briefly in red before disappearing. A detail panel shows deeper information for a selected device, like its path in the system, vendor and product IDs, serial number, and connected children. On Linux only, it can also show live activity graphs of how much data each device is sending or receiving, with a more detailed version available if you run it as root. Other features include a safe eject option for storage devices on Linux, a view for PCI devices in addition to USB, live filtering to search the tree, and a demo mode that fakes a device tree with scripted activity so you can try the interface without any real hardware. Device names come from a chain of sources: your own personal overrides file, descriptor strings from the device itself, or a downloadable database of known vendor and product IDs. Installation is straightforward: a single small binary with no dependencies, installable through Homebrew, a shell script, a PowerShell script, or by building from source with Cargo. The project uses the MIT license and ships prebuilt binaries for common platforms and architectures.

Copy-paste prompts

Prompt 1
Help me install usbtree on my Linux machine and run it for the first time.
Prompt 2
Explain how usbtree's live activity sparklines work and how to enable full bandwidth stats.
Prompt 3
Show me how to set up a custom device name in usbtree's overrides.ids file.
Prompt 4
Walk me through usbtree's keyboard shortcuts for navigating the device tree.

Frequently asked questions

What is usbtree?

A terminal app that shows a live, color coded tree of every USB device plugged into your computer, with details and real time activity graphs on Linux.

What language is usbtree written in?

Mainly Rust. The stack also includes Rust, Ratatui, nusb.

What license does usbtree use?

MIT license: you can use, copy, modify, and distribute this freely, including commercially, as long as you keep the copyright notice.

How hard is usbtree to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is usbtree for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.