Skip to main content

A tool for mapping directory structures

Project description

TreeMapper

A tool for converting directory structures to YAML format, designed for use with Large Language Models (LLMs). TreeMapper maps your entire codebase into a structured YAML file, making it easy to analyze code, document projects, and work with AI tools.

Build Status PyPI License

Installation

Requires Python 3.9+:

pip install treemapper

Usage

Generate a YAML tree of a directory:

# Map current directory
treemapper .

# Map specific directory
treemapper /path/to/dir

# Custom output file
treemapper . -o my-tree.yaml

# Custom ignore patterns
treemapper . -i ignore.txt

# Disable all default ignores
treemapper . --no-default-ignores

Options

treemapper [OPTIONS] [DIRECTORY]

Arguments:
  DIRECTORY                    Directory to analyze (default: current directory)

Options:
  -o, --output-file FILE      Output YAML file (default: directory_tree.yaml)
  -i, --ignore-file FILE      Custom ignore patterns file
  --no-default-ignores        Disable all default ignores
  -v, --verbosity [0-3]       Logging verbosity (default: 0)
                             0=ERROR, 1=WARNING, 2=INFO, 3=DEBUG
  -h, --help                  Show this help

Ignore Patterns

By default, TreeMapper ignores:

  • The output file itself
  • All .git directories
  • Patterns from .gitignore files
  • Patterns from .treemapperignore file

Use --no-default-ignores to disable all default ignores and only use patterns from -i/--ignore-file.

Example Output

name: my-project
type: directory
children:
  - name: src
    type: directory
    children:
      - name: main.py
        type: file
        content: |
          def main():
              print("Hello World")
  - name: README.md
    type: file
    content: |
      # My Project
      Documentation here...

License

Apache License 2.0 - 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

treemapper-1.0.3.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

treemapper-1.0.3-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file treemapper-1.0.3.tar.gz.

File metadata

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

File hashes

Hashes for treemapper-1.0.3.tar.gz
Algorithm Hash digest
SHA256 92f9098687a5b5d434e05b8b874c8e8fcb1e7dba1172ddeff57f370f525cfa23
MD5 f8729342e52719906b7dcc8108d9b6f4
BLAKE2b-256 a494c350836a2f1002fcd6d25a96e2bea6e840b819ba54bb69fd37672fd382eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for treemapper-1.0.3.tar.gz:

Publisher: cd.yml on nikolay-e/TreeMapper

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

File details

Details for the file treemapper-1.0.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for treemapper-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a3c9e197ca5cb08755490f2d02c0aefb442f78ec52b9abf22bd54fa190ec6d
MD5 b079e8811087785d66ca8e954274bc62
BLAKE2b-256 8782434025d52093ac53f4dfc0f2ff0bd7ef866853c5a1de8d940c651edec546

See more details on using hashes here.

Provenance

The following attestation bundles were made for treemapper-1.0.3-py3-none-any.whl:

Publisher: cd.yml on nikolay-e/TreeMapper

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