A simple Python directory lister with optional tree view
Project description
shea
Shea (short for "shell apps") is a collection of modern Python-based shell utilities with colorful emoji icons. Currently includes:
pyls- Directory listing with tree view (ls/tree replacement)pytop- Process viewer sorted by CPU/memory usage (top/htop alternative)pydisk- Disk usage viewer with interactive directory explorer (df/ncdu alternative)
Installation
You can install with pip (PEP 517 using Flit under the hood):
pip install .
Or directly with Flit:
python -m pip install flit
flit install
Usage
Directory Listing (pyls)
List current directory (folders first, then files):
shea
Tree view:
shea -t
Specify a path and a maximum depth:
shea --tree --depth 2 ~/projects
Process Viewer (pytop)
Launch the interactive process monitor:
pytop
Features:
- ๐ฅ Real-time CPU usage per core with visual bars
- ๐พ Memory and swap usage with color-coded horizontal charts
- โ๏ธ System information (uptime, process count)
- ๐ Process table showing top 50 processes by CPU usage
- ๐ Click column headers to sort (CPU/MEM/TIME always descending, others toggle)
- Interactive TUI interface with live updates
Controls:
q- Quitr- Force refresh- Arrow keys - Navigate process list
- Click column headers - Sort by that column
Disk Usage Viewer (pydisk)
Show all disk partitions with usage information:
pydisk
Launch interactive directory explorer for a specific path:
pydisk /
pydisk /home
pydisk ~/projects
Features:
- ๐พ Disk usage table showing all partitions with visual bars
- ๐ Color-coded usage percentages (green/cyan/yellow/red)
- ๐ Interactive TUI to explore directory sizes
- ๐ Navigate directories to see which files/folders use the most space
- โก Recursively calculates folder sizes
Interactive mode controls:
q- Quitr- Refresh current directoryuorEsc- Go up one directory level- Click/Enter on a row - Enter directory or show file info
- Arrow keys - Navigate file/folder list
Output examples
Listing:
$ pyls
๐ dist
๐ shea
๐ tests
๐ pyproject.toml
๐ README.md
Tree view:
$ pyls -t
.
โโโ ๐ dist
โ โโโ ๐ pyl-0.1.0-py3-none-any.whl
โ โโโ ๐ pyl-0.1.0.tar.gz
โ โโโ ๐ qwe-0.1.0-py3-none-any.whl
โ โโโ ๐ qwe-0.1.0.tar.gz
โ โโโ ๐ shea-0.1.0-py3-none-any.whl
โ โโโ ๐ shea-0.1.0.tar.gz
โ โโโ ๐ shea-0.1.1-py3-none-any.whl
โ โโโ ๐ shea-0.1.1.tar.gz
โโโ ๐ shea
โ โโโ ๐ __pycache__
โ โ โโโ ๐ __init__.cpython-310.pyc
โ โ โโโ ๐ __main__.cpython-310.pyc
โ โ โโโ ๐ _version.cpython-310.pyc
โ โ โโโ ๐ main.cpython-310.pyc
โ โ โโโ ๐ pyls.cpython-310.pyc
โ โโโ ๐ __init__.py
โ โโโ ๐ __main__.py
โ โโโ ๐ _version.py
โ โโโ ๐ pyls.py
โโโ ๐ tests
โ โโโ ๐ __pycache__
โ โ โโโ ๐ test_basic.cpython-310-pytest-8.3.2.pyc
โ โโโ ๐ test_basic.py
โโโ ๐ pyproject.toml
โโโ ๐ README.md
License
MIT
Development
This project uses pre-commit with Ruff for linting and formatting.
To set up pre-commit hooks:
python -m pip install pre-commit
pre-commit install
Run on all files once:
pre-commit run -a
Ruff lint will auto-fix simple issues on commit; if it makes changes, the commit will fail so you can review and re-commit.
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
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 shea-0.3.0.tar.gz.
File metadata
- Download URL: shea-0.3.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30cacfdf5005278532691c0741e21dbd99985021e1bd282649595ef67d116bb4
|
|
| MD5 |
ae75c6b4b9a5f98decf44420d3c80897
|
|
| BLAKE2b-256 |
0a5e67da9484e850cedf9aec85e5d00a13916d6b4f225e00851370a66a0ea9cc
|
File details
Details for the file shea-0.3.0-py3-none-any.whl.
File metadata
- Download URL: shea-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cefb261ecb21096a4593972a8c9aebd6affe79a86824ae48dbb1eadfef6c7887
|
|
| MD5 |
ebfbb9c2b2cdfc8bc9a570dc04ff2136
|
|
| BLAKE2b-256 |
922bc06b1d67e3eea71e22ec01d4d2a31b919b566cfdec0cd1bf6d0d85bf3bf8
|