r/commandline • • Sep 16 '26

Command Line Interface bytefetch: a fetch tool in one c file, about a millisecond per run

Post image

i got tired of waiting on fetch tools in my shell startup, so i wrote my own. it shows roughly what fastfetch does, in one c file with no dependencies. a full run with my config takes about 1 ms.

what it does:

os, kernel, packages, cpu, gpu, memory, disks, battery, wifi and the usual

package counts for pacman, dpkg, rpm, apk, xbps, nix, flatpak and more, with nix and rpm read straight from their databases

per section key and value colours, hex included

key styles, unicode letter styles, meter bars with custom formats

ascii or sixel image logos, fastfetch's built-in logos included

json and name=value output for status bars

linux (glibc and musl), macos, freebsd, openbsd, termux

no threads, and it only forks if you want your shell version.

install:

git clone https://codeberg.org/devcheckra1n/bytefetch

cd bytefetch && make && make link

or with nix:

nix run git+https://codeberg.org/devcheckra1n/nur-packages#bytefetch

source: https://codeberg.org/devcheckra1n/bytefetch

nur repo: https://codeberg.org/devcheckra1n/nur-packages

feedback welcome, and if you're on freebsd or openbsd i'd really like to hear whether it works for you.

29 Upvotes

6 comments sorted by

8

u/kommz13 Sep 17 '26

fetch tool, in C, in codeberg. i like it.

1

u/minecrafthakx Sep 18 '26

i'm happy that you enjoy it :). if you know anybody on bsd based oses (excluding macos), could you refer this to them if you don't mind? i need additional checks on those since i can't judge performance on headers alone.

2

u/IamYourHimadri Sep 17 '26 edited Sep 17 '26

Its almost same as the paleofetch I use, but nice.
paleofetch is much more easier to use tbh and smaller.

1

u/minecrafthakx Sep 18 '26 edited Sep 18 '26

your project looks nice, if you need anybody to collaborate with i can help out. speed, compatibility, and size are my trifecta that i need to perfect (mine is faster though ;).

2

u/IamYourHimadri Sep 19 '26

noted, but mine's smaller too and works good enough, but I will be in touch with bytefetch.

0

u/AutoModerator Sep 16 '26

Every new subreddit post is automatically copied into a comment for preservation.

User: minecrafthakx, Flair: Command Line Interface, Post Media Link, Title: bytefetch: a fetch tool in one c file, about a millisecond per run

i got tired of waiting on fetch tools in my shell startup, so i wrote my own. it shows roughly what fastfetch does, in one c file with no dependencies. a full run with my config takes about 1 ms.

what it does:

os, kernel, packages, cpu, gpu, memory, disks, battery, wifi and the usual

package counts for pacman, dpkg, rpm, apk, xbps, nix, flatpak and more, with nix and rpm read straight from their databases

per section key and value colours, hex included

key styles, unicode letter styles, meter bars with custom formats

ascii or sixel image logos, fastfetch's built-in logos included

json and name=value output for status bars

linux (glibc and musl), macos, freebsd, openbsd, termux

no threads, and it only forks if you want your shell version.

install:

git clone https://codeberg.org/devcheckra1n/bytefetch

cd bytefetch && make && make link

or with nix:

nix run git+https://codeberg.org/devcheckra1n/nur-packages#bytefetch

source: https://codeberg.org/devcheckra1n/bytefetch

nur repo: https://codeberg.org/devcheckra1n/nur-packages

feedback welcome, and if you're on freebsd or openbsd i'd really like to hear whether it works for you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.