exfetch
#+OPTIONS: toc:nil #+TITLE: Exfetch /a shell-extensible fetching utility aiming to be a spiritual successor to [[https://codeberg.org/izder456/crfetch][crfetch]], written in crystal/ /fork of https://codeberg.org/Izder456/exfetch, with the focus on the windows build/
[[https://ci.codeberg.org/repos/14871][https://ci.codeberg.org/api/badges/14871/status.svg]] [[https://codeberg.org/Izder456/exfetch/src/branch/main/LICENSE][https://img.shields.io/badge/license-ISC-blue.svg]] [[https://codeberg.org/Izder456/exfetch/pulls][https://img.shields.io/badge/PRs-welcome-brightgreen.svg]] [[https://codeberg.org/Izder456/exfetch/src/branch/main/CONTRIBUTING.org][https://img.shields.io/badge/docs-contributing-purple.svg]]
#+html:
[[https://codeberg.org/izder456/exfetch/media/branch/main/assets/screenshot.png][(View screenshot)]]
- Features
- Predictable, consistent output across systems
- Extensible via shell scripting and flags
- No auto-detection "magic" - you control the output
- Supported Operating Systems
- Linux
- FreeBSD
- GhostBSD
- OpenBSD
- NetBSD
- Motivation ** Why Replicate Cr(y)fetch?
- I wanted crfetch's simplicity with more customization:
- Custom label ordering
- Custom ASCII selection from file descriptors
- Even more shell-script composability
** Why the Name "Exfetch"?
- "Ex" stands for extensible - modify behavior through flags/shell
- (The accidental name stuck! Retroactively became "ex"-tended crfetch.)
- Philosophy
- Predictability: Same defaults everywhere. No assumptions about your OS/distro.
- Composability: Pipe, script, or alias to create your ideal fetch.
- No Auto-Detection: Unlike neofetch, ASCII art never changes unless you specify it.
- Example: Shell Composability Create dynamic configurations with shell features: #+BEGIN_SRC bash
Lowercase labels + purple text + cowsay fortune ASCII
alias exfetch="exfetch -l -c 5 -a <(cowsay $(fortune -o))"
Random ASCII art from a directory
alias exfetch-random="exfetch -a "$(ls ~/ascii_arts/* | shuf -n 1)"" #+END_SRC
Note: =<(command)= requires Bash/Zsh. For other shells, use temporary files.
#+html:
[[https://codeberg.org/izder456/exfetch/media/branch/main/assets/screenshot2.png][(View custom example)]]
- Installation ** Dependencies
- Crystal >= 1.17.1 [[https://crystal-lang.org/install/]]
- Shards >= 0.19.1 (usually included with Crystal)
- A POSIX =make=
** Build from Source #+BEGIN_SRC $ git clone --recurse-submodules https://codeberg.org/izder456/exfetch $ cd exfetch $ make #+END_SRC
OPTIONAL: you can set environment variables to change how it builds: #+BEGIN_SRC $ make STATIC=on # build with static compilation using crystal's --static (default is "off") $ make MULTITHREADED=on # build with multithreading using crystal's -Dpreview_mt (default is "off") $ make HARDENING=on # build with RELRO hardening (default is "off") $ make STATIC=on MULTITHREADED=on # build with both multithreading and static compilation #+END_SRC
** Run without installing #+BEGIN_SRC $ make run #+END_SRC
** Install Binary #+BEGIN_SRC
make install
#+END_SRC
-
Usage #+BEGIN_SRC shell Usage: exfetch [options] -l, --lowercase Use lowercase labels -n, --nerd-icons Use Nerd Font icons -r, --right-justify Right justify labels -s SEP, --separator=SEP Separator between labels and values -o ORDER, --order=ORDER Specify label order (comma-separated) -O, --list-labels List available labels for ordering -c COLOR, --color=COLOR Text color name or code (0-15) -C, --list-colors List available colors -a ASCII, --ascii=ASCII ASCII art name or file path -A, --list-ascii List built-in ASCII art -P NAME, --preview-ascii=NAME Preview ASCII art -p PADDING, --padding=PADDING Padding around ASCII art (left and right) (only last digit used) -h, --help Show help #+END_SRC
-
nix flake support The [[file:flake.nix][flake.nix]] file in the project root provides support for the nix package manager.
Some things that can be done with this, assuming =nix= is installed and current directory is the root of the checked-out repo following the "Build from Source" section of this file:
- =nix build=: build a nix packaging from the repo checkout #+begin_src $ nix build $ readlink ./result $ tree ./result/ $ ./result/bin/exfetch #+end_src
- =nix shell=: enter a bash shell with the nix packaged built and "installed"(in $PATH) #+begin_src $ nix shell $$ exfetch #+end_src
- =nix develop=: enter a bash shell with the build environment available(build dependencies, nix packaging phases): #+begin_src $ nix develop $$ echo $unpackPhase $buildPhase $installPhase $checkPhase $$ crystal ... $$ shards ... #+end_src
With only nix in hand, also possible to do any of these "remotely" without ever cloning the repo, by specifying =git+https://codeberg.org/Izder456/exfetch?ref=main= as the argument to those commands:
#+begin_src
fetch, build and execute exfetch using the nix interface
$ nix run 'git+https://codeberg.org/Izder456/exfetch?ref=main'
enter a shell with exfetch executable available, built from source from current state of repo main branch
$ nix shell 'git+https://codeberg.org/Izder456/exfetch?ref=main'
same but for some other git ref
$ nix shell 'git+https://codeberg.org/Izder456/exfetch?ref=some-branch' #+end_src
+Note that =exfetch= is also available in nixpkgs+ (not yet), but the package is maintained by someone else and built from semantic version bumps, while this flake provides a nix build for each commit (i.e. is not semantically versioned).
- Contributing
- Report issues: [[https://codeberg.org/izder456/exfetch/issues]]
- Submit ASCII art: [[https://codeberg.org/izder456/exfetch/pulls]]
- Feature requests welcome!
** Got an idea? [[CONTRIBUTING.org][See contributor's guide]]
- License ISC Licensed. See full text below: #+BEGIN_SRC txt :tangle LICENSE ISC License
Copyright 2025 izzy Meyer izder456@disroot.org
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #+END_SRC
- Credits
- ASCII art adapted from [[https://github.com/dylanaraps/pfetch][pfetch]] (MIT Licensed)
- Inspiration from [[https://codeberg.org/izder456/crfetch][crfetch]]
exfetch
- 0
- 0
- 0
- 0
- 1
- 26 days ago
- December 27, 2025
ISC License
Fri, 23 Jan 2026 19:51:25 GMT