📂 lsum-enhanced
⚡ TL;DR
lsum-enhanced is ls on steroids. It doesn't just list files; it categorizes, counts, and visualizes your directory's distribution by MIME types, extensions, and metadata—all while respecting your .gitignore rules.
🤔 Why lsum-enhanced?
Standard tools like ls or tree are great for finding files, but they fail to answer higher-level questions about your workspace. lsum-enhanced was built to fill that gap:
- Audit Your Assets: Instantly see how many gigabytes of images vs. text files you have.
- Visualize Structure: Group files into elegant, color-coded panels based on their actual content (MIME) rather than just extensions.
- Clean Analysis: Use the
--gitignoreflag to strip outnode_modules, build artifacts, and logs, focusing only on the code that matters. - Recursive Intelligence: Understand the composition of entire project trees in a single, formatted view.
🚀 Installation
Pre-Requisites
This package depends on python-magic, which requires libmagic.
If not installed already, install it using -
Linux
sudo apt install libmagic1
macOS
brew install libmagic
Install it
Globally (outwith a venv), install with pipx
pipx install lsum-enhanced
Existing venv
# existing venv
source path/to/existing/venv/bin/activate
pip install lsum-enhanced
# new venv
python -m path/to/new
source path/to/new/bin/activate
pip install lsum-enhanced
🛠️ Building From Source
Perfect for developers who want the latest features:
# Clone the repository
git clone https://github.com/DMcCallum83/lsum-enhanced.git
cd lsum-enhanced
# Install dependencies
sudo apt install libmagic1
# or for macOS
brew install libmagic
# then build
uv build
# test your dev build
uv run lse .
🛠️ Usage Examples
1. Basic Listing
A clean, tabular view of your current directory:
lse
2. Group by MIME Type (with Icons)
See your files grouped by their actual content type (e.g., Image, Video, Text):
lse --group
lse -g
3. Respect Gitignore
Exclude build artifacts and ignored files for a "clean" summary:
lse . --gitignore --count
lse . -gi -c
4. Recursive Extension Summary
Analyze every file in your project tree, grouped by extension:
lse . --recursive --group-extension
lse . -r -ge
5. Advanced Sorting & Filtering
Find all .txt files and sort them by size:
lse --filter-extension .txt --sort size
lse -fe .txt -s size
⌨️ CLI Options
| Option | Shorthand | Description |
|---|---|---|
--count |
-c |
Count files/directories in groups or total. |
--group |
-g |
Group files by MIME type. |
--group-extension |
-ge |
Group files by file extension. |
--gitignore |
-gi |
Respect .gitignore rules (excludes ignored files). |
--recursive |
-r |
Perform operations on all subdirectories. |
--sort |
-s |
Sort by name, size, or date. |
--filter |
-f |
Filter by a specific MIME type (e.g., image/jpeg). |
--filter-text |
-ft |
Filter filename. |
📄 License
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ using Python and Rich.
Metadata
Release files for lsum-enhanced 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lsum_enhanced-1.0.2.tar.gz | 9.6 kB | Without provenance | Details for lsum_enhanced-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lsum_enhanced-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for lsum_enhanced-1.0.2-py3-none-any.whl |
Total release size: 19.2 kB
Release files / lsum_enhanced-1.0.2.tar.gz
| Download URL | lsum_enhanced-1.0.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03e3da67f22c4756d2a657a04693e5cb135d77048907734e53ef9713f9a9f24d
|
|
BLAKE2b-256 checksum How to use checksums |
7a4b3fdc5e48e9f3a4c480965887d17c8b6373287dde984a3e82cc8308d0c506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / lsum_enhanced-1.0.2-py3-none-any.whl
| Download URL | lsum_enhanced-1.0.2-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b81a5f382d7a044bc65cff9b4f826c7caac1ab7a50315204e5973978e67163b
|
|
BLAKE2b-256 checksum How to use checksums |
5a67f845b2fbe52d81b47d170ed39efb01a30c594a9b254f87b8ca4a34a68950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for lsum-enhanced 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.