Skip to content

Latest commit

 

History

123 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust CLI Sysinfo (RCS)

Release Link to PRs Rust Report Card Codacy Badge Gitberg logo

Rust-CLI-Sysinfo (RCS) is a lightweight, cross-platform, modular Rust utility for the terminal that displays the status of customizable system services

RCS Features

  • Comprehensive System Status

    • Displays system diagnostics right out of the box:
      • CPU hardware details and real-time usage
      • GPU hardware details
      • Operating system
      • Kernel/OS build version
      • IP address
      • Hostname
      • Currently logged-in user(s)
      • System uptime
      • System load averages (over one, five, and 15 minutes)
      • Memory usage
      • Disk usage (defaults to /home, customizable via -d/--disk)
      • Battery health/status
  • Customizable Services Layout

    • Select exactly which service components to display and specify their order using service tokens (see -s/--services for details)
    • Configure the service key label colors with 24-bit ANSI truecolor (e.g., "#b4b38f")
  • Custom New Services

    • New system services can be added easily by creating a new service file, dropping it into the src/services folder: RCS will automatically detect and render it as an available new service
  • Visual Service Status Indicators

    • Color-coded output for CPU, memory, disk utilization, and battery status thresholds:

      • Normal: $\color{green}{\text{Green}}$
      • Warning: $\color{yellow}{\text{Yellow}}$
      • Critical: $\color{red}{\text{Red}}$
  • Configuration-Free

    • No complex dotfiles or external configurations to track down
    • Manage everything directly via command-line flags
  • Highly Efficient

    • Written in Rust for maximum performance, compiling down to a single binary with no external runtime dependencies

RCS Screenshots

The Default RCS Output

The standard output of the utility displays components with status-aware color coding:

Screenshot showing Rust CLI Sysinfo output

The RCS Help Output

Call rust-cli-sysinfo -h (or --help) to view the complete CLI options:

Screenshot showing Rust CLI Sysinfo output

Customizing RCS with Service Tokens

Run rust-cli-sysinfo -s (or --services) to display all available individual service tokens:

Screenshot showing Rust CLI Sysinfo output

Customized RCS Output

You can combine tokens to isolate and reorder specific services. For example, to focus exclusively on logged-in users (USR), OS details (OS), memory (RAMU), disk (DSKU), CPU (CPU), and GPU (GPU), use the service token layout string:

rust-cli-sysinfo -s USR-OS-RAMU-DSKU-CPU-GPU

This will result in the following output:

Screenshot showing Rust CLI Sysinfo output

Creating New RCS Services

Want to create a new service that doesn't yet exist in RCS?

RCS follows the Open–Closed Principle (the 'O' in SOLID Programming Principles), where every service is implemented within its own Rust source file and automatically registers with the utility at compile time. No need to edit or modify existing source files: just add a separate new service file and rebuild the project.

To create a new RCS service:

  1. Create a new .rs file inside the src/services directory (e.g., ip_address.rs). Use an existing service file in src/services or inspect the well-documented template.rs file as a good starting point.

  2. Build the project (cargo build --release). Your new module will instantly integrate into the default output stack.

One service.
One file.
Done.

Requirements & Installation

Requirements

  • Run-Time

    • Rust-CLI-Sysinfo releases include pre-compiled binaries that runs natively on:
      • Linux AMD64
      • MacOS (AMD64 and ARM64)
      • Windows
  • Build-Time

    • If you're interested in compiling from source, you'll need a functioning installation of the Rust toolchain (using Cargo)

Installation

Grab the pre-compiled binaries directly from the GitHub Releases Page and place it somewhere in your local system path (Linux example below):

cp rust-cli-sysinfo ~/.local/bin/

That's it! You can now run rust-cli-sysinfo from within any terminal session.

Compiling from Source

If you prefer to compile this project from sources, here are the steps (Linux example):

git clone https://github.com/richbl/rust-cli-sysinfo.git
cd rust-cli-sysinfo
cargo build --release
cp target/release/rust-cli-sysinfo ~/.local/bin/

Done!

Usage

Simply invoke the tool from your terminal session:

rust-cli-sysinfo

To display help, use the -h or --help flag:

rust-cli-sysinfo -h

Shell Integration (Recommended)

Adding the binary call to the end of your shell startup configuration script (e.g., ~/.bashrc, ~/.zshrc or similar based on your OS/platform) will render rust-cli-sysinfo services output in your environment every time a new session starts up.

Nice!

Cross Platform Compatibility Matrix

RCS Platform
Service Token Linux Windows Mac
CPU CPU $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
GPU(s) GPU $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
OS OS $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Kernel KNL $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
IP Address IP $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Hostname HST $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
User(s) USR $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Uptime UPT $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Load Averages LOAD $\color{green}{\huge\circledast}$ n/a $\color{green}{\huge\circledast}$
CPU Usage CPUU $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Memory Usage RAMU $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Battery Status BAT $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Disk Usage DSKU $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$
Template (example) TPL $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$ $\color{green}{\huge\circledast}$

Note that the Load Average service (LOAD) is not available on Windows, as the concept of load averages is not applicable (n/a) to that platform

Roadmap

RCS is designed to remain lean and fast. Here are some goals for upcoming releases:

  • Streamline modular service generation patterns following the Open–Closed Principle (the 'O' in SOLID Programming Principles) --> integration completed in RCS 0.7.0

  • Additional metric services:

    • Network interfaces --> IP address service (IP) added in RCS v0.9.0
    • Battery status --> battery service (BAT) added in RCS v0.14.0
    • Thermal sensor(s)?
    • What else?
  • Cross-platform compatibility using system-agnostic Rust crates: makes for better (safer) implementation and easier longer-term codebase maintenance

    • The GPU service (GPU) is currently using platform-specific system calls, as the underlying sysinfo crate does not yet support cross-platform GPU detection. This is expected to change in a future release of sysinfo, at which point RCS will be updated to support true cross-platform GPU detection services
    • The User(s) service (USR) is currently using platform-specific system calls, as a stable cross-platform Rust crate does not exist (yet)

Releases

Packages

Used by

Contributors

Languages