Skip to main content

Gitree: git-aware project tree printing and zipping for docs and LLMs

Reason this release was yanked:

crashes on --zip

Project description

Gitree

A git-aware (but not git-required) project tree printer and zipper for documentation, PRs and LLM workflows.

The problems it solves:

  • sharing project structure in issues or pull requests
  • generating directory trees for documentation
  • pasting project layouts into LLMs
  • zipping projects using .gitignore rules for safe sharing with LLMs

Quick Start (10 seconds)

Installation using pip (recommended):

Run this command in your terminal:

pip install gitree

Usage:

Open a terminal in any project and run:

gitree

This prints the directory structure of the current folder.

You can also specify a path explicitly:

gitree <directory_path>

Example on Windows PowerShell:

PS C:/Users/Projects/Gitree> gitree .

Note: The dot after the name call is not required. It is default.

Output:

Gitree
├─ LICENSE
├─ pyproject.toml
├─ README.md
├─ requirements.txt
└─ structure.py

For zipping a directory:

gitree . --zip out

creates out.zip in the same directory.

Updating Gitree:

To update the tool, reinstall it using pip. Pip will automatically replace the older version with the latest release.


Useful CLI arguments

In addition to the directory path, the following options are available:

Argument Description
--version, -v Displays the installed version.
--zip [name] Zips the project while respecting .gitignore. Example: --zip a creates a.zip. If no name is provided, a random ID is used.
--depth Limits recursion depth. Example: --depth 1 shows only top-level files and folders.
--all, -a Includes hidden files and directories. Does not override .gitignore.
--ignore Adds extra files or directories to ignore.
--gitignore-depth Controls how deeply .gitignore files are discovered. Example: --gitignore-depth 0 uses only the root .gitignore.
--no-gitignore Ignores all .gitignore rules when set.
--max-items Limits items shown per directory. Extra items are summarized as ... and x more items. Default: 20.
--no-limit Removes the per-directory item limit.


Installation (for Contributors)

Clone the repository:

git clone https://github.com/ShahzaibAhmad05/Gitree

Move into the project directory:

cd Gitree

Install dependencies:

pip install -r requirements.txt

The tool is now available as a Python CLI on your system.

For running directly from main without installing:

python -m gitree.main

Contributions

Issues and pull requests are welcome. Ideas that would fit well include improved formatting, colorized output, test coverage, and performance optimizations.

Gitree is intentionally small and readable, so contributions that preserve simplicity are especially appreciated.

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

gitree-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

gitree-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file gitree-0.1.0.tar.gz.

File metadata

  • Download URL: gitree-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f251d4848ea139ac3795b7168431870ef23fc017c8548803a637e58b2bcefdbe
MD5 64d4435276f68a41a31095408f923d10
BLAKE2b-256 06c3fdf0c4aafe61a4077ac547a20efd3bb4dcd47866fb32cf05bc6790294d45

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitree-0.1.0.tar.gz:

Publisher: workflow.yml on ShahzaibAhmad05/Gitree

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

File details

Details for the file gitree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70926bab8969bc82fd95c6b8ec04a7d473bfb7e65cce4f78a0bbd79f4e1a014f
MD5 9f6802843711562a62e5608d8b9006ed
BLAKE2b-256 ec5aba3a8a9d2af3b84edba5509135ae18f21dc4260f411836ecbea08f5bebb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitree-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on ShahzaibAhmad05/Gitree

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