Skip to main content

Generate a deterministic Markdown representation of a project directory tree

Project description

Project Tree

Last commit Repo size Python License

Project Tree is a small, deterministic utility that generates a Markdown representation of a project’s directory structure.


Features

  • Generates a deterministic Markdown project tree
  • Uses a simple, explicit ignore system based on exact name matching
  • Optional watch mode for continuous regeneration
  • Minimal, testable design

Installation

Simply run:

pip install project-tree

Or if you already have UV installed, simply run:

uv pip install project-tree

Getting Started

Run projtree from your project root to generate structure.md.

projtree

Usage

Run projtree with --help to see the full command reference, options, and example output.

projtree --help

Or see the usage documentation for the full command reference, options, and example output.


Ignore System

  • Built-in defaults include common directory and file names (e.g. .git, __pycache__, node_modules)
  • A .projtreeignore file in the project root is supported
  • For normal runs, CLI --ignore arguments are merged with project and built-in ignores
  • In --watch mode, CLI --ignore values are also forwarded, so watching uses built-in defaults, .projtreeignore, and any CLI-supplied ignores
  • Ignore rules match exact names anywhere in the tree (e.g., src ignores any file/dir named src at any depth)
  • Ignore entries are treated as exact names, not paths. For example, target works, but src/target does not match nested paths
  • No globbing, wildcards, or pattern-based matching in v1
  • If the output file is under the project root, its file name is also added to the ignore set to prevent regeneration loops

Example .projtreeignore:

.venv
__pycache__
build
dist

Running Tests

If you installed development dependencies:

pytest

All generator tests assert against full output to enforce deterministic structure. Watcher tests are intentionally minimal and validate regeneration behavior only.


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

project_tree-1.3.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

project_tree-1.3.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file project_tree-1.3.0.tar.gz.

File metadata

  • Download URL: project_tree-1.3.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for project_tree-1.3.0.tar.gz
Algorithm Hash digest
SHA256 6edb4482db56fad683cea0b5ec42282538766e394fbe660c66777c1eb4a9fb8a
MD5 b72c8d0fda0525c29d2b228dcfc76606
BLAKE2b-256 066ff48ca03f9193946377bb7a6988dd8890d6df6666501af254465474bda623

See more details on using hashes here.

File details

Details for the file project_tree-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: project_tree-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for project_tree-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c208a25712b0768fe78a0bb630579cde8fe4862842b494244a99fe3b6aa4f1dd
MD5 2fda5ebf0580d3936fcdd45c92b1bfe0
BLAKE2b-256 0dcfd89fe4f93088ca2123bba1cc0c615493233ecd9ec7074dbad89be37a5a10

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