hdrt is a cross-platform hardware information CLI/TUI.
Name meaning:
hd: Hardware Devicert: Rust Ratatui
Quick memory hint: you can remember hdrt as "hard rata", which makes the short command easier to recall.
The install script supports:
- apt-based Linux distributions through
.deb - dnf-based Linux distributions through
.rpm - Android / Termux through the Android binary
- x86_64 and aarch64
- Android API 24 (Android 7.0) or newer; 32-bit ARM builds are not provided
GitHub:
curl -fsSL https://raw.githubusercontent.com/VincentZyuApps/hdrt/main/docs/scripts/install/install.sh | bash
hdrt doctorGitee mirror:
curl -fsSL https://gitee.com/vincent-zyu/hdrt/raw/main/docs/scripts/install/install_gitee.sh | bash
hdrt doctorInstall a specific version:
HDRT_VERSION=vX.Y.Z bash -c "$(curl -fsSL https://raw.githubusercontent.com/VincentZyuApps/hdrt/main/docs/scripts/install/install.sh)"scoop bucket add vincentzyu https://github.com/VincentZyuApps/scoop-bucket
scoop install hdrt
hdrt doctorGitee mirror:
scoop bucket add vincentzyu https://gitee.com/vincent-zyu/scoop-bucket
scoop install hdrt
hdrt doctorhdrt --version
hdrt disk
hdrt physical-disk
hdrt logical-disk
hdrt memory
hdrt cpu
hdrt motherboard
hdrt all
hdrt doctor
hdrt bench
hdrt --backend native
hdrt --backend shell disk
hdrt -e all
hdrt -e tui
hdrt --no-spinner all
hdrt --spinner-style ascii bench
hdrt tui
hdrt tui -t 1000
hdrt tui --chart-mode bar
hdrt tui --border roundedhdrt --version / hdrt -V prints the package version, Git commit hash and time, runtime system and architecture, and the Cargo build target. Git fields fall back to unknown when source builds do not include repository metadata.
Aliases:
hdrt dforhdrt disk, which shows both physical and logical diskshdrt pdforhdrt physical-diskhdrt ldforhdrt logical-diskhdrt mandhdrt memforhdrt memoryhdrt cforhdrt cpuhdrt bandhdrt mbforhdrt motherboardhdrt aforhdrt all
hdrt uses --backend auto by default. Backend selection is a global option, so it can be used with any command.
| Backend | Behavior | External commands |
|---|---|---|
auto |
Native collectors first; shell collectors may fill missing fields. | May run shell commands |
native |
Rust/native system APIs only. Useful for checking what hdrt can collect without command helpers. |
No |
shell |
Force shell-based collectors. Useful for comparing with system tools. | Yes |
Examples:
hdrt --backend auto all
hdrt --backend native physical-disk
hdrt --backend shell memory
hdrt benchPlatform notes:
- Windows
nativeuses Rust WMI/CIM and native fallback code;shelluses the PowerShell/CIM script. - Linux
nativeuses/sys,/proc, and DMI files;shelluses tools such aslsblk,smartctl, anddmidecode. - Linux disk health is filled by
auto/shellthroughsmartctlwhen available.nativekeeps health unknown until native SMART/NVMe probing is implemented. - Android / Termux accepts
--backendand--detail, but currently uses the same best-effort collectors and warns when a non-default value is selected. - macOS accepts
--backend, but its backend split is still narrower than Windows/Linux.
Emoji decorations are disabled by default. Use -e or --emoji to decorate CLI output, Markdown, JSON display labels, spinner messages, and TUI labels.
hdrt -e all
hdrt --emoji disk --format markdown
hdrt --emoji disk --format json
hdrt --emoji tui--emoji --format json keeps the raw data under data and adds decorated title and labels fields for display.
hdrt shows an interactive loading spinner by default when stderr is a terminal. The spinner writes to stderr, so JSON and Markdown stdout stay clean.
hdrt --no-spinner all
hdrt --spinner-style unicode all
hdrt --spinner-style ascii bench
hdrt --spinner-style dots diskSpinner styles:
unicodeis the default and uses Braille frames.asciiuses/ | \ -.dotsuses a dotted pulse.
hdrt tui opens the live Ratatui interface. It combines the static hardware inventory with real-time CPU, memory, and disk telemetry.
Linux / Android maps logical disk I/O through /proc/diskstats and /proc/self/mountinfo. Android FUSE shared storage displays N/A when it cannot be mapped reliably to an underlying block device instead of reporting a misleading 0 B/s.
hdrt tui
hdrt tui --tab cpu
hdrt tui --tab physical-disk --chart-mode gauge
hdrt tui --tab logical-disk --chart-mode bar -t 1000
hdrt tui --interval 1000
hdrt tui --border double
hdrt tui --tui-border thickTUI controls:
Tab/Left/Right/WASD: switch tabs.z/c: switch the global chart style in this fixed cycle: gauge, bar, sparkline, line, scatter.j/k: select disks in the physical/logical disk tabs.r: refresh the static hardware inventory and reset live samples.q/Esc: quit.
--chart-mode only sets the initial chart mode. After startup, z / c continue from that position in the same fixed cycle.
--border selects the Ratatui panel border: rounded, plain, double, or thick. --tui-border is an alias; round aliases rounded, and square aliases plain.
The default refresh interval is 1000 ms. Values below 250 ms are clamped to 250 ms.
hdrt disk --format table
hdrt disk --style modern
hdrt disk --style psql
hdrt disk --format json
hdrt disk --format markdown
hdrt physical-disk --format table
hdrt logical-disk --format table
hdrt all --lang zh-cn
hdrt physical-disk --detail smartCLI render styles:
--formatselects the CLI render format:table,json, ormarkdown.--styleselects the CLI table style:rounded,modern,sharp,psql,ascii, orblank.--table-styleis an alias for--style;roundaliasesrounded, andplainaliasesascii.- The old compact-style output is now
--style modern. - CLI
--styledoes not affect Ratatui; usehdrt tui --border <BORDER>for TUI panels. --no-colordisables ANSI colors, and--no-bolddisables bold text.
Display languages:
--lang en-usis the default.--lang zh-cnlocalizes help, table, markdown, and TUI labels.- Unknown display values are shown as
【--UNKNOWN--】in English and【--未知--】in Simplified Chinese.
Detail levels:
--detail basicis the default.--detail smartasks disk collectors for SMART and health details when the selected backend can provide them.--detail fullis reserved for the richest supported detail level.
hdrt should show as much as it can with the current permissions.
Some fields need elevated privileges or external tools:
- Linux SMART details usually need
smartctl, often withsudo. - Linux memory slot serial numbers usually need
dmidecode, often withsudo. - Linux
--backend nativeavoids shell commands, so some fields such as disk health may stay unknown. - Linux
--backend autoand--backend shellcan use tools such aslsblk,smartctl, anddmidecode. - Android / Termux uses
/proc,/sys/block,df, andgetprop; eMMC boot/RPMB regions are filtered and multiple UFS logical units are identified as potentially belonging to one device, while Android may still hide model, serial, firmware, and health fields. - Windows board, BIOS, and disk serial fields may need an Administrator terminal.
Recommended checks:
hdrt doctor
hdrt bench
hdrt --backend native physical-disk
hdrt --backend shell physical-disk --detail smart
sudo hdrt physical-disk --detail smart
sudo hdrt memoryThis project is in early development. Current collectors cover Linux, Android/Termux, Windows, and placeholder macOS support, followed by a richer Ratatui UI.