A small tool to collect and display your PC specs in a clean HTML page and an optional shareable PNG image.
- CPU, RAM modules, GPU(s) with VRAM
- Storage with SSD/HDD detection (uses MSFT_PhysicalDisk when available; NVMe heuristic fallback)
- Configurable title, background image, colors, and fonts via xpec.config.json
You can find a precompiled version in demo.
- Windows 10/11 recommended
- Python 3.8+ (64-bit recommended)
- Dependencies are listed in requirements.txt:
- psutil, Pillow, comtypes, pynvml, wmi
Linux is partially supported (uses dmidecode, lspci, lsblk if present), but the primary target is Windows.
- Create and activate a virtual environment:
py -3 -m venv .venv
.venv\Scripts\activate- Upgrade pip and install dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txtRun the app:
python xpec.pyThis generates pc_specs.html (opened automatically) and, if possible, pc_specs.png in the same folder.
Install PyInstaller:
pip install pyinstallerBuild:
pyinstaller --onefile --noconsole xpec.pyRun:
The executable will be in dist\xpec.exe.
To customize, place xpec.config.json and any assets (e.g., bg.jpg, fonts) next to xpec.exe. If no config is found, a default xpec.config.json is auto-created next to the executable on first run.
pyinstaller --onefile --noconsole ^
--add-data "bg.jpg;." ^
--add-data "xpec.config.json;." ^
xpec.pyNote: Keeping xpec.config.json and images next to the exe is simpler for updates.
The app looks for xpec.config.json:
When packaged: next to xpec.exe (preferred), then current working directory. When running from source: next to xpec.py, then current working directory. If not found, a default config is written next to the executable/script.
Minimal example:
{
"title": "Xpec by Mr.Jack",
"background_image": "bg.jpg",
"background_fit": "cover",
"background_overlay": { "color": [0, 0, 0], "opacity": 0.0 }
}Other keys you can adjust:
image_size, background_color, accent_color, sub_color, text_color, dim_color font_paths (title, h2, body, small). If empty on Windows, it falls back to Arial. Place images/fonts in the same folder or use absolute paths.
NVIDIA VRAM: pynvml enables accurate VRAM detection. If VRAM shows N/A, update NVIDIA drivers.
Storage type: Prefers MSFT_PhysicalDisk.MediaType; otherwise uses NVMe heuristics for SSD.
Debug output:
- Set XPEC_DEBUG=1 for motherboard detection details.
- Set XPEC_DEBUG_GPU=1 for GPU source matching details.
If imports fail, ensure you’re inside the activated venv and pip install -r requirements.txt succeeded.
MIT (or your preferred license)
