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>)
wordlesnakerouletteblackjack
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
- Create
src/gpufetch/entities/myname.py - Define your ASCII art as a list of frame lists (one frame = list of strings)
- 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
- Create
src/gpufetch/themes/mytheme.py - Subclass
Theme, setname, overrideapply(text, frame) -> str - 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
- Create
src/gpufetch/mywidget.pywith aMyPollerclass and arender_my_widget(data, term_cols)function - Follow the
DebtPoller/render_debt_widgetpattern indebt.py - Wire it into
main.py:- Import at the top
- Add parameter to
_render_widgets,execute_command, andrun_tui - Add the toggle command, tab completion entry, and
--myflagCLI argument
Rebuilding after changes
uv build --no-cache
uv tool install dist/gpufetch-*.whl --force
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
365fd7906865a1f09f9fd74c2ebea052c2466b8163abcd214051bf5f9d639ea5
|
|
| MD5 |
bde93f026bb00aafa4569ff440e7b551
|
|
| BLAKE2b-256 |
6dd174300a2ed13849f8232353079eccd2fee970e79b95ad741556e94239e643
|
Provenance
The following attestation bundles were made for gpufetch-0.3.0.tar.gz:
Publisher:
release.yml on kevinroleke/gpufetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpufetch-0.3.0.tar.gz -
Subject digest:
365fd7906865a1f09f9fd74c2ebea052c2466b8163abcd214051bf5f9d639ea5 - Sigstore transparency entry: 1311182255
- Sigstore integration time:
-
Permalink:
kevinroleke/gpufetch@f6f82451052a20b5008ba01a93247817844a9252 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/kevinroleke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6f82451052a20b5008ba01a93247817844a9252 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e1da63a7253e2b6628b0edaa7955632ea02f95731093f8a2db7c87d84bdae97
|
|
| MD5 |
8c8c811bf769dd930c8a1c3e532195cf
|
|
| BLAKE2b-256 |
2462e203293eef93ff6e96b8f004302923b8b319b95a4a2a7a815b491341558c
|
Provenance
The following attestation bundles were made for gpufetch-0.3.0-py3-none-any.whl:
Publisher:
release.yml on kevinroleke/gpufetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpufetch-0.3.0-py3-none-any.whl -
Subject digest:
2e1da63a7253e2b6628b0edaa7955632ea02f95731093f8a2db7c87d84bdae97 - Sigstore transparency entry: 1311182301
- Sigstore integration time:
-
Permalink:
kevinroleke/gpufetch@f6f82451052a20b5008ba01a93247817844a9252 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/kevinroleke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6f82451052a20b5008ba01a93247817844a9252 -
Trigger Event:
push
-
Statement type: