archey4

HorlogeSkynetGPL-3.0活跃维护

在终端里用 ASCII 艺术展示 Linux/BSD 系统信息,是原版 Archey 的维护分支,适合替代 neofetch、screenfetch 快速查看配置。

💻 Maintained fork of the original Archey (Linux) system tool

v4.15.0.0发布于 2024-09-30 20:55 UTC344star41fork同步于 2026-11-10 23:59 UTC

怎么上手

由 README 提炼,执行前请确认
pip3 install archey4
archey --help
硬件要求按 README 说明

README 未说明显存或 GPU 要求;需要 python3(>= 3.6)及 python3-distro、python3-netifaces,PyPy 亦可替代 CPython。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Python 写的轻量系统信息工具,一条命令显示发行版、内核、IP、温度等概览

在终端里用 ASCII 艺术展示 Linux/BSD 系统信息,是原版 Archey 的维护分支,适合替代 neofetch、screenfetch 快速查看配置。

核心能力

  • 并行加载各信息条目并保持输出顺序
  • 检测本地与公网 IP 地址
  • 支持 JSON 输出与屏幕截图
  • 通过 config.json 自定义条目与顺序
  • 覆盖 BSD、macOS、Linux 和 WSL 平台

容易踩的坑

温度检测在 macOS 上需额外安装 iStats 或 osx-cpu-temp,GPU 检测需 pciutils/pciconf;缺少 procps 会导致多个条目无法正常工作;配置文件按 /etc、用户目录、当前目录顺序覆盖,本地 config.json 会盖掉系统设置。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v4.15.0.0
  1. v4.15.0.0最新正式版2024-09-30 · 2024-09-30 20:55 UTC

    Added

    • GPU support for Raspberry Pi
    • Model support for Raspberry Pi 5+
    • none logo style to completely hide distribution logo
    • DesktopEnvironment support for Windows
    • WindowManager support for Windows
    • WindowManager support for some Wayland compositors

    Changed

    • Model honors /proc/device-tree/model when it exists
    • Packages shows counts divided by package managers
    • DesktopEnvironment now honors environment (including XDG_CURRENT_DESKTOP)

    Removed

    • _distribution protected attribute from Output class

    Security

    • AppArmor confinement profile (included in Debian and AUR packages)
  2. v4.14.3.02024-04-06 · 2024-04-06 08:00 UTC
    查看更新说明

    Added

    • Official Armbian distribution support (see 0a970c010f57c9bccb268ccb1ef2ac57680824da, will require next version of python3-distro [see python-distro/distro#366])
    • Official EndeavourOS distribution support (see #140)
    • (Nerd Fonts) icons for entries support (see #144)
    • Display server protocol to WindowManager (see #145)
    • New Red Hat logo "The Hat" (see #148)

    Changed

    • Allow df output to contain Unicode characters (see #139)
    • Extend logos consistency test case to all logo styles
    • WindowManager API value format: now an object with name and display_server_protocol attributes (see #145)
    • Old Red Hat logo is available as alternate logo shadowman (see #148)

    EDIT 07/05/2024 : :warning: .DEB and .RPM v4.14.3.0-1 packages contained a glitch related to Python entry point (see #153 and 1287f18b4c88f4083abcb21bed5bdda3b84ef63d). Fixed packages for this release have been re-uploaded as v4.14.3.0-2. Sorry for the inconvenience.

  3. v4.14.2.02023-08-26 · 2023-08-26 16:38 UTC
    查看更新说明

    Added

    • Official Nobara distribution support (see #131)
    • Standalone build procedure using Nuitka (see #136)
    • Darwin "WWDC 2020" (wwdc20) alternate logo (see #122)
    • Darwin "retro" low intensity (retro_low) alternate logo (see #135)
    • New show_link_local option to allow link-local IP addresses hiding for LAN_IP (see #137 and #138)

    Changed

    • Log uptime errors at warning level (see #132 and #133)
    • Honor PATH when looking for vcgencmd in Temperature
    • Fallback to HTTP properly on DNS connection errors for WAN_IP (see #134)
  4. v4.14.1.02023-01-20 · 2023-01-20 20:35 UTC
    查看更新说明

    Added

    • Python 3.12 official support
    • Official Enso OS distribution support (see #123)
    • Official Univalent and Moevalent distributions support (see #125)
    • New logo_style config option for preferred logo style (see #124)

    Changed

    • Prefer Ubuntu 20.04 to run Python 3.6 CI job
    • Fix CPU detection on aarch64 platforms lacking of ACPI PPTT (see #127)
  5. v4.14.0.12022-10-08 · 2022-10-08 12:50 UTC
    查看更新说明

    Changed

    • Fix warning related to "broken" Custom entry (see #120 & #121)
    • Fix PermissionError when opening restricted configuration files
    • Prefer macOS-latest for unit tests in integration jobs matrix (see actions/runner-images#5583)

    Bye, happy upgrade :wave:

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Archey 4

    Archey is a simple system information tool written in Python

    Why (again) a f*cking new Archey fork ?

    The answer is here.

    Note : Since the 21st September of 2017, you may notice that this repository no longer has the official status of fork.
    Actually, the maintainer decided to separate it from the original one's "network" with the help of GitHub's staff.
    Nevertheless, this piece of software is still a fork of djmelik's Archey project.

    Features

    • Run as quickly as possible
    • Stay as light as possible
    • Keep entries ordered despite parallelism
    • Extensive local and public IP addresses detection
    • General temperature detection
    • JSON output
    • Screen capture ("best effort")
    • Custom entries

    Supported platforms

    • BSD and derivatives
    • Darwin (macOS)
    • GNU/Linux distributions
    • WSL

    Details here.

    What does it look like ?

    Which packages do I need to run this project ?

    Required packages

    • python3 (>= 3.6)
    • python3-distro (python-distro on Arch Linux)
    • python3-netifaces (python-netifaces on Arch Linux)

    PyPy is supported and may replace CPython.

    Looking for Python 3.4 support ? Please refer to the latest v4.9 release.
    Looking for Python 3.5 support ? Please refer to the latest v4.10 release.

    Highly recommended packages

    EnvironmentsPackagesReasonsNotes
    Allprocps (maybe procps-ng)Many entries would not work as expectedWould provide ps
    Alldnsutils (maybe bind-tools)WAN_IP would be detected fasterWould provide dig
    Alllm-sensors (maybe lm_sensors)Temperature would be more accurateN/A
    macOS (Darwin)iStats or osx-cpu-tempTemperature wouldn't be detected without itN/A
    Graphical (desktop)pciutils or pciconfGPU wouldn't be detected without itWould provide lspci/pciconf
    Graphical (desktop)wmctrlWindowManager would be more accurateN/A
    Virtual w/o systemdvirt-whatModel would contain details about the hypervisorroot privileges required

    Installation

    Install from package

    First, grab a package for your distribution from the latest release here.
    Now, it's time to use your favorite package manager. Some examples :

    • Arch-based distributions : pacman -U ./archey4-4.X.Y.Z-R-any.pkg.tar.zst
    • Debian-based distributions : apt install ./archey4_4.X.Y.Z-R_all.deb
    • RPM-based distributions : dnf install ./archey4-4.X.Y.Z-R.py??.noarch.rpm

    Further information about packaging are available here.

    Install from PyPI

    pip3 install archey4
    

    Install from AUR

    yay -S archey4
    

    Install from Homebrew

    brew install archey4
    

    Install from FreeBSD ports

    pkg install archey4
    

    Install from source

    Step 1 : Fetch sources
    # If you want the latest release :
    wget -qO archey4.tar.gz "https://github.com/HorlogeSkynet/archey4/archive/v4.15.0.0.tar.gz"
    tar xvzf archey4.tar.gz
    cd archey4-*/
    
    # If you want the latest revision :
    git clone https://github.com/HorlogeSkynet/archey4.git
    cd archey4/
    
    Step 2 : Installation
    # If you have PIP installed on your system :
    pip3 install .
    
    # But if you don't have PIP, no worries :
    python3 setup.py install
    
    Step 3 (optional) : Configuration
    # System-wide configuration file (privileges required) :
    install -D -m0644 config.json /etc/archey4/config.json
    
    # User-specific configuration file :
    install -D -m0644 config.json ~/.config/archey4/config.json
    
    Step 4 (optional) : Standalone building

    Some years ago, Archey was a simple and unique Python file.
    Project evolved, and now it's a Python package.
    Some procedures below walk you through several ways of building Archey as a standalone program.

    # Using Nuitka (recommended) :
    apt install -y patchelf
    pip3 install nuitka
    python3 -m nuitka \
        --onefile \
        --include-package=archey.logos \
        --output-filename=archey \
        --output-dir=dist \
        --quiet \
        archey/__main__.py
    
    # Using PEX (recommended) :
    pip3 install pex
    pex \
        -o dist/archey \
        -m archey \
        .
    
    # Since v4.10 logos are dynamically imported for performance purposes.
    # This means that we have to explicitly make Stickytape and PyInstaller include them.
    # Please **replace** `debian` identifier below by yours (multiple flags allowed).
    
    # Using Stickytape :
    pip3 install stickytape
    stickytape \
        --copy-shebang \
        --add-python-path . \
        --output-file dist/archey \
        --add-python-module archey.logos.debian \
        archey/__main__.py
    chmod +x dist/archey
    
    # Using PyInstaller :
    pip3 install pyinstaller
    pyinstaller \
        --distpath dist \
        --specpath dist \
        --name archey \
        --onefile archey/__main__.py \
        --hidden-import archey.logos.debian \
        --log-level WARN
    

    Resulting program may now be installed system-wide (privileges required).

    # Standalone execution.
    ./dist/archey
    
    # System-wide install.
    install -D -m0755 dist/archey /usr/local/bin/archey
    

    Usage

    archey --help
    

    or if you only want to try this out (for instance, from source) :

    python3 -m archey --help
    

    Configuration (optional)

    Since v4.3.0, Archey 4 may be "tweaked" a bit with external configuration.
    You can place a config.json file in these locations :

    1. /etc/archey4/config.json (system preferences)
    2. ~/.config/archey4/config.json (user preferences)
    3. ./config.json (local preferences)

    If an option is defined in multiple places, it will be overridden according to the order above (local preferences > user preferences > system preferences).

    Alternatively, you may specify your own configuration file with the -c command-line option.

    The example file provided in this repository lists exhaustively the parameters you can set.
    Below stand further descriptions for each available (default) option :

    {
    	// If set to `false`, configuration files processing will stop with this file.
    	// System administrators may use this option to prevent user/local preferences to override system defaults (unless Archey is run with `-c` option).
    	// Developers running Archey from sources should use this option to prevent upstream config.json from overriding their own configuration.
    	"allow_overriding": true,
    	//
    	// Set to `false` to disable multi-threaded loading of entries.
    	"parallel_loading": true,
    	//
    	// If set to `true`, any execution warning or error would be hidden.
    	// Configuration parsing warnings **would** still be shown.
    	"suppress_warnings": false,
    	//
    	// Use this option to specify a custom color for entries (logo won't be affected).
    	// Value should be a string suitable for inclusion in the ANSI/ECMA-48 escape code for setting graphical rendition
    	// For instance "5;31;47" would result in red text blinking on white background.
    	// See <https://flokoe.github.io/bash-hackers-wiki/scripting/terminalcodes/> for more information.
    	"entries_color": "",
    	//
    	// Set this option to `false` to force Archey to use its own colors palettes.
    	// `true` by default to honor os-release(5) `ANSI_COLOR` option.
    	"honor_ansi_color": true,
    	//
    	// Set this option to an alternative logo style identifier instead of the default one for your distro.
    	// For example, "retro" would show the retro styled Apple's logo on Darwin platforms.
    	// You can set it to "none" to completely hide distribution logo.
    	// Note that the `--logo-style` argument overrides this setting.
    	"logo_style": "",
    	//
    	// Use this option to hide undetected entries, to prevent "Not detected" messages from being displayed.
    	"hide_undetected": false,
    	//
    	// Enable icons for entries.
    	// A terminal "nerd font" is required to display the icons. Otherwise, these are simply missing and a placeholder will be seen.
    	// You can also refer to : <https://github.com/ryanoasis/nerd-fonts>.
    	// Make sure that your system locale supports UTF-8.
    	"entries_icon": false,
    	//
    	// Entries list.
    	// Add a `disabled` option set to `true` to temporary hide one.
    	// You may change entry displayed name by adding a `name` option.
    	// You may change entry displayed icon by adding an `icon` option.
    	// You may re-order the entries list as you wish.
    	"entries": [
    		{ "type": "User" },
    		{ "type": "Hostname" },
    		{ "type": "Model" },
    		{ "type": "Distro" },
    		{
    			"type": "Kernel",
    			//
    			// Set to `true` to enable kernel release check against <www.kernel.org>.
    			// /!\ `DO_NOT_TRACK` environment variable may affect this feature behavior ! /!\
    			"check_version": false
    		},
    		{ "type": "Uptime" },
    		{
    			"type": "LoadAverage",
    			//
    			// Number of decimal places to display for the load average.
    			"decimal_places": 2,
    			//
    			// Some thresholds you can adjust to customize warning/danger colors.
    			"warning_threshold": 1.0,
    			"danger_threshold": 2.0
    		},
    		{ "type": "Processes" },
    		{ "type": "WindowManager" },
    		{ "type": "DesktopEnvironment" },
    		{ "type": "Shell" },
    		{
    			"type": "Terminal",
    			//
    			// Leave this option set to `true` to display a beautiful colors palette.
    			// Set it to `false` to allow compatibility with non-Unicode locales.
    			"use_unicode": true
    		},
    		{
    			"type": "Packages",
    			//
    			// Set to `true` to sum up all installed package counts.
    			"combine_total": false,
    			//
    			// Set to `false` not to join all packages tool counts on the same line.
    			"one_line": true,
    			//
    			// Set to `true` to include tools with no installed package.
    			"show_zeros": false
    		},
    		{
    			"type": "Temperature",
    			//
    			// The character to display between the temperature value and the unit (as '°' in 53.2°C).
    			"char_before_unit": " ",
    			"sensors_chipsets": [
    				// Whitelist of chipset identifiers (strings) passed to LM-SENSORS when computing the average temperature.
    				// Leaving empty (the default) would make Archey process input data from **all** available chipsets.
    				// Use this option if one of your sensors happens to return irrelevant values, or if you want to process only a subset of them.
    				//
    				// You may want to run `sensors -A` to list the available chipsets on your system (e.g. `coretemp-isa-0000`, `acpitz-acpi-0`, ...).
    				// Then, you will be able to add them once double-quoted in this list, for instance :
    				//"coretemp-isa-0000",
    				//"acpitz-acpi-0"
    			],
    			"sensors_excluded_subfeatures": [
    				// Blacklist of chipset "subfeature" (in LM-SENSORS terms) identifiers (strings) to exclude from average computation.
    				// Leaving empty (the default) would make Archey process input data from **all** available subfeatures providing valid temperatures.
    				// For instance, AMD Ryzen X series CPUs include a thermal bias sensor, appearing as a subfeature named `Tctl`.
    				// Excluding it can be achieved this way :
    				//
    				//"Tctl"
    			],
    			//
    			// Display temperature values in Fahrenheit instead of Celsius.
    			"use_fahrenheit": false
    		},
    		{
    			"type": "CPU",
    			//
    			// Set to `true` to join all CPUs on the same line.
    			"one_line": false,
    			//
    			// Set to `false` to hide the number of cores.
    			"show_cores": true,
    			//
    			// As explained above, you may rename entries as you wish.
    			"name": "Processor"
    		},
    		{
    			"type": "GPU",
    			//
    			// Set to `true` to join all GPUs on the same line.
    			"one_line": false,
    			//
    			// The maximum number of GPUs you want to display.
    			// `false` --> Unlimited.
    			"max_count": 2
    		},
    		{
    			"type": "RAM",
    			//
    			// Some threshold values you can adjust affecting warning/danger colors.
    			"warning_use_percent": 33.3,
    			"danger_use_percent": 66.7
    		},
    		{
    			"type": "Disk",
    			//
    			// Which filesystems to show:
    			// `["local"]` shows only local filesystems.
    			// You can alternatively list specific filesystems as:
    			//  * A list of device paths - e.g. `["/dev/sda1", "/dev/nvme0n1p1"]`
    			//  * A list of mount points - e.g. `["/", "/mnt"]`
    			//  * A combination of the above - e.g. `["/", "/dev/sda2"]`
    			"show_filesystems": ["local"],
    			//
    			// Set to `false` to write each filesystem on its own line.
    			"combine_total": true,
    			//
    			// Defines which labels to use for each disk (only works if `combine_total` is false!)
    			// The options available are:
    			//  * `"mount_points"`: Shows the mount point of the filesystem.
    			//      e.g. `Disk (/): 10.0 GiB/100.0 GiB`
    			//           `Disk (/mnt): 15.0 GiB / 200.0 GiB`
    			//  * `"device_paths"`: Shows the device path of the filesystem.
    			//      e.g. `Disk (/dev/sda1): 10.0 GiB / 100.0 GiB`
    			//           `Disk (/dev/mmcblk0p1): 15.0 GiB / 200.0 GiB`
    			//  * `false` or `null` (no quote marks!): Don't show any device labels.
    			//      e.g. `Disk: 10.0 GiB / 100.0 GiB`
    			//           `Disk: 15.0 GiB / 200.0 GiB`
    			"disk_labels": null,
    			//
    			// Set to `true` to hide the "Disk" entry name from the output.
    			// i.e. null  --> `Disk (/):`
    			//      false --> `Disk (/):`
    			//      true  --> `(/):`
    			"hide_entry_name": null,
    			//
    			// Some threshold values you can adjust affecting warning/danger colors.
    			"warning_use_percent": 50,
    			"danger_use_percent": 75
    		},
    		{
    			"type": "LAN_IP",
    			//
    			// Set to `false` not to join all IP addresses on the same line.
    			"one_line": true,
    			//
    			// The maximum number of local addresses you want to display.
    			// `false` --> Unlimited.
    			"max_count": 2,
    			//
    			// Set to `true` if your local network does not honor RFC1918.
    			"show_global": false,
    			//
    			// Set to `false` to hide link-local IP addresses (see RFC3927).
    			"show_link_local": true,
    			//
    			// Set to `false` to only display IPv4 LAN addresses.
    			"ipv6_support": true
    		},
    		{
    			"type": "WAN_IP",
    			//
    			// As explained above, you may temporary hide entries as you wish.
    			// See below example to hide your public IP addresses before posting your configuration on Internet.
    			//"disabled": true,
    			//
    			//
    			// Set to `false` not to join all IP addresses on the same line.
    			"one_line": true,
    			//
    			// Below are settings relative to IPv4/IPv6 public addresses retrieval.
    			// I hope options are self-explanatory.
    			// You may set `dns_query` (or `http_url`) to `false` to disable them.
    			// You may directly set `ipv4` or `ipv6` fields to `false` to completely disable them.
    			//
    			// <https://www.ident.me/> server sources : <https://github.com/pcarrier/ident.me>.
    			//
    			// /!\ `DO_NOT_TRACK` environment variable may affect this entry behavior ! /!\
    			"ipv4": {
    				"dns_query": "myip.opendns.com",
    				"dns_resolver": "resolver1.opendns.com",
    				"dns_timeout": 1,
    				"http_url": "https://4.ident.me/",
    				"http_timeout": 1
    			},
    			"ipv6": {
    				"dns_query": "myip.opendns.com",
    				"dns_resolver": "resolver1.opendns.com",
    				"dns_timeout": 1,
    				"http_url": "https://6.ident.me/",
    				"http_timeout": 1
    			}
    		},
    		{
    			"type": "Custom",
    			//
    			// `command` option is mandatory. `shell` option defaults to `false`.
    			// Don't forget to set a `name` (and optionally an icon) !
    			"name": "GPU",
    			"icon": "\ue735",
    			//
    			// The custom shell command to execute.
    			// /!\ If you're running AppArmor, don't forget to extend Archey profile through /etc/apparmor.d/local/usr.bin.archey4 !
    			"shell": true,
    			"command": "lshw -C display 2> /dev/null | rg product | cut -d ':' -f 2",
    			//
    			// A custom program and its arguments to execute.
    			"shell": false,
    			"command": ["echo", "My super GPU model !"],
    			//
    			// Whether or not command exit status code should be checked (defaults to `true`).
    			"check": true,
    			//
    			// Whether or not STDERR should be silenced instead of logged (defaults to `true`).
    			"log_stderr": true,
    			//
    			// Set to `false` not to join all output content on the same line.
    			"one_line": true
    		}
    	],
    	"default_strings": {
    		// Use this section to override default strings (internationalization).
    	}
    }
    
    

    Test cases

    An extensive test suite is available.
    Here is a short procedure to run them (you'll only need python3) :

    git clone https://github.com/HorlogeSkynet/archey4.git
    cd archey4/
    python3 -m unittest
    

    Any improvement would be appreciated.

    Notes to users

    Notes to developers