Skip to main content

A beautiful, fast, and comprehensive system information tool

Project description

MetaFetch

A beautiful, fast, and comprehensive system information tool inspired by neofetch, written in Python with enhanced cross-platform support and advanced system monitoring capabilities.

                   -`                    john@desktop
                  .o+`                   -------------
                 `ooo/                   OS: Ubuntu 22.04.3 LTS
                `+oooo:                  Kernel: 5.15.0-84-generic
               `+oooooo:                 Architecture: x86_64
               -+oooooo+:                Uptime: 2d 14h 32m
             `/:-:++oooo+:               Packages: 2847 (apt), 23 (pip), 45 (npm)
            `/++++/+++++++:              Shell: bash 5.1.16
           `/++++++++++++++:             Desktop: GNOME
          `/+++ooooooooo+/`              Window Manager: Mutter
         ./ooosssso++osssssso+`          Terminal: gnome-terminal
        .oossssso-````/ossssss+`         CPU: Intel i7-9700K (8C/16T)
       -osssssso.      :ssssssso.        GPU: NVIDIA GeForce RTX 3070
      :osssssss/        osssso+++.       Memory: 8.2GB / 32.0GB (26%)
     /ossssssss/        +ssssooo/-       Swap: 2.1GB / 8.0GB (26%)
   `/ossssso+/:-        -:/+osssso+-     Disk: 245.8GB / 931.5GB (26%)
  `+sso+:-`                 `.-/+oso:    Network: eth0 (192.168.1.100)
 `++:.                           `-/+/   Resolution: 2560x1440
 .`                                 `/   Battery: 85% (Charging)
                                        Temperature: 45.2°C
                                        Load Avg: 0.85, 1.23, 1.45
                                        Processes: 342
                                        Users: john (tty1), admin (pts/0)
                                        Public IP: 203.0.113.45
                                        Timezone: America/New_York
                                        Python: Python 3.10.12
                                        Session: X11 | Wayland

🌟 Features

Core Functionality

  • 🌍 Cross-Platform Support: Works seamlessly on Linux, macOS, and Windows
  • 📊 Comprehensive System Info: 25+ system metrics including hardware, software, and network information
  • 🎨 Beautiful ASCII Art: Platform-specific ASCII logos with colorful ANSI output
  • ⚡ Fast Performance: Optimized information gathering with timeout protection
  • 🔧 Multiple Display Modes: Full display with ASCII art or compact categorized view

Advanced System Detection

  • 📦 Package Manager Detection: Supports 12+ package managers:
    • System: apt, dnf/yum, pacman, portage, xbps, apk
    • Cross-platform: brew, pip, conda, npm, gem, cargo
  • 🖥️ Desktop Environment Detection: Auto-detects DE (GNOME, KDE, XFCE, MATE, etc.) and standalone WMs
  • 🌐 Network Information: Active interfaces, local IPs, and public IP detection
  • 🔋 Hardware Monitoring: Real-time battery, temperature, memory, disk, and swap usage
  • 👥 Multi-user Support: Shows all logged-in users and their terminals
  • 📺 Display Information: Screen resolution and session type detection

Technical Features

  • 🛡️ Robust Error Handling: Graceful degradation when information isn't available
  • ⏱️ Timeout Protection: Prevents hanging on slow system commands
  • 🔄 Fallback Methods: Multiple detection methods for maximum compatibility
  • 📱 Responsive Design: Adapts output formatting based on available information

🚀 Installation

Prerequisites

Ensure you have Python 3.6 or higher installed:

python --version
# or
python3 --version

Install from Source

  1. Clone the repository:
git clone https://github.com/volksgeistt/metafetch.git
cd metafetch
  1. Install dependencies:
pip install -r requirements.txt
# or for system-wide installation
pip3 install -r requirements.txt
  1. Make it executable (Linux/macOS):
chmod +x metafetch.py

System-wide Installation (Optional)

Linux/macOS:

# Method 1: Create symbolic link
sudo ln -s $(pwd)/metafetch.py /usr/local/bin/metafetch

# Method 2: Add to PATH
echo 'export PATH="$PATH:'$(pwd)'"' >> ~/.bashrc
source ~/.bashrc

Windows:

# Add the directory to your PATH environment variable
# or create a batch file in a directory that's already in PATH

📖 Usage

Basic Usage

# Run with Python
python metafetch.py
python3 metafetch.py

# If installed globally
metafetch

Command Line Options

metafetch [OPTIONS]

Options:
  -c, --compact     Display compact categorized output without ASCII art
  -h, --help        Show help message and usage information
  --version         Show version information

Usage Examples

Full system information with ASCII art (default):

metafetch

Compact categorized display:

metafetch -c
john@desktop
============

System:
  OS: Ubuntu 22.04.3 LTS
  Kernel: 5.15.0-84-generic
  Architecture: x86_64
  Uptime: 2d 14h 32m

Software:
  Packages: 2847 (apt), 23 (pip), 45 (npm)
  Shell: bash 5.1.16
  Desktop: GNOME
  Terminal: gnome-terminal

Hardware:
  CPU: Intel i7-9700K (8C/16T)
  GPU: NVIDIA GeForce RTX 3070
  Memory: 8.2GB / 32.0GB (26%)
  Disk: 245.8GB / 931.5GB (26%)

Network:
  Local IP: eth0 (192.168.1.100)
  Public IP: 203.0.113.45
  Resolution: 2560x1440

Status:
  Battery: 85% (Charging)
  Temperature: 45.2°C
  Load Avg: 0.85, 1.23, 1.45
  Processes: 342

🎨 Customization

MetaFetch is highly customizable and extensible:

Color Customization

Modify the colors dictionary in the metafetch class:

self.colors = {
    'red': '\033[91m',
    'green': '\033[92m',
    # Add your custom colors
}

ASCII Art Customization

Edit the get_ascii_art() method to add custom ASCII art or modify existing ones.

Information Fields

  • Add new fields: Create new get_*() methods and add them to gather_info()
  • Remove fields: Comment out unwanted information in the display methods
  • Modify display: Customize the display() or display_compact() methods

Example Customization

# Add custom information
def get_favorite_editor(self):
    return os.environ.get('EDITOR', 'Unknown')

# Add to info_functions in gather_info()
'editor': self.get_favorite_editor,

🔧 Compatibility

Operating Systems

OS Support Versions Features
Linux ✅ Full All major distributions Complete feature set
macOS ✅ Full macOS 10.12+ (Sierra and later) Complete feature set
Windows ✅ Full Windows 10/11 Complete feature set

Package Managers

System Package Managers

  • Linux: apt (Debian/Ubuntu), dnf/yum (RHEL/Fedora), pacman (Arch), portage (Gentoo), xbps (Void), apk (Alpine)
  • macOS: brew (Homebrew)

Language Package Managers

  • Python: pip, conda
  • JavaScript: npm
  • Ruby: gem
  • Rust: cargo

Desktop Environments & Window Managers

Desktop Environments

  • GNOME, KDE Plasma, XFCE, MATE, Cinnamon, LXQt, LXDE, Budgie, Pantheon

Window Managers

  • Tiling: i3, bspwm, awesome, dwm, sway, Hyprland
  • Stacking: openbox, fluxbox, JWM, IceWM

🛠️ Technical Details

Dependencies

  • psutil: System and process utilities
  • Built-in modules: os, platform, subprocess, socket, getpass, time, sys, datetime, re, urllib

Performance

  • Startup time: < 1 second on modern systems
  • Memory usage: ~10-20MB during execution
  • CPU usage: Minimal, with 3-second timeout protection

Security Considerations

  • Commands executed with timeout protection
  • No user input processing (command injection safe)
  • External network requests limited to IP detection services
  • File system access uses proper exception handling

🤝 Contributing

We welcome contributions! Here are some ways you can help:

  1. Report bugs by opening an issue
  2. Suggest features or improvements
  3. Submit pull requests with bug fixes or new features
  4. Improve documentation or add examples
  5. Test on different platforms and report compatibility issues

Development Setup

git clone https://github.com/volksgeistt/metafetch.git
cd metafetch
pip install -r requirements.txt
python metafetch.py  # Test your changes

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Inspired by neofetch and screenfetch
  • Thanks to all contributors who help improve MetaFetch
  • Special thanks to the Python community for excellent libraries like psutil

📊 Comparison with Similar Tools

Feature MetaFetch neofetch screenfetch fastfetch
Language Python Bash Bash C
Cross-platform
Package Detection 12+ managers 50+ managers Limited Many
Performance Fast Medium Slow Very Fast
Customization High Very High Medium Medium
Dependencies psutil only Many Many Minimal
Compact Mode

Built with ❤️ by Ujjawal Singh
If you find MetaFetch useful, please consider giving it a ⭐!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metafetch-1.0.1.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metafetch-1.0.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file metafetch-1.0.1.tar.gz.

File metadata

  • Download URL: metafetch-1.0.1.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for metafetch-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2438147787e58380580c7be80a301230efcbe03385e5776aea0353e5a6700822
MD5 14c6136b626744ba6637bfe46cd1d40d
BLAKE2b-256 457a3563e90cb1d2391b8206679d2cae18adc89bf2363c48fd938ac208dcb5f3

See more details on using hashes here.

File details

Details for the file metafetch-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: metafetch-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for metafetch-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14c93043b71eeaecbd65c98c864d8fb655905ce161513ed7814987c59a430c1d
MD5 5b66539f193e0b4f161dbd7c4cb99b88
BLAKE2b-256 93ed47a7283864125166065cfcaeba22217907b2fc80df5e5da7ab84557519e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page