Fastfetch

repository·dev·Indexed 12 days ago

https://github.com/fastfetch-cli/fastfetch

A high-performance system information tool written in C, similar to neofetch. It provides visually appealing system summaries and is highly customizable via JSONC configuration files. Supports Linux, macOS, Windows, BSD, and Android (Termux).

Tokens
2.4K
Snippets
16
Records
19
Agent score
48%

What's inside Fastfetch

  1. Customize Fastfetch with JSONC

    dev

    Fastfetch configuration is handled via JSONC files. You can use premade configuration files from the presets directory by using the -c <filename> flag.

    Security Warning: Fastfetch includes a Command module that can execute arbitrary shell commands. Always review configuration files from untrusted sources before using them to prevent malicious code execution.

  2. Display images on Windows

    dev

    Image support on Windows depends on your terminal emulator and protocol support.

    mintty and Wezterm (iTerm protocol)

    Use the iterm type in config.jsonc:

    {
      "logo": {
        "type": "iterm",
        "source": "C:/path/to/image.png",
        "width": 30
      }
    }

    Windows Terminal (Sixel protocol)

    Windows Terminal requires the sixel type.

    If using MSYS2:

    1. Install ImageMagick: pacman -S mingw-w64-<subsystem>-x86_64-imagemagick
    2. Configure config.jsonc:
    {
      "logo": {
        "type": "sixel",
        "source": "C:/path/to/image.png",
        "width": 30
      }
    }

    Note: Do not use ~ in the source path; use absolute Windows paths.

    If using Scoop or direct binary:

    1. Manually convert your image to .sixel format.
    2. Configure config.jsonc:
    {
      "logo": {
        "type": "raw",
        "source": "C:/path/to/image.sixel",
        "width": 30,
        "height": 15
      }
    }
  3. Install Fastfetch on BSD and Android

    dev

    Fastfetch is available for various BSD systems and Android via Termux:

    • FreeBSD / DragonFly BSD: pkg install fastfetch
    • NetBSD: pkgin in fastfetch
    • OpenBSD: pkg_add fastfetch (Snapshots only)
    • Android (Termux): pkg install fastfetch
    pkg install fastfetch
  4. Install Fastfetch on Linux

    dev

    Fastfetch is available in many Linux distributions. It is recommended to use the latest version as older versions may not be supported.

    Common installation methods:

    • Ubuntu: Use the PPA ppa:zhangsongcui3371/fastfetch (for 22.04+) or download the .deb package from the GitHub releases page.
    • Debian/Ubuntu: apt install fastfetch (Debian 13+ or Ubuntu 25.04+).
    • Arch Linux: pacman -S fastfetch
    • Fedora: dnf install fastfetch
    • Alpine: apk add --upgrade fastfetch
    • NixOS: nix-shell -p fastfetch
    • openSUSE: zypper install fastfetch

    If your distribution does not have a package or has an outdated one, you can use linuxbrew via brew install fastfetch.

    pacman -S fastfetch
  5. Install Fastfetch on Windows

    dev

    Fastfetch can be installed on Windows using several package managers or by downloading the archive directly from GitHub releases.

    • Scoop: scoop install fastfetch
    • Chocolatey: choco install fastfetch
    • Winget: winget install fastfetch
    • MSYS2 MinGW: pacman -S mingw-w64-<subsystem>-<arch>-fastfetch
    winget install fastfetch
  6. Generate Fastfetch Configuration Files

    dev

    You can generate configuration files to customize your output. Fastfetch uses JSONC (JSON with comments).

    • Minimal config: fastfetch [-s <module1>[:<module2>]] --gen-config [</path/to/config.jsonc>]
    • Full config: Use the --gen-config-full flag to generate a complete configuration file containing all optional options.
    fastfetch --gen-config-full
  7. Generate a default configuration file

    dev

    Fastfetch does not create a configuration file automatically. To create a starting point for customization, use the --gen-config flag. The generated file is saved to ~/.config/fastfetch/config.jsonc by default.

    fastfetch --gen-config
  8. Install Fastfetch on various platforms

    dev

    Fastfetch can be installed using various package managers depending on your operating system:

    Linux

    • Debian 13+ / Ubuntu: apt install fastfetch
    • Arch Linux: pacman -S fastfetch
    • Fedora: dnf install fastfetch
    • openSUSE: zypper install fastfetch
    • Linuxbrew: brew install fastfetch

    macOS

    • Homebrew: brew install fastfetch
    • MacPorts: sudo port install fastfetch

    Windows

    • Scoop: scoop install fastfetch
    • Chocolatey: choco install fastfetch
    • Winget: winget install fastfetch
    • MSYS2: pacman -S mingw-w64-<subsystem>-<arch>-fastfetch

    BSD Systems

    • FreeBSD: pkg install fastfetch
    • NetBSD: pkgin install fastfetch
    • OpenBSD: pkg_add fastfetch

    Android (Termux)

    • pkg install fastfetch
  9. Customize Fastfetch with JSONC

    dev

    Fastfetch uses JSONC (JSON with Comments) for configuration. You can customize the output by defining modules and their formats in a configuration file.

    Configuration Tips

    • Editor: Use an editor that supports JSON schema (like VSCode) for better autocompletion.
    • Schema Mirror: If you have difficulty connecting to GitHub for schema validation, replace the $schema value in your config with: https://gitee.com/carterl/fastfetch/raw/dev/doc/json_schema.json
    • Presets: You can load predefined configurations using the -c <filename> flag.

    Module Formatting Example

    To customize how a specific module displays data (e.g., showing only the GPU name), use the format key within the module object.

    {
      "modules": [
        {
          "type": "gpu",
          "format": "{name}"
        }
      ]
    }
  10. Customize module output using format

    dev

    You can control how specific modules display information using the format key within a module object in your config.jsonc. This allows you to pick specific fields (like just the name) and hide others.

    To see available format strings for a specific module, use fastfetch -h <module>-format (e.g., fastfetch -h gpu-format).

    Example: Configuring the gpu module to only show the GPU name.

    {
        "modules": [
            {
                "type": "gpu",
                "format": "{name}"
            }
        ]
    }