This is Cupid, the cat.
Cupid the cat loves Linux and Windows!
cupidfetch is a system information retrieval tool written in C for Linux and Windows systems. It's a beginner-friendly, work-in-progress hobby project aimed at learning and exploring programming concepts.
✔️ Fetches and displays various system details:
- Hostname
- Distribution (with auto-add for unknown distros - see below!)
- Kernel version
- Uptime
- Package count
- Package count (with package-manager coverage map + safer fallback logic)
- Shell
- Terminal
- Desktop environment
- Window manager
- Theme
- Icons
- Display server (Wayland/X11)
- Network status (interface state, local/public IP with IPv4/IPv6 local detection)
- Battery level
- GPU
- Username
- Memory usage
- CPU model + topology (and usage where available)
- Storage/disk usage per mount
- Signal handling for window resize on Linux/Unix terminals (
SIGWINCH) - And more
✔️ Auto-add unknown distros to distros.def (Linux):
If cupidfetch detects an unrecognized Linux distro in /etc/os-release, it automatically inserts a new line into distros.def (under an "auto added" section) so the distro becomes recognized in subsequent runs.
✔️ Per-distro ASCII logos with truecolor + fallback:
- Shows distro-specific ASCII logos for common distros/OSes (e.g., Ubuntu, Debian, Arch, Fedora, Manjaro, Alpine, Windows 10/11)
- Uses truecolor logo tint when terminal supports it (
COLORTERM=truecoloror24bit) - Falls back to a generic logo when distro art is unavailable
✔️ Built for beginners:
- Simple code
- Easy to understand and contribute
Supported Distros / OSes:
- Debian (Ubuntu, elementary, Mint) [Verified ✔️]
- Arch (Manjaro, Artix, EndeavourOS) [Verified ✔️]
- Fedora [Verified ✔️]
- Windows 10 / Windows 11 [Supported]
- Others are in
data/distros.def(now automatically updated if not recognized)
cupidfetch relies on the following components and tools:
-
C Compiler:
Written in C, requiring a C compiler. The recommended compiler is GCC. -
cupidconf:
cupidfetch now uses cupidconf instead of inih!- Allows more flexible configuration parsing, supporting wildcards (
*) for key matching, list retrieval, etc.
- Allows more flexible configuration parsing, supporting wildcards (
-
Git:
- For cloning the repository.
Often available via your distro’s package manager. On Debian/Ubuntu-based systems:
sudo apt update && sudo apt install build-essentialInstall through your distro’s package manager. On Debian/Ubuntu-based systems:
sudo apt install git-
Clone the repository:
git clone https://github.com/frankischilling/cupidfetch
-
Compile:
- Linux/macOS (with
make):make
- Windows (MinGW GCC, no
makerequired):$src = Get-ChildItem -Recurse -File src -Filter *.c | ForEach-Object { $_.FullName } gcc -o cupidfetch.exe $src libs/cupidconf.c -O2 -DNDEBUG -Ilibs -D_WIN32_WINNT=0x0601 -lws2_32
- If you have
makeon Windows:make windows
- Linux/macOS (with
-
Run:
- From the current directory:
./cupidfetch
- JSON mode (script-friendly):
./cupidfetch --json
- Windows executable:
.\cupidfetch.exe .\cupidfetch.exe --json
- From anywhere (optional):
sudo mv cupidfetch /usr/local/bin cupidfetch
- From the current directory:
-
Debug:
- Use
make clean asanormake clean ubsanto check for overflows/memory leaks or undefined behavior.
- Use
-
Run lightweight tests:
make testruns all lightweight parser/detector tests.make test-parserscovers distro definition +/etc/os-releaseID parsing (Linux path).make test-configcovers config parsing (modules, units, and boolean flags).make test-unitscovers byte-to-unit conversion helpers.make test-perfruns a startup/runtime performance benchmark (JSON mode, core module profile) and fails if mean runtime exceeds budget.
-
Track performance over time:
- Default benchmark budget is mean
<= 150msacross 20 runs (after warmup). - Tune benchmark knobs via env vars:
CUPIDFETCH_PERF_MAX_MEAN_MS(e.g.200)CUPIDFETCH_PERF_RUNS(e.g.30)CUPIDFETCH_PERF_WARMUP(e.g.5)
- Example:
CUPIDFETCH_PERF_MAX_MEAN_MS=200 CUPIDFETCH_PERF_RUNS=30 make test-perf
- Default benchmark budget is mean
-
View the Output:
Prints system info such as distro, kernel, uptime, etc., and displays ASCII art for recognized distros.
make cupidfetchnow builds with optimization flags by default:-O2 -DNDEBUG.- Override if needed, for example:
make CFLAGS='-O3 -march=native'
--jsonprints a single JSON object and exits (no screen clear, no resize loop).--force-distro <name>overrides detected distro for logo/display testing.-h,--helpshows usage.
You can use the install-config.sh script to create a configuration file for cupidfetch.
- Location:
or, if
${XDG_CONFIG_HOME}/cupidfetch/cupidfetch.conf$XDG_CONFIG_HOMEis not set:On Windows,$HOME/.config/cupidfetch/cupidfetch.conf%APPDATA%/cupidfetch/cupidfetch.confis used when available.
# List of modules (space-separated)
modules = hostname username distro linux_kernel uptime pkg term shell de wm theme icons display_server net ip battery gpu memory cpu storage
# Memory display settings
memory.unit-str = MB
memory.unit-size = 1000000
# Storage display settings
storage.unit-str = GB
storage.unit-size = 1000000000
# Network display settings
# false = mask public IP (default), true = show full public IP
network.show-full-public-ip = falseAdjust as needed; e.g., switch units to test different scale factors.
Whenever cupidfetch encounters a distro that isn’t listed in data/distros.def, it:
- Warns you that the distro is unknown.
- Inserts a new
DISTRO("shortname", "Capitalized", "")entry intodistros.def, under an/* auto added */comment. - Re-parses
distros.def, so subsequent runs show the proper distro name.
Note: Package counting now prioritizes an internal distro→package-manager coverage map and direct, safer counting strategies (filesystem/database reads where possible). The distro command in
distros.defis now a fallback and shell-heavy commands are intentionally ignored.
cupidfetchnow picks a logo by detected distro name.- If your terminal supports truecolor, logos are rendered with distro-tinted 24-bit ANSI color.
- If no distro-specific logo exists,
cupidfetchprints a generic fallback logo instead of failing.
If you prefer manual updates (or want to tweak the auto-added lines), edit data/distros.def. For example, to add “cupidOS” which uses dpkg:
DISTRO("ubuntu" , "Ubuntu" , "")
DISTRO("cupidOS", "cupidOS", "")
However, thanks to auto-add, you often won’t need to touch this file for new distros-cupidfetch will do it for you!
If cupidfetch cannot create a log file at .../cupidfetch/log.txt, it falls back to stderr.
To suppress logging:
cupidfetch 2> /dev/null- Linux or Windows
- C compiler (GCC recommended)
- Basic knowledge of C programming
- Curiosity for exploring system information
Everyone is welcome-beginner or expert!
- Discord: Join here
- Beginners: Great project to learn, ask questions, and try new ideas.
- Experienced devs: Help refine, optimize, or expand coverage for more distros.
- Add ASCII art for each distro (e.g., “Arch kitten saying ‘I use Arch btw’”)
- Add colors/user theming
- Fix alignment for proper ASCII art display
- Add Unicode icons (Nerd Fonts?)
-
make install - Arch Linux AUR package
- Per-module config sections
- Implement dynamic WM & DE detection (remove hard-coded checks)
- Wayland
- Auto-detect and update distros in
distros.def - Signal Handling for Window Resize (
SIGWINCH) - Improve distro detection
- Add memory info
- Add storage info
- Fix terminal info, DE, and WM detection
- Implement a config system (migrated to cupidconf)
- Clean up code and improve display formatting
This project is a continuous work-in-progress for learning and experimentation. Expect frequent changes or refactoring as new features are added.



