Generate directory tree diagrams from the command line
Project description
Pyletree
Pyletree is a simple and fast CLI tool to generate directory tree diagrams.
Installation
pip install pyletree
Usage
pyletree [ROOT_DIR]
If no directory is provided, the current directory is used:
pyletree
Show help:
pyletree -h
Options
General
-h,--helpShow help message-v,--versionShow version
Modes
-d,--dir-onlyShow directories only-f,--files-onlyShow files only
Ordering
-df,--dirs-firstList directories before files-ff,--files-firstList files before directories
Alphabetical order is always applied as base sorting.
Display
-n,--no-pipesRemove vertical pipes between branches
Ignoring
-i,--ignore PATTERN [PATTERN ...]Ignore files/directories-gi,--gitignoreRespect.gitignorerules
Depth
-dl,--depth-level NLimit depth
Output
-o,--output-file FILESave output to file (Markdown format)
Examples
Basic:
pyletree
Directories first:
pyletree . -df
Files only:
pyletree . -f
Limit depth:
pyletree . -dl 2
Ignore entries:
pyletree . -i node_modules dist .git
Use .gitignore:
pyletree . -gi
No pipes mode:
pyletree . -n
Save to file:
pyletree . -o tree.md
Sample Output
Default
project/
│
├── src/
│ ├── main.py
│ └── utils.py
│
├── tests/
│ └── test_main.py
│
└── README.md
No pipes (-n)
project/
├── src/
│ ├── main.py
│ └── utils.py
├── tests/
│ └── test_main.py
└── README.md
Features
- Clean and readable tree output
.gitignoresupport (it does not ignore either the.gitdirectory or the.gitignorefile; if you want to ignore them, add them to the ignore patterns)- Custom ignore patterns
- Depth limiting
- Flexible sorting
- Optional compact mode (
--no-pipes)
Release History
1.0.0
- Initial release
Authors
Davi Reis Furtado
Original RP Tree Author: Leodanis Pozo Ramos
License
Pyletree is distributed under the MIT license. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
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 pyletree-1.0.0.tar.gz.
File metadata
- Download URL: pyletree-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a19cd2a88626024913a58b3d42d4b235c9f0503bf21075a3596b4cec62c00c6
|
|
| MD5 |
dcefbc483ccbdd7c127c16525081277a
|
|
| BLAKE2b-256 |
a095a377cd88c937f35e98e5175d5719a986409118d80c8b9470dee86b747292
|
File details
Details for the file pyletree-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyletree-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8af3736a705e0a8f563f73f3aea6692f323d27c24e5a1828f3c1a555c1892f7
|
|
| MD5 |
fdf546c56ebf3e3aa49f2467cadc43f0
|
|
| BLAKE2b-256 |
9f593458837d55bbb3dbb98f509ed9209aa1a68e1a73a6552239dcb96db30d07
|