đŸŒŗ A lightning-fast system fetch tool made with Rust.

Overview

đŸŒŗ treefetch

A lightning-fast minimalist system fetch tool made in Rust. Even faster than neofetch and pfetch. Made to practice my new Rust skills đŸĻ€ .

A great pair for cbonsai, to help you get upvotes on your Linux rice.

treefetch

NEW: Christmas mode with treefetch -xmas!

treefetch christmas

Rust

Install (Arch Linux)

  • yay -S treefetch-bin
  • paru -S treefetch-bin

Install (Binary)

Download the latest binary release from the releases section.

Compiling Manually

To compile and install treefetch manually, you first need to install the Rust compiler. When you do it this way, treefetch will be automatically added to your PATH and you can run this program anywhere.

  • git clone https://github.com/angelofallars/treefetch
  • cd treefetch
  • cargo install --path .

cbonsai and treefetch

License

This program is licensed under the MIT License.

Comments
  • GLIBC versions not found

    GLIBC versions not found

    I installed the treefetch binary in my system from the Releases. When I try to run treefetch I get this error:

    treefetch: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by treefetch)
    treefetch: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by treefetch)
    

    I'm on Pop!_OS 20.04 (based on Ubuntu 20.04)

    opened by wizard-28 3
  • use clap to handle args

    use clap to handle args

    Use the crate clap to handle arguments. Now the help message is like:

    treefetch 2.0.0
    
    USAGE:
        treefetch [TREE]
    
    ARGS:
        <TREE>    Which tree to display. [default: normal] [possible values: normal, xmas, bonsai]
    
    OPTIONS:
        -h, --help       Print help information
        -V, --version    Print version information
    
    opened by EdenQwQ 2
  • Displayed memory usage is higher than actual memory usage

    Displayed memory usage is higher than actual memory usage

    Host ⇒ Arch and Archcraft

    The displayed memory usage is higher than actual memory usage. First I tried it on Archcraft there the actual memory usage was somewhere around 800 MB but treefetch shows somewhere around a GB. Also check it on an arch vm there also the result was same, actual memory usage was around 200 MB but treefetch shows 400 MB.

    VM ⇒ {archlinux + openbox)

    Screenshot_2022-02-22-01-02-09_1920x1080

    opened by XXDRD 1
  • improve code

    improve code

    Changes

    • Created a macro to simplify the code;
    • Replaced print_left_to_right() with something more concise (based on the fact that every tree is 'taller' than the right side);
    • Modified README.md (options => arguments). Also please consider changing the example images;

    Suggestions

    • Rewrite fields.rs using third-party crates (e.g. nixinfo) so that we can support more systems and at the same time simplify the code ; (It's OK not to do so as maybe you are practicing Rust through this project, which is exactly what I'm doing :P);
    • Try using copilot, RustFmt in neovim. These will certainly increase the efficiency.
    opened by EdenQwQ 1
  • [SUGGESTION] Memory usage & Total Memory

    [SUGGESTION] Memory usage & Total Memory

    First I would like to say treefetch is an excellent fetch program, but it has an issue with the displayed memory usage and total memory.

    I did a little research on htop to see how they are calculating it. I have actually done this my self in the Pascal language by using the /proc/meminfo, assuming you are familiar with the /proc/meminfo fields.

    Total physical memory = MemTotal
    Memory Used = (MemTotal + Shmem) - MemFree - Buffers - Cached - SReclaimable

    these as you know are in kb, its just a matter of

    • Total phsical memory / (1024 * 1024)
    • Memory Used / (1024 * 1024)

    or instead of using (1024*1024) just divide by the sum which is 1048576, this will yeild GB format as you already know.

    Anyway I just thought to show you the calculation used by htop and btop ect... to get used memory, as your current implementation is is not adding up to the more common program memory usage programs out there.

    opened by DrunkenAlcoholic 0
  • macOS/Windows version of treefetch

    macOS/Windows version of treefetch

    ( Help wanted )

    treefetch in its current state only supports Linux. Use Rust conditional compilation in the fields.rs file to write separate code for each OS; Windows and macOS. You may also modify the main.rs a bit if needed.

    The fetch information you need to implement for either Windows or macOS are:

    • username / hostname
    • OS name
    • kernel (if applicable)
    • Shell name
    • Uptime
    • Memory usage

    You can make a PR implementing only Windows or only macOS support for now if you want.

    I suggest doing something like this:

    #[cfg(target_os = "linux")]
    pub fn get_memory() -> Result<String, String> {
        ...
    }
    
    #[cfg(target_os = "macos")]
    pub fn get_memory() -> Result<String, String> {
        ...
    }
    
    #[cfg(target_os = "windows")]
    pub fn get_memory() -> Result<String, String> {
        ...
    }
    
    enhancement help wanted rust macos windows linux 
    opened by angelofallars 3
  • [REC] Cache the values

    [REC] Cache the values

    Hello, here's a suggestion

    Implement a caching system that caches the more "stable*" values in a file under /tmp, this method reduces file IO from 4-5 to 1, it could improve performance and make room for future expansion

    ~If you want, i also can implement this feature.~

    Here's an example:

    #cat /tmp/treecache/
    
    hostname : ethereal
    key1 : value1
    key2 : value2
    
    

    And also an argument to delete it:

    treefetch -R :

    Removes the temp file Treefetch

    opened by DisheartenedEthereal 2
Releases(v2.0.0)
  • v2.0.0(Jan 15, 2022)

    đŸŒŗ treefetch - v2.0.0

    A new year comes, and a new release as well! This time, we've added a new tree - a bonsai tree! Bonsai

    • feat: add a bonsai mode, callable with -b --bonsai.
    • feat: add a help message displayed with -h or --help.
    • BREAKING CHANGE: Remove the -xmas argument for displaying the Christmas tree. You must now use either -x or --xmas with a double hyphen. This is to make the argument consistent with conventions in CLI programs.
    • refactor: Our @EdenQwQ refactored the treefetch code to improve correctness with the help of rust-analyzer.
    Source code(tar.gz)
    Source code(zip)
    treefetch(5.14 MB)
  • v1.2.1(Dec 14, 2021)

  • v1.2.0(Dec 14, 2021)

    🎄🎁 treefetch v1.2.0

    Another version, another new feature!

    • feat: Add a Christmas mode. Celebrate the spirit of holiday with this fetch!
      • Call it with treefetch -xmas and enjoy a Christmas tree in your terminal.
    treefetch xmas

    Changes

    • fix: fix potential crashing if the distro name was multiple words (e.g. Arch Linux or Linux Mint)
    • feat: remove dependency on system commands like cat and echo. treefetch no longer calls any outside commands. Now every piece of information is read through Rust's native filesystem and environment variable modules.
    Source code(tar.gz)
    Source code(zip)
    treefetch(5.05 MB)
  • v1.1.0(Dec 13, 2021)

    Changelog

    • Fix: Solve potential crashing bug if the distro name was multiple words (e.g. Arch Linux or Linux Mint)
    • Feat: Add decoration around the fetch
      • Fields are now prefixed with a square
      • A separator has been added between the hostname/username and the fields
    Source code(tar.gz)
    Source code(zip)
    treefetch(5.08 MB)
  • v1.0.0(Dec 13, 2021)

Owner
Angelo-F
Dev @axyl-os | Python | Typescript
Angelo-F
skyfetch ☁ī¸ a system information fetch written in rust

skyfetch ☁ī¸ a system information fetch written in rust requirements cargo install with curl

leo. 31 Dec 15, 2022
Microscopic fetch tool in Rust, for NixOS systems, with special emphasis on speed

Microfetch Stupidly simple, laughably fast fetch tool. Written in Rust for speed and ease of maintainability. Runs in a fraction of a millisecond and

raf 27 Oct 21, 2024
⚡ī¸ Lightning-fast and minimal calendar command line. Written in Rust đŸĻ€

⚡ī¸ Lightning-fast and minimal calendar command line. It's similar to cal. Written in Rust ??

Arthur Henrique 36 Jan 1, 2023
A lightning fast networking solution for roblox.

Zap Zap is a blazingly fast networking solution for Roblox. Features Zap packs data into buffers with no overhead. The same data can be sent using a f

null 18 Dec 31, 2023
F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it.

F-Fetch F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it. First Look ~/.config/ffetch/con

cd 3 Jul 10, 2023
Alternative to *fetch, uwuifies all stats.

owofetch-rs Alternative to *fetch, uwuifies all stats. Installation: Arch: AUR Other Linux distros: Either compile the source with cargo build --relea

nett_hier 6 Dec 26, 2022
A simple cli to clone projects and fetch all projects in a GitHub org..

stupid-git A simple cli to clone projects and update all projects. get all repository from GitHub clone all pull all with git stash Usage create sgit.

Fengda Huang 5 Sep 15, 2022
Fetch and extract HTML's title and description by given link.

extd Fetch and extract HTML's title and description by given link. Usage in Cargo.toml: [dependencies] extd = "0.1.4" Example use extd::extract_td; f

null 4 Nov 4, 2022
Core Lightning plugin for sending zap (NIP-57) notes

Core Lightning plugin for sending zap events You can add the plugin by copying it to CLN's plugin directory or by adding the following line to your co

null 8 Mar 13, 2023
A GPT-3 access point through Nostr, powered by lightning

Geppeto A Nostr based API for GPT-3, powered on Lightning. The bot listens for event kind 29000 (inspired by NIP-9000) and will query the prompt to th

null 5 May 24, 2023
Core lightning (CLN) plugin to watch channel health, gossip health and ping amboss for online status

vitality Core lightning (CLN) plugin to watch channel health, gossip health and ping amboss for online status Installation Building Usage Telegram Opt

null 4 Oct 6, 2023
Simple system monitoring app that runs on terminal. Made purely with Rust.

What is it? RCTOP is a simple WIP system monitoring app that runs purely on terminal and doesn't feature GUI. One can compare it to htop, but more str

Niko Huuskonen 7 Oct 14, 2022
⚡ An extremely fast cross-compatible system information tool.

Lightfetch A extremely fast command-line system information tool written in Rust ⚡ . Gallery Sadly there isn't much to showcase right now. Download Av

bwtecode 2 Sep 12, 2022
⚡ An extremely fast cross-compatible system information tool.

Lightfetch A extremely fast command-line system information tool written in Rust ⚡ . Gallery Sadly there isn't much to showcase right now. Download Av

bwtecode 2 Sep 12, 2022
🚀 Blazing fast and Powerful Discord Token Grabber, no popo made with python

Rusty-Grabber ?? a blazing fast Discord Token Grabber, no popo made with python Fastest Token Grabber ever : Rusty-Grabber> time ./target/release/grab

bishop 5 Sep 1, 2023
Simple joke randomizer from bash.org.pl made as CLI Tool in Rust.

RBashOrg Simple joke randomizer from bash.org.pl made as CLI Tool in Rust. Description Main motivation of this project was to learn basic concepts abo

Krzysztof Szostak 3 Feb 20, 2024
Api testing tool made with rust to use for api developement (Kind of Tui)

Api testing tool made with rust to use for api developement (Kind of Tui) This Rust project provides a simple yet powerful tool for making HTTP reques

Kythonlk 3 Feb 14, 2024
First project in rust which will be to make an accounts system & Leaderboard/Score system

rust-backend this is my first project in rust which will be to make a backend for compsci project it will include: Accounts, Player Achievements (if I

NaughtyDog6000 2 Jul 13, 2023
Modern file system navigation tool on Unix

monat -- Modern file system Navigator įŽ€äŊ“中文 Introduction monat is a Unix shell auxiliary command focusing on the navigation of the file system, especia

Pavinberg 8 May 10, 2022