Skip to content

Tinnci/tree-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tree-py

PyPI version License: MIT GitHub stars

A Python implementation of the tree command, designed for Windows but compatible with other platforms. It provides a feature-rich command-line utility to recursively list directories in a tree-like format.

Installation

uv tool install tree-py-shiso

Usage

tree-py [options] [directory]

Common Options

Flag Description
-L <level> Max display depth of the directory tree.
-d List directories only.
-a All files are listed (including hidden files).
-f Print the full path prefix for each file.
-i Makes tree not print the indentation lines.
-h Print the size in a human readable way.
-p Print the file type and permissions.
-C Turn colorization on always.
-I <pattern> Do not list files that match the given pattern.
-P <pattern> List only those files that match the pattern.
--prune Prune empty directories from the output.
--dirsfirst List directories before files.

Examples

Project Overview:

tree-py -L 2 -I "node_modules|__pycache__" --dirsfirst

Find specific files:

tree-py -P "*.json" --prune

Flat list with full paths:

tree-py -i -f

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages