
Build a Terminal Disk Analyzer in Python with Textual
You've been there. CI is slow, the build server is running low on space, and df -h tells you the disk is 94% full - but not why . You du -sh * your way through a few directories, mentally add up the numbers, and eventually find the culprit: six months of accumulated .venv folders, a Docker layer cache that got out of hand, or a node_modules directory that somehow outlived the project that created it. It's not a disaster. It's just friction - the kind that adds up. ncdu is a tool that makes this painless. It scans a directory tree, ranks everything by size, and lets you navigate and delete without ever leaving the terminal. If you're on a remote server or inside a container, it should be the first thing you reach for. In this article, you'll build your own version in Python, called pydusk , using the textual TUI framework. It's a practical project - useful on its own - and a good way to get hands-on with Textual's core patterns: background workers, modal screens, reactive state, and a c
Continue reading on Dev.to Python
Opens in a new tab

