| Crates.io | sysinfo-cli |
| lib.rs | sysinfo-cli |
| version | 0.1.1 |
| created_at | 2025-12-18 09:43:06.864266+00 |
| updated_at | 2025-12-18 10:09:05.753654+00 |
| description | A lightweight, efficient, and professional CLI wrapper around the sysinfo crate. |
| homepage | |
| repository | https://github.com/byezy/sysinfo-cli |
| max_upload_size | |
| id | 1992059 |
| size | 51,673 |
A lightweight and efficient Command Line Interface (CLI) wrapper around the sysinfo Rust crate. It provides a quick way to view system resources, hardware information, and running processes directly from your terminal.
default-features = false to disable multithreading, reducing memory footprint on platforms like macOS.comfy-table for beautifully formatted tables and colored for visual clarity.--json flag for machine-readable output, perfect for automation and scripting.--watch (or -w) flag to refresh data at a specified interval.--output flag.sysinfo-cli supports all major operating systems. Note that in virtualized environments (Docker, WSL), some hardware-specific metrics like temperature may be unavailable.
| Platform | System Metrics | Process List | Disk/Network | UI (Colors/Tables) |
|---|---|---|---|---|
| Linux | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| macOS | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| Windows | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| FreeBSD | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| Android (Termux) | ⚠️ Partial | ⚠️ Partial | ✅ Full | ✅ Full |
| Other Unix (OpenBSD, etc.) | ❌ None | ❌ None | ❌ None | ✅ Full |
cargo install sysinfo-cli
git clone https://github.com/byezy/sysinfo-cli.git
cd sysinfo-cli
cargo install --path .
cargo build --release
# The binary will be at ./target/release/sysinfo-cli
Global Flags:
-j, --json: Output data in JSON format.-w, --watch <SECONDS>: Refresh the display every N seconds.-o, --output <FILE>: Save the output to a specified file instead of printing to terminal.Subcommands:
system: Show OS name, kernel version, host name, and OS version.cpu: Show detailed per-core usage, vendor, and brand.memory: Show RAM and Swap usage.disks: List mounted disks and available space.network: Show interface statistics (received/transmitted).components: Show hardware temperatures.processes: List running processes.
-f, --filter <STR>: Filter by process name.-l, --limit <NUM>: Limit number of results.-s, --sort <TYPE>: Sort by cpu, memory, pid, or name.Running without arguments shows a high-level system overview.
sysinfo-cli
Sample Output:
--- System Summary ---
System name: "Arch Linux"
Kernel version: "6.17.9-arch1-1"
OS version: ""
Host name: "thinkarch"
--- Memory Summary ---
Total memory: 62.62 GiB
Used memory: 7.10 GiB
--- CPU Summary ---
NB CPUs: 8
Total CPU usage: 15.4%
sysinfo-cli system
Sample Output:
System name: "Arch Linux"
Kernel version: "6.17.9-arch1-1"
OS version: ""
Host name: "thinkarch"
Watch per-core usage refresh every second.
sysinfo-cli cpu --watch 1
Sample Output:
=> CPUs:
Total CPUs: 8
Global usage: 12.5%
+----+---------+--------------+-------------------------------------------+
| ID | Usage % | Vendor | Brand |
+=========================================================================+
| 0 | 45.0 | GenuineIntel | Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz |
| 1 | 2.0 | GenuineIntel | Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz |
...
+----+---------+--------------+-------------------------------------------+
sysinfo-cli memory
Sample Output:
Total memory: 62.62 GiB
Used memory: 7.10 GiB
Total swap: 0 B
Used swap: 0 B
sysinfo-cli disks
Sample Output:
=> Disks:
+----------------------+-----------+-------+------------+------------+
| Name | Kind | FS | Available | Total |
+====================================================================+
| /dev/nvme0n1p3 | SSD | btrfs | 150.30 GiB | 450.00 GiB |
| /dev/sda1 | HDD | ext4 | 2.10 TiB | 4.00 TiB |
+----------------------+-----------+-------+------------+------------+
sysinfo-cli network
Sample Output:
=> Networks:
+-----------+------------+-------------+
| Interface | Received | Transmitted |
+======================================+
| eth0 | 14.20 MiB | 1.50 MiB |
| lo | 1.20 KiB | 1.20 KiB |
| wlan0 | 450.30 MiB | 45.10 MiB |
+-----------+------------+-------------+
sysinfo-cli components
Sample Output:
=> Components:
+-----------------------+---------+---------+
| Label | Temp | Max |
+===========================================+
| Core 0 | 45.0°C | 90.0°C |
| Core 1 | 46.0°C | 90.0°C |
| Composite | 38.0°C | 70.0°C |
+-----------------------+---------+---------+
Find the top 5 memory-hungry processes.
sysinfo-cli processes --sort memory --limit 5
Sample Output:
=> Processes:
+--------+-----------------+-------+------------+
| PID | Name | CPU % | Memory |
+===============================================+
| 1426 | firefox | 5.2 | 727.64 MiB |
| 186924 | vivaldi-bin | 1.0 | 512.20 MiB |
| 1245 | Xwayland | 0.5 | 236.11 MiB |
| 2145 | rust-analyzer | 0.2 | 180.45 MiB |
| 3210 | gnome-shell | 2.1 | 150.30 MiB |
+--------+-----------------+-------+------------+
Save network statistics to a JSON file for processing.
sysinfo-cli --json --output net_stats.json network
Sample Output (net_stats.json):
[
{
"interface": "wlan0",
"received": 14567890,
"transmitted": 8901234
},
{
"interface": "lo",
"received": 1024,
"transmitted": 1024
}
]
This project is licensed under the MIT License.