Skip to content

v0.1.0 Initial Release

Choose a tag to compare

@avirajsa avirajsa released this 09 Jul 06:43
· 5 commits to main since this release

TreeMark v0.1.0 Initial Release

This is the first official release of TreeMark, a minimal Python command-line utility that generates a readable, Markdown-formatted representation of your project’s folder and file structure.

TreeMark is designed for developers, technical writers, and anyone needing clear project structure documentation—whether for README files, onboarding documentation, or feeding structural context into language models.


Key Features

  • Recursive Markdown Tree Output
    Walks through the directory structure starting from a specified root and prints it in Markdown format.

  • Ignore Specific Files and Folders
    Use the --ignore option to skip over unwanted paths during the tree traversal.

  • Selective Inclusion
    The --select-only option allows you to include only specified top-level items.

  • Safe Directory Handling
    Automatically skips system-protected or inaccessible directories, avoiding PermissionError crashes.

  • No External Dependencies
    Implemented using only the Python standard library. Requires Python 3.6 or higher.


Installation

Install from PyPI:

pip install treemark

Basic Usage

treemark

By default, this generates a Markdown view of the current directory.

You can also customize the behavior using flags:

Option Description
--root Set the root directory (default: current directory)
--ignore Space-separated list of files/folders to exclude
--select-only Space-separated list of top-level items to include
--version Display version information and exit
-h, --help Show help message and exit

Example:

treemark --root myproject --ignore .git venv __pycache__

Output Example

# Project Structure

├── README.md
├── pyproject.toml
└── src/
    ├── cli.py
    └── core.py

This output is suitable for GitHub READMEs, documentation platforms, or as input for tools that require structural knowledge of a codebase.


Testing

TreeMark includes a basic test suite using pytest. To run tests:

pytest

Tests are located in the tests/ directory.


Known Issues

  • On some systems (e.g., Windows), protected folders like System Volume Information may trigger access errors. These are now handled and skipped silently.
  • Output assumes a monospace-friendly Markdown viewer. For best results, view it in GitHub, VS Code, or similar platforms.

Project Information


Future Work

Planned features for upcoming versions:

  • Support for outputting to a file
  • Limiting folder depth in output
  • Support for non-Markdown (ASCII-only) rendering
  • Configurable styles or themes

Let me know if you'd like this saved as a RELEASE_TEMPLATE.md or if you need version tagging automation.