Skip to main content

CLI to print a project directory tree

Project description

gabbium-tree

A simple Python CLI to print a directory tree (like tree command), with support for depth limits, hidden files, and excludes.

✅ What it does

  • Prints a project folder structure in a clean tree format\
  • Supports options like:
    • --max-depth → limit tree depth\
    • --only-dirs → show only directories\
    • --exclude → skip specific directories (defaults: .git, node_modules, __pycache__, ...)\
    • --output → save output to file

📦 Installation

pip install gabbium-tree

⚙️ Usage

Basic:

gtree .

Limit depth:

gtree . --max-depth 2

Only directories:

gtree . --only-dirs

Exclude extra paths:

gtree . --exclude dist build

Save to file:

gtree . --output tree.txt

Or with shell redirection:

gtree . > tree.txt

🔑 Features

  • Cross-platform (Windows, macOS, Linux)\
  • Prints with Unicode characters (fallback to ASCII if needed)\
  • Defaults to ignoring common junk folders (.git, node_modules, __pycache__)

✅ Example output

~/my-project
├── src/
│   ├── app/
│   └── utils/
├── tests/
└── pyproject.toml

🛠 Roadmap

  • Option for ASCII-only mode (--ascii)\
  • Output to file (--output tree.txt)\
  • Config file support (.gtreerc)

🪪 License

This project is licensed under the MIT License -- see LICENSE for details.

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

gabbium_tree-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

gabbium_tree-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file gabbium_tree-1.0.0.tar.gz.

File metadata

  • Download URL: gabbium_tree-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gabbium_tree-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d9c6f109719b339500fa013fec133007bbdcdcc6abbc643abdc0e79ac986a814
MD5 483d02a907b0e3fae6a29a9db792fe9e
BLAKE2b-256 49bab2ae790fb6e70f59c87cdbb0e221ba0f9facdde7867db96f7fbd6d01b512

See more details on using hashes here.

Provenance

The following attestation bundles were made for gabbium_tree-1.0.0.tar.gz:

Publisher: cd.yml on gabbium/tree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gabbium_tree-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gabbium_tree-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gabbium_tree-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5888194f98e25e4edbf72a9608ea150fdcf7637c176bb08d3ca776d09b4418b9
MD5 0f0fbcf1cb0adfdd5bfad4de0704ec48
BLAKE2b-256 6076fb22f7dc67a5e91c1abf495d8ab0adc04682483270cd56fc98290f92bf63

See more details on using hashes here.

Provenance

The following attestation bundles were made for gabbium_tree-1.0.0-py3-none-any.whl:

Publisher: cd.yml on gabbium/tree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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