Convert Figma logo to code with AI

Macchina-CLI logomacchina

A system information frontend with an emphasis on performance.

1,310
51
1,310
15

Top Related Projects

21,911

🖼️ A command-line system information tool written in bash 3.2+

10,646

Ping, but with a graph

19,111

A monitor of resources

9,759

Yet another cross-platform graphical process/system monitor.

Terminal bandwidth utilization tool

5,018

A modern replacement for ps written in Rust

Quick Overview

Macchina-CLI is a fast and customizable system information fetcher written in Rust. It provides detailed information about your system's hardware and software configuration in a clean, easy-to-read format. Macchina-CLI is designed to be a modern alternative to tools like neofetch, with a focus on speed and customization.

Pros

  • Fast performance due to being written in Rust
  • Highly customizable output with themes and custom formats
  • Cross-platform support (Linux, macOS, Windows)
  • Lightweight with minimal dependencies

Cons

  • Relatively new project, may have fewer features compared to more established tools
  • Limited to command-line interface, no GUI option
  • Requires Rust to be installed for building from source

Code Examples

// Fetch and display all system information
macchina

// Display specific system information (e.g., CPU, memory, and OS)
macchina --cpu --memory --os

// Use a custom theme
macchina --theme mytheme.json
// Display information in JSON format
macchina --json

// Show only the system uptime
macchina --uptime

Getting Started

  1. Install Macchina-CLI:

    cargo install macchina
    
  2. Run Macchina-CLI:

    macchina
    
  3. Customize output (optional):

    macchina --cpu --memory --os
    
  4. Create a custom theme (optional):

    • Create a JSON file with your desired theme settings
    • Run Macchina-CLI with your custom theme:
      macchina --theme mytheme.json
      

For more detailed information and advanced usage, refer to the project's GitHub repository and documentation.

Competitor Comparisons

21,911

🖼️ A command-line system information tool written in bash 3.2+

Pros of neofetch

  • More established project with a larger user base and community
  • Supports a wider range of operating systems and distributions
  • Offers more customization options for output formatting

Cons of neofetch

  • Written in Bash, which can be slower than Rust (used by macchina)
  • May consume more system resources for information gathering
  • Less focused on performance optimization compared to macchina

Code Comparison

neofetch (Bash):

get_uptime() {
    case $os in
        Linux|Windows|MINIX)
            if [ -r /proc/uptime ]; then
                s=$(< /proc/uptime)
                s=${s/.*}
            else
                boot=$(date -d"$(uptime -s)" +%s)
                now=$(date +%s)
                s=$((now - boot))
            fi
        ;;
    esac
}

macchina (Rust):

pub fn read() -> Result<Duration> {
    let uptime = fs::read_to_string("/proc/uptime")?;
    let uptime = uptime.split_whitespace().next().unwrap();
    let uptime = uptime.parse::<f64>()?;
    Ok(Duration::from_secs_f64(uptime))
}

The code comparison shows that macchina's Rust implementation is more concise and potentially faster, while neofetch's Bash script handles multiple operating systems but may be less efficient.

10,646

Ping, but with a graph

Pros of gping

  • Provides real-time graphical ping visualization in the terminal
  • Supports pinging multiple hosts simultaneously
  • Offers customizable graph appearance and color schemes

Cons of gping

  • Limited to ping functionality, while macchina provides comprehensive system information
  • May consume more system resources due to graphical output
  • Less suitable for quick, text-based system checks

Code Comparison

macchina:

let cpu = CPU::new();
let memory = Memory::new();
let os = OS::new();
println!("CPU: {}", cpu.model());
println!("Memory: {} GB", memory.total() / 1_000_000_000);

gping:

let mut pinger = Pinger::new()?;
pinger.add_host("example.com")?;
pinger.run()?;
let stats = pinger.get_stats();
println!("Ping: {} ms", stats.avg_rtt().as_millis());

Summary

macchina is a comprehensive system information tool, while gping focuses on graphical ping visualization. macchina provides a wide range of system details, making it more suitable for general system monitoring. gping excels in network latency visualization but is limited to ping functionality. The choice between the two depends on specific use cases and preferences for data presentation.

19,111

A monitor of resources

Pros of btop

  • More comprehensive system monitoring with CPU, memory, disks, network, and processes
  • Interactive interface with mouse support and customizable layout
  • Cross-platform support (Linux, macOS, FreeBSD, OpenBSD)

Cons of btop

  • Heavier resource usage due to its graphical nature
  • Steeper learning curve for customization and advanced features
  • Requires a terminal with full-color support

Code comparison

macchina:

let cpu = CPU::new();
let memory = Memory::new();
println!("CPU: {}%", cpu.usage());
println!("Memory: {} / {}", memory.used(), memory.total());

btop:

void Draw::cpu_box(int& y, int& x, int& h, int& w) {
    cpu_meter(y, x, h, w);
    cpu_graph(y, x, h, w);
    cpu_temps(y, x, h, w);
}

Summary

btop offers a more feature-rich and visually appealing system monitoring experience, while macchina provides a lightweight and fast alternative for basic system information. btop's interactive interface and comprehensive monitoring capabilities come at the cost of higher resource usage and complexity. macchina, on the other hand, focuses on simplicity and efficiency, making it ideal for quick system checks or resource-constrained environments.

9,759

Yet another cross-platform graphical process/system monitor.

Pros of bottom

  • More feature-rich with a comprehensive graphical interface
  • Supports multiple views and customizable layouts
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons of bottom

  • Larger resource footprint due to its graphical nature
  • Steeper learning curve for advanced features
  • May be overkill for users seeking simple system information

Code Comparison

bottom (Rust):

let mut app = App::default();
app.run().expect("Error running app");

macchina (Rust):

let system_info = SystemInfo::new();
println!("{}", system_info);

Summary

bottom is a more comprehensive system monitoring tool with a rich graphical interface, offering multiple views and customizable layouts. It's cross-platform but may consume more resources and have a steeper learning curve. macchina, on the other hand, is a simpler, lightweight CLI tool focused on providing quick system information with minimal overhead. The choice between the two depends on the user's needs for detailed monitoring versus quick system snapshots.

Terminal bandwidth utilization tool

Pros of bandwhich

  • Real-time network usage monitoring for processes and connections
  • Detailed bandwidth utilization breakdown by process and remote IP
  • Interactive terminal user interface with sorting options

Cons of bandwhich

  • Focuses solely on network monitoring, lacking system information
  • Requires root/admin privileges to function properly
  • May have higher resource usage due to real-time monitoring

Code Comparison

bandwhich (Rust):

let mut table = Table::new();
table.add_row(row!["Process", "Connection", "Rx", "Tx"]);
for traffic in &traffic_data {
    table.add_row(row![traffic.process, traffic.connection, traffic.rx, traffic.tx]);
}

macchina (Rust):

let mut system = System::new_all();
system.refresh_all();
println!("CPU Usage: {}%", system.global_cpu_info().cpu_usage());
println!("Memory: {} / {}", system.used_memory(), system.total_memory());

Summary

bandwhich is a specialized tool for real-time network monitoring with a focus on process-level bandwidth usage. It offers an interactive interface and detailed network statistics. However, it requires elevated privileges and is limited to network information.

macchina, on the other hand, is a general-purpose system information tool that provides a wide range of system metrics, including CPU, memory, and disk usage. It doesn't offer real-time network monitoring but provides a more comprehensive overview of system resources without requiring special privileges.

5,018

A modern replacement for ps written in Rust

Pros of procs

  • More detailed process information, including CPU and memory usage
  • Supports custom output formats and column selection
  • Faster performance, especially for large numbers of processes

Cons of procs

  • Focused solely on process management, lacking system-wide information
  • More complex usage with numerous command-line options
  • Steeper learning curve for new users

Code Comparison

procs:

use procfs::process::Process;

fn main() {
    let processes = Process::all().unwrap();
    for process in processes {
        println!("{:?}", process);
    }
}

macchina:

use macchina::traits::Info;
use macchina::SystemInfo;

fn main() {
    let info = SystemInfo::new();
    println!("OS: {}", info.os().unwrap());
    println!("Kernel: {}", info.kernel().unwrap());
}

procs focuses on detailed process information, while macchina provides a broader overview of system information. procs offers more flexibility in output formatting and process filtering, making it better suited for advanced users and system administrators. macchina, on the other hand, presents a simpler interface for displaying general system information, making it more accessible for casual users or quick system checks.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

macchina

Fast, minimal and customizable system information frontend.

Linux • macOS • Windows • NetBSD • FreeBSD • OpenWrt • Android

Preview

About

macchina lets you view system information, like your kernel version, uptime, memory usage, processor load and much more. macchina is basic by default and extensible by design.

If you're interested in the library macchina uses to fetch system information, have a look at libmacchina; fetching-related issues should be filed on that repository.

Status

macchina is currently in maintenance mode, meaning bug fixes and little optimizations are much more prioritized over the addition of new features. This is due to the fact that we (the authors) do not have the time to focus on moving the project forward, or expanding on what is currently offered while keeping up with the demanding nature of our lives. macchina will at some point (although I can't say when) leave this stage and implement all the bells and whistles the community has been requesting.

We hope you understand our situation and continue to support macchina.

Benchmarks

Check out the benchmarks wiki page.

Features

Themes

macchina has a theming system which you can use to customize pretty much any visual aspect of the program. Themes live outside the configuration file, so you can create a bunch of them and switch between them at any time.

Why are they separate?

  • Modularity — themes are an engine of their own, and their sole purpose is to provide an interface that allows for the modification of macchina's visual components. It makes sense to separate them from the main configuration file.

  • Portability — sure, the configuration file is shareable, but what if you wanted to share the look of your macchina and not its behavior? What if you wanted to switch between dozens of themes that you very carefully designed? The way we handle customization answers this need.

Learn how to make your own.

Doctor

In the event of fetching failures, which can occur for various reasons, the --doctor flag that can tell you why that might be happening.

Configuration

See the configuration wiki page.

Customization

Have a look at the customization wiki page.

Installation

Check out the installation wiki page. We also provide prebuilt binaries with every release.

Contributors

macchina like many other open source projects, would not be where it is right now without the help of its contributors. Whether you've helped drive it forward by contributing to the codebase, packaged it so we didn't have to, or recommended it to someone you know — we truly appreciate your support!

The following is a list of awesome people that have truly shaped macchina:

  • pin: Provided massive amounts of help, feedback and testing, and is currently packaging macchina on NetBSD.
  • 123marvin123: Co-author of (lib)macchina and author of countless high-quality contributions and primarily, support for macOS and Windows.
  • uttarayan21: Co-author of (lib)macchina and author of numerous shipshape contributions and primarily, support for Android and OpenWrt.

Looking to help? Read this first.