Rptree
Directory Tree Generator
Install / Use
/learn @realpython/RptreeREADME
RP Tree
RP Tree is a command-line tool to generate directory tree diagrams.
Installation
To install RP Tree, just run the following command:
$ pip install rptree
Usage
$ rptree /path/to/directory/
Note: The -h or --help option provides help on using RP Tree.
Sample Output
$ rptree hello/
./hello/
│
├── hello/
│ ├── __init__.py
│ └── hello.py
│
├── tests/
│ └── test_hello.py
│
├── LICENSE
├── README.md
├── requirements.txt
└── setup.py
That's it! You've generated a nice directory tree diagram.
Features
If you run RP Tree with a directory path as an argument, then you get a full directory tree diagram printed on your screen. The default input directory is your current directory.
RP Tree also provides the following options:
-v,--versionshows the application version and exits-h,--helpshow a usage message-d,--dir-onlygenerates a directory-only tree diagram-o,--output-filegenerates a full directory tree diagram and save it to a file in markdown format
Release History
- 0.1.1
- Display the entries in alphabetical order
- 0.1.0
- A work in progress
About the Author
Leodanis Pozo Ramos - Email: leodanis@realpython.com
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
