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.
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
.gitdirectories - Patterns from
.gitignorefiles - Patterns from
.treemapperignorefile
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file treemapper-1.0.2.tar.gz.
File metadata
- Download URL: treemapper-1.0.2.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ab12ba2569ab27b52216e58d32c35cb86549a91405085e898660b7a4fd4768
|
|
| MD5 |
2501d2b180a6347dc302b832259d31dc
|
|
| BLAKE2b-256 |
0c1c40c3a2caa789b7649b909eb57d6e16dc0908120aef892cb8e04b4c9ed99b
|
Provenance
The following attestation bundles were made for treemapper-1.0.2.tar.gz:
Publisher:
cd.yml on nikolay-e/TreeMapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
treemapper-1.0.2.tar.gz -
Subject digest:
e4ab12ba2569ab27b52216e58d32c35cb86549a91405085e898660b7a4fd4768 - Sigstore transparency entry: 280638833
- Sigstore integration time:
-
Permalink:
nikolay-e/TreeMapper@e346d301e9207e0cb680736836ec63261e1620d7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nikolay-e
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@e346d301e9207e0cb680736836ec63261e1620d7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file treemapper-1.0.2-py3-none-any.whl.
File metadata
- Download URL: treemapper-1.0.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342926856e8e96d07b824238ebbc7f65a85986a0aa3a509e1460fea62029d801
|
|
| MD5 |
5af700de5ad0594aa82e8d8f8bc9a37d
|
|
| BLAKE2b-256 |
8c7e4fd6b254c22dd99bbd80c63878b969dd8093497e83a3aa2b671497cbd5f4
|
Provenance
The following attestation bundles were made for treemapper-1.0.2-py3-none-any.whl:
Publisher:
cd.yml on nikolay-e/TreeMapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
treemapper-1.0.2-py3-none-any.whl -
Subject digest:
342926856e8e96d07b824238ebbc7f65a85986a0aa3a509e1460fea62029d801 - Sigstore transparency entry: 280638843
- Sigstore integration time:
-
Permalink:
nikolay-e/TreeMapper@e346d301e9207e0cb680736836ec63261e1620d7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nikolay-e
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@e346d301e9207e0cb680736836ec63261e1620d7 -
Trigger Event:
workflow_dispatch
-
Statement type: