Skip to main content

A simple Python directory lister with optional tree view

Project description

shea

License: MIT Python 3.9+ Code style: Ruff

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)

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 - Quit
  • r - Force refresh
  • Arrow keys - Navigate process list
  • Click column headers - Sort by that column

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

shea-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

shea-0.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file shea-0.2.0.tar.gz.

File metadata

  • Download URL: shea-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for shea-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f5227b052316c7dd17ce748db6f26b522b96c96ad8f7fdd65560652f9dc3ccda
MD5 2e22cdbd58ddf5c921b1a02451b34a5b
BLAKE2b-256 0c9571cfe98d24ecfe62c3f1bc44b197d4ee2b55045f13654979cc27fca66cdb

See more details on using hashes here.

File details

Details for the file shea-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: shea-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for shea-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe0921ccda3e3fdaf4ded66d76fe26a55f0bd49e8fe85200d1d7df4d97c03160
MD5 c063ea58ee089536f6d5248115c89019
BLAKE2b-256 485f74756c2ad6120e77a8c10a0181ca5c46f9353706950c5d21b3901c0190a4

See more details on using hashes here.

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