Skip to main content

CLI tool to generate a directory tree view of your project

Project description

🌳 tree-it

PyPI Python License: MIT Platform Status

A simple and flexible CLI tool to generate a visual representation of your project's directory tree — with support for advanced ignore rules (like .gitignore).

Generate a clean overview of your folder structure in seconds.


🔧 Features

  • Output a tree view of any directory
  • Control the depth of the tree with a --depth option (0, 1, ..., or full)
  • Ignore folders, files or patterns (e.g. *.log, folder/, folder/*)
  • Show folder names without listing their content
  • Export result to a readable .txt file
  • Works on any OS with Python 3

📦 Installation

Install from PyPI:

pip install treeit-cli

⚠️ Note: This project is currently published under the name treeit-cli on PyPI
If the name tree-it becomes available in the future, the package name may change accordingly.

Or clone the repository:

git clone https://github.com/Damien-Bureau/tree-it.git
cd tree-it

🚀 Usage

treeit [path] [options]

Options

Option Description
path Root directory to scan (default: current folder)
-o, --output Output file (default: tree.txt)
-d, --depth Max depth (0, 1, ..., or full)
-i, --ignore [patterns...] Ignore rules (see examples below)

🎯 Ignore Patterns

Pattern Meaning
folder/ Completely ignore folder and its content
folder/* Keep folder in tree, ignore its content
*.ext Ignore all files with that extension
file.txt Ignore a specific file

✅ Examples

# Show tree up to depth 2, ignoring node_modules entirely
treeit -d 2 --ignore node_modules/

# Ignore all .log files and only the content of frontend/node_modules
treeit --ignore *.log frontend/node_modules/*

📄 Output example

my-project/
├── backend/
│   └── node_modules/  (content ignored)
├── frontend/
│   ├── assets/
│   └── App.jsx
├── .gitignore
└── README.md

🔒 License

MIT — free to use, modify and share.
Feel free to contribute or suggest improvements!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treeit_cli-1.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treeit_cli-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file treeit_cli-1.0.1.tar.gz.

File metadata

  • Download URL: treeit_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for treeit_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 159bee399f15b4d7a02262c6f1154b2f5f65c13a51029127ec08a7bbbbec1a29
MD5 986fd388cff2ce41ef1b929aab25d1e6
BLAKE2b-256 786348f30767ea691a13d6312ffb03ce08a953a2de82bf10e75bae9f53976631

See more details on using hashes here.

File details

Details for the file treeit_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: treeit_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for treeit_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef9523818e422bc0e7d7ecdc82e8e7adf8dfe0fcf65b7344dffd4aa3d0c1ff0e
MD5 e89e070391a57d073bde259280b83ed4
BLAKE2b-256 39455fe7ceae7dd5debc200ffee35f9a88043f15fb941a0fe33ddf90851e6022

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page