Skip to main content

Project Tree

Last commit Repo size Python License Lint and Test

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:

pipx install project-tree

Or if you already have UV installed, simply run:

uv tool 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.


Metadata

Release files for project-tree 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for project-tree 1.3.1
File Size Uploaded
project_tree-1.3.1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for project-tree 1.3.1
File Interpreter ABI Platform
project_tree-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / project_tree-1.3.1.tar.gz

Download URL project_tree-1.3.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a4d10fe24cec442f24f04a09aa38f1e22ab8ef9f281e04f8f1d5440df7fd331
BLAKE2b-256 checksum
How to use checksums
5cbff0add856fa22dfa807ace9921d789570085bc43c8f98f71e37d014b77e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / project_tree-1.3.1-py3-none-any.whl

Download URL project_tree-1.3.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc82db7ec089afc770237936bc82a32acd2a05c1266d32cf7276f653541d966a
BLAKE2b-256 checksum
How to use checksums
d75f2b56a68d3dba6314ff45d59f8cc24a32c45fe68cf76e98301101b0bbaa05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.2

2 release files

This release

1.3.1 This release

2 release files

1.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page