slither-cli
A Python CLI tool for displaying directory structure as ASCII art trees in your terminal.
Features
- Display directory trees with beautiful ASCII art formatting
- Customizable depth limiting
- Pattern-based file filtering (include/exclude)
- Show/hide hidden files
- Display file sizes in bytes or human-readable format
- Reverse sort order
- Directories-only mode
Installation
Prerequisites
- Python 3.13 or higher
- uv package manager
Install from source
git clone https://github.com/jesshart/slither-cli.git
cd slither-cli
uv sync
Usage
Basic usage
# Display current directory
uv run slither
# Display specific directory
uv run slither /path/to/dir
Options
# Limit depth to 2 levels
uv run slither -L 2
# Show hidden files
uv run slither -a
# Show directories only
uv run slither -d
# Show only Python files
uv run slither -P "*.py"
# Ignore compiled Python files
uv run slither -I "*.pyc"
# Show file sizes in human-readable format
uv run slither -s -h
# Reverse sort order
uv run slither -r
# Combine multiple options
uv run slither -L 3 -a -P "*.py" -s -h
All available options
| Option | Long form | Description |
|---|---|---|
-L |
--level |
Max display depth of the directory tree |
-a |
--all |
Print all files, including hidden files |
-d |
--dirs-only |
List directories only |
-P |
--pattern |
List only files that match the pattern (wildcard) |
-I |
--ignore |
Do not list files that match the pattern |
-s |
--size |
Print file sizes in bytes |
-h |
--human |
Print file sizes in human-readable format |
-r |
--reverse |
Sort output in reverse order |
Example Output
/Users/jesse/Repos/personal/slither-cli
├── slither
│ ├── __init__.py
│ ├── cli.py
│ └── tree.py
├── main.py
├── pyproject.toml
├── README.md
└── uv.lock
1 directory, 6 files
Development
Project structure
slither-cli/
├── slither/ # Main package
│ ├── __init__.py # Package initialization
│ ├── cli.py # Typer-based CLI interface
│ └── tree.py # Core tree building and rendering logic
├── main.py # Alternative entry point
├── pyproject.toml # Project configuration
└── uv.lock # Dependency lock file
Built with
License
This project is open source and available under the MIT License.
Author
Created by Jesse Hart
Metadata
Release files for slither-cli 0.1.1
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 |
|---|---|---|---|---|
| slither_cli-0.1.1.tar.gz | 7.2 kB | Without provenance | Details for slither_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slither_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for slither_cli-0.1.1-py3-none-any.whl |
Total release size: 12.8 kB
Release files / slither_cli-0.1.1.tar.gz
| Download URL | slither_cli-0.1.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75d7b09aca71051eaf63544b105248d07bfd9435b5cd60a78bd32cc57b752cc9
|
|
BLAKE2b-256 checksum How to use checksums |
1ce77fd988596db7556fe6c73052819ae424289588e6011bba1cccec951b31fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / slither_cli-0.1.1-py3-none-any.whl
| Download URL | slither_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f9f491942a9555cef6ce09b60b102d41ef893ef5381b758aa98bafc328d6eab
|
|
BLAKE2b-256 checksum How to use checksums |
9f8d8d653baf2b77136d18c33cc60e59d3adf533f4cd478902013f90d5f5c985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for slither-cli 0.1.1
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.