Skip to main content

A minimal GPU monitor for your terminal

Project description

gpufetch

A minimal GPU monitor for your terminal



Installing

uv:

uv tool install gpufetch

pipx:

pipx install gpufetch

Usage

usage: gpufetch [-h] [--theme NAME] [--entities a,b,c] [--entities-random N]
                [--fire] [--connect-spotify] [--spotify] [--sysinfo]
                [--weather] [--debt] [--tickers] [--play GAME]

options:
  -h, --help           show this help message and exit
  --theme NAME         display theme (default: default)
  --entities a,b,c     comma-separated entity names to bounce on screen
  --entities-random N  spawn N randomly chosen entities
  --fire               enable fire animation along the bottom
  --connect-spotify    run Spotify OAuth flow and save credentials, then exit
  --spotify            show Spotify now-playing widget
  --sysinfo            show CPU/memory usage widget
  --weather            show weather widget
  --debt               show US national debt clock widget
  --tickers            show market price ticker widget (BTC, XMR, S&P 500, NVDA)
  --play GAME          jump straight into a game: wordle, snake, roulette, blackjack

TUI keys: / → command prompt   q → quit   /help → command list

Features

GPU cards

  • Live VRAM usage bar, utilisation %, temperature, driver version, PCIe width
  • eBay sold-listing median price fetched in the background for each detected GPU
  • NVIDIA and AMD vendor colours; ASCII art PCB art inside each card

Widgets (toggle with --flag or /command at runtime)

Flag Command What it shows
--sysinfo /sysinfo CPU usage bar, RAM and swap bars
--weather /weather Temperature, conditions, wind, hourly forecast (wttr.in)
--spotify /spotify Now-playing track, artist, progress bar
--debt /debt US national debt counter ticking in real time
--tickers /tickers BTC/USD, XMR/USD, S&P 500, NVDA with 24 h change %

Multiple widgets tile side-by-side automatically when the terminal is wide enough.

Entities - ASCII art characters that bounce around the screen anime_girl arch bible_quote bill_100 crab debian dvd empty_wallet ethereum fedora ghost gorilla greeting grim_reaper jesus jewish_star marge maui nuke nvidia rxknephew scrooge shadow_wizard ship slot_machine stuffed_wallet trophy tux ufo

Themes - recolour the entire UI default america canada china christmas 420 halloween israel matrix rainbow

Games (launch with --play <name> or /play <name>)

  • wordle
  • snake
  • roulette
  • blackjack

Other

  • /fire - fire animation along the bottom
  • /8ball <question> - Magic 8-ball overlay
  • /keybind <key> <command> - bind any command to a single key
  • /change-theme <name> / /change-theme-random

Hacking / dev setup

Prerequisites: Python 3.11+, uv

git clone https://github.com/kevinroleke/gpufetch
cd gpufetch

# Run directly from source (no install step needed)
uv run -m gpufetch

# Or install into an isolated tool env and iterate quickly
uv tool install . --editable
gpufetch

Project layout

src/gpufetch/
├── main.py           # TUI loop, rendering, command dispatcher
├── ansi.py           # ANSI escape constants and strip_ansi()
├── sysinfo.py        # /proc poller + sysinfo widget
├── weather.py        # wttr.in poller + weather widget
├── debt.py           # Treasury API poller + debt clock widget
├── tickers.py        # CoinGecko/Stooq poller + ticker widget
├── prices.py         # eBay sold-listing price poller
├── spotify.py        # Spotify OAuth + now-playing poller
├── eightball.py      # Magic 8-ball responses and overlay
├── game_*.py         # Individual games (wordle, snake, roulette, blackjack)
├── entities/         # Bouncing ASCII art entities
│   ├── base.py       # EntitySpec dataclass
│   └── *.py          # One file per entity, each exports SPEC = EntitySpec(...)
└── themes/
    ├── base.py       # Theme base class
    └── *.py          # One file per theme, each exports THEME = MyTheme()

Adding an entity

  1. Create src/gpufetch/entities/myname.py
  2. Define your ASCII art as a list of frame lists (one frame = list of strings)
  3. Export SPEC = EntitySpec(name="myname", frames=[frame1, frame2, ...], color=CYAN)
from ..ansi import CYAN
from .base import EntitySpec

_F1 = ["( o_o)", "( > >)"]
_F2 = ["( o_o)", "(< <  )"]

SPEC = EntitySpec(name="myname", frames=[_F1, _F2], color=CYAN)

Adding a theme

  1. Create src/gpufetch/themes/mytheme.py
  2. Subclass Theme, set name, override apply(text, frame) -> str
  3. Export THEME = MyTheme()
from .base import Theme, _rgb, _theme_walk

class MyTheme(Theme):
    name = "mytheme"

    def apply(self, text: str, frame: int) -> str:
        return _theme_walk(text, lambda col, row: _rgb(255, 128, 0))

THEME = MyTheme()

Adding a widget

  1. Create src/gpufetch/mywidget.py with a MyPoller class and a render_my_widget(data, term_cols) function
  2. Follow the DebtPoller / render_debt_widget pattern in debt.py
  3. Wire it into main.py:
    • Import at the top
    • Add parameter to _render_widgets, execute_command, and run_tui
    • Add the toggle command, tab completion entry, and --myflag CLI argument

Rebuilding after changes

uv build --no-cache
uv tool install dist/gpufetch-*.whl --force

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpufetch-0.3.0.tar.gz (188.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpufetch-0.3.0-py3-none-any.whl (118.2 kB view details)

Uploaded Python 3

File details

Details for the file gpufetch-0.3.0.tar.gz.

File metadata

  • Download URL: gpufetch-0.3.0.tar.gz
  • Upload date:
  • Size: 188.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gpufetch-0.3.0.tar.gz
Algorithm Hash digest
SHA256 365fd7906865a1f09f9fd74c2ebea052c2466b8163abcd214051bf5f9d639ea5
MD5 bde93f026bb00aafa4569ff440e7b551
BLAKE2b-256 6dd174300a2ed13849f8232353079eccd2fee970e79b95ad741556e94239e643

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpufetch-0.3.0.tar.gz:

Publisher: release.yml on kevinroleke/gpufetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gpufetch-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: gpufetch-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 118.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gpufetch-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e1da63a7253e2b6628b0edaa7955632ea02f95731093f8a2db7c87d84bdae97
MD5 8c8c811bf769dd930c8a1c3e532195cf
BLAKE2b-256 2462e203293eef93ff6e96b8f004302923b8b319b95a4a2a7a815b491341558c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpufetch-0.3.0-py3-none-any.whl:

Publisher: release.yml on kevinroleke/gpufetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page