{"id":50512399,"url":"https://github.com/im-ng/zf","last_synced_at":"2026-06-02T21:03:09.398Z","repository":{"id":356943853,"uuid":"1097419569","full_name":"im-ng/zf","owner":"im-ng","description":"System information CLI tool written in Zig (AI)","archived":false,"fork":false,"pushed_at":"2026-05-10T14:50:39.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T16:29:39.150Z","etag":null,"topics":["ai-assisted","zig","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/im-ng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-16T06:13:15.000Z","updated_at":"2026-05-10T14:50:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/im-ng/zf","commit_stats":null,"previous_names":["im-ng/zf"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/im-ng/zf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-ng%2Fzf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-ng%2Fzf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-ng%2Fzf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-ng%2Fzf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/im-ng","download_url":"https://codeload.github.com/im-ng/zf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-ng%2Fzf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33835766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assisted","zig","zig-package"],"created_at":"2026-06-02T21:03:03.806Z","updated_at":"2026-06-02T21:03:09.391Z","avatar_url":"https://github.com/im-ng.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zf\n\nA neofetch-inspired system information CLI tool written in Zig.\n\nDisplays OS, CPU, GPU, memory, packages, DE, WM, and system info alongside a distro-specific ASCII logo.\n\n## Features\n\n- Distro-specific ASCII art logos (Debian, Ubuntu, Arch, Fedora, macOS, and more) with ANSI colors\n- Automatic light/dark terminal theme detection — adjusts label and value colors for readability\n- Falls back to a default **zf** logo for unrecognized distros\n- L1/L2/L3 cache info from sysfs (Linux) or sysctl (macOS)\n- GPU detection via nvidia-smi, lspci, or system_profiler\n- Package counts from dpkg, rpm, pacman, apk, snap, flatpak (Linux) or brew, port (macOS)\n- Desktop Environment detection with version (GNOME, KDE Plasma, XFCE, Cinnamon, MATE, LXQt)\n- Window Manager detection with version\n- Shell detection with version (bash, zsh, fish, etc.)\n- Side-by-side logo + info layout (like neofetch)\n- `--all` mode shows all info without logo\n- Category filters: `--cpu`, `--mem`, `--os`\n- Zero external dependencies\n\n## Requirements\n\n- Zig 0.15.1\n\n## Build\n\n```bash\nzig build\n```\n\n## Usage\n\n```bash\n# Default: neofetch-style summary with logo\nzf\n\n# Category filters\nzf --cpu          # Detailed CPU info + GPU\nzf --mem          # Memory info only\nzf --os           # OS, uptime, packages, shell, DE, WM info\n\n# All info, no logo\nzf --all\n\n# General\nzf --help\nzf --version\n```\n\n## Options\n\n| Option      | Short | Description                          |\n| ----------- | ----- | ------------------------------------ |\n| `--help`    | `-h`  | Display help message and exit        |\n| `--version` | `-v`  | Display version information and exit |\n| `--info`    | `-i`  | Show all information (default)       |\n| `--cpu`     | `-c`  | Show only CPU information            |\n| `--mem`     | `-m`  | Show only memory information         |\n| `--os`      | `-o`  | Show only OS information             |\n| `--all`     | `-a`  | Show all information without logo    |\n\n## Display Sections\n\n### Default (with logo)\n\nOS, Kernel, Hostname, Uptime, Packages, Shell (with version), DE (with version), WM (with version), Terminal, User, CPU, CPU Cores, CPU Speed, L1/L2/L3 Cache, GPU, Memory (used/total)\n\n### `--os`\n\nOS, Kernel, Hostname, Uptime, Packages, Shell (with version), DE (with version), WM (with version), Terminal, User\n\n### `--cpu`\n\nCPU, CPU Arch, CPU Vendor, CPU Family, CPU Model, CPU Cores, CPU Speed, Microcode, L1/L2/L3 Cache, GPU\n\n### `--mem`\n\nTotal Memory, Free Memory\n\n### `--all`\n\nAll fields, no logo\n\n## Examples\n\n### Default (`zf`)\n\n```\n       _,met$$$$$gg.          OS: Debian GNU/Linux 13 (trixie)\n    ,g$$$$$$$$$$$$$$$P.      Kernel: 7.0.3-zabbly+\n  ,g$$P\"        \"\"\"Y$$..     Hostname: ryzen\n ,$$P'              `$$$.    Uptime: 3h 36m\n',$$P       ,ggs.     `$$b:  Packages: 2712 (dpkg), 39 (flatpak)\n`d$$'     ,$$P   .    $$$    Shell: bash 5.2.37\n $$P      d$$'     ,    $$P  DE: GNOME 46\n $$:      $$$.   -    ,d$$'  WM: mutter 46.0\n $$;      Y$b._   _,d$P'     Terminal: xterm-256color\n Y$$.    `.\"Y$$$$P\"          User: ng\n `$$b      \"-.__              CPU: AMD Ryzen 5 2600 Six-Core Processor\n  `Y$$                        CPU Cores: 6\n    `Y$$.                     CPU Speed: 3659 MHz\n      `$$b.                   L1 Cache: 32K\n        `Y$$b.                L2 Cache: 512K\n           \"Y$b._             L3 Cache: 8192K\n               \"\"\"            GPU: NVIDIA GeForce RTX 4060 Ti\n                             Memory: 8.2 GiB / 15.5 GiB\n```\n\n### CPU only (`zf --cpu`)\n\n```\n       _,met$$$$$gg.          CPU: AMD Ryzen 5 2600 Six-Core Processor\n    ,g$$$$$$$$$$$$$$$P.      CPU Arch: x86_64\n  ,g$$P\"        \"\"\"Y$$..     CPU Vendor: AuthenticAMD\n ,$$P'              `$$$.    CPU Family: 23\n',$$P       ,ggs.     `$$b:  CPU Model: AMD Ryzen 5 2600 Six-Core Processor\n`d$$'     ,$$P   .    $$$    CPU Cores: 6\n $$P      d$$'     ,    $$P  CPU Speed: 2461 MHz\n $$:      $$$.   -    ,d$$'  Microcode: 0x800820e\n $$;      Y$b._   _,d$P'     L1 Cache: 32K\n Y$$.    `.\"Y$$$$P\"          L2 Cache: 512K\n `$$b      \"-.__              L3 Cache: 8192K\n  `Y$$                        GPU: NVIDIA GeForce RTX 4060 Ti\n    `Y$$.\n      `$$b.\n        `Y$$b.\n           \"Y$b._\n               \"\"\"\n```\n\n### All info (`zf --all`)\n\n```\nOS: Debian GNU/Linux 13 (trixie)\nKernel: 7.0.3-zabbly+\nHostname: ryzen\nUptime: 3h 37m\nPackages: 2712 (dpkg), 39 (flatpak)\nShell: bash 5.2.37\nDE: GNOME 46\nWM: mutter 46.0\nTerminal: xterm-256color\nUser: ng\nCPU: AMD Ryzen 5 2600 Six-Core Processor\nCPU Arch: x86_64\nCPU Vendor: AuthenticAMD\nCPU Family: 23\nCPU Model: AMD Ryzen 5 2600 Six-Core Processor\nCPU Cores: 6\nCPU Speed: 3592 MHz\nMicrocode: 0x800820e\nL1 Cache: 32K\nL2 Cache: 512K\nL3 Cache: 8192K\nGPU: NVIDIA GeForce RTX 4060 Ti\nTotal Memory: 15.5 GiB\nFree Memory: 7.3 GiB\n```\n\n## Exit Codes\n\n| Code | Meaning          |\n| ---- | ---------------- |\n| 0    | Success          |\n| 1    | General error    |\n| 2    | Invalid argument |\n\n## Distro Logos\n\n| Distribution       | Logo  | Label Color |\n| ------------------ | ----- | ----------- |\n| Debian             | Tux   | Red         |\n| Ubuntu             | Circle| Red         |\n| Arch Linux         | Arch  | Cyan        |\n| Fedora             | Hat   | Blue        |\n| macOS              | Apple | Green       |\n| Linux Mint         | Circle| Green       |\n| Pop!\\_OS           | Circle| Cyan        |\n| openSUSE           | Circle| Green       |\n| Manjaro            | Arch  | Green       |\n| Gentoo             | Circle| Magenta     |\n| NixOS              | Circle| Blue        |\n| Other (default)   | zf    | Cyan        |\n\nDetection uses the `ID=` field from `/etc/os-release` or `DISTRIB_ID=` from `/etc/lsb-release`.\n\n## Theme Detection\n\n`zf` automatically detects whether your terminal is using a light or dark theme:\n\n1. Checks `$COLORSCHEME` environment variable (set by many terminals)\n2. Checks `$TERM_THEME` environment variable\n3. Checks `$BAT_THEME` for \"light\" keyword\n4. On macOS: runs `defaults read -g AppleInterfaceStyle` — if \"Dark\" is returned, dark theme; otherwise light theme\n5. Defaults to **dark theme** if no detection succeeds\n\nOn light themes, labels use bold dark colors and values use black for maximum readability.\n\n## Data Sources\n\n### Linux\n\n| Field | Source |\n|-------|--------|\n| OS name, version, distro_id | `/etc/os-release` |\n| Kernel | `/proc/version`, fallback `uname -r` |\n| Hostname | `/etc/hostname`, fallback `uname -n` |\n| CPU info | `/proc/cpuinfo` |\n| L1/L2/L3 cache | `/sys/devices/system/cpu/cpu0/cache/indexN/{level,size,type}` |\n| Memory | `/proc/meminfo` |\n| Uptime | `/proc/uptime` |\n| GPU | `nvidia-smi`, `lspci`, `/proc/driver/nvidia/gpus/` |\n| Packages | `dpkg-query`, `rpm -qa`, `pacman -Q`, `apk info`, `snap list`, `flatpak list` |\n| DE | `$XDG_CURRENT_DESKTOP`, `$DESKTOP_SESSION`; version via `gnome-shell --version`, `plasmashell --version`, etc. |\n| WM | `/proc/*/comm` scan + `--version` |\n| Shell | `$SHELL` + `$SHELL --version` |\n| User, Terminal | Environment variables |\n\n### macOS\n\n| Field | Source |\n|-------|--------|\n| OS name, version | `SystemVersion.plist` |\n| Kernel, Hostname | `uname()` |\n| CPU info | `sysctl` (machdep.cpu.*, hw.ncpu) |\n| L1/L2/L3 cache | `sysctl` (hw.l1dcachesize, hw.l2cachesize, hw.l3cachesize) |\n| Memory | `sysctl hw.memsize` |\n| GPU | `system_profiler SPDisplaysDataType` |\n| Packages | `brew list`, `port installed` |\n| DE | \"Aqua\" + `sw_vers -productVersion` |\n| WM | \"Quartz Compositor\" + `sw_vers -productVersion` |\n| Uptime | `sysctl kern.boottime` |\n| Shell | `$SHELL` + `$SHELL --version` |\n\n## Project Structure\n\n```\nsrc/\n├── main.zig           # CLI entry point, platform dispatch, shell version\n├── info.zig           # SystemInfo struct, extractVersion(), runVersionCmd()\n├── cli.zig            # Arg parsing, printHelp, printVersion\n├── output.zig         # Side-by-side formatting, DisplayFlags\n├── logos.zig           # ASCII logos, getLogo(), visibleLen()\n├── linux.zig           # Linux module index\n├── linux/cpu.zig       # /proc/cpuinfo + sysfs cache parser\n├── linux/memory.zig    # /proc/meminfo parser\n├── linux/os.zig        # /etc/os-release, /etc/lsb-release parser\n├── linux/utils.zig     # /proc/uptime parser\n├── linux/gpu.zig       # nvidia-smi, lspci, nvidia proc GPU detection\n├── linux/packages.zig  # dpkg, rpm, pacman, apk, snap, flatpak counting\n├── linux/desktop.zig   # DE from env vars + version, WM from /proc scan + version\n├── macos.zig           # macOS module index\n├── macos/cpu.zig       # sysctl CPU + cache info\n├── macos/memory.zig    # sysctl hw.memsize\n├── macos/os.zig        # SystemVersion.plist parser, uname\n├── macos/utils.zig     # env vars, getcwd, uptime via sysctl\n├── macos/gpu.zig       # system_profiler SPDisplaysDataType\n├── macos/packages.zig  # brew, port counting\n├── macos/desktop.zig   # Aqua + version, Quartz Compositor + version\n├── root.zig            # Library root, re-exports\n└── tests/test_suite.zig\n```\n\n## Testing\n\n```bash\nzig build test\n```\n\n## Attribution\n\n_This entire project coded through GLM 5.1_\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-ng%2Fzf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim-ng%2Fzf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-ng%2Fzf/lists"}