Skip to main content

CLI tool that tracks file and folders structure of a project

Project description

🗺️ directorymap

Project directory structure tracker CLI.
Lightweight, deterministic, and automation-friendly.

directorymap scans your project, applies ignore and limit rules, and generates a clean, reproducible snapshot of your filesystem structure. It is designed to help you track how your directory layout evolves over time.


Features

  • Deterministic directory structure snapshots
  • Ignore rules for filtering unwanted files
  • Limit rules for controlled sampling of files
  • Structure diffing between snapshots
  • File and folder statistics
  • Structural hashing for reproducibility
  • Watch mode for automatic updates
  • CI/CD friendly output

Installation

Install from PyPI

pip install directorymap

Install from source

python -m pip install -e .

Quick Start

directorymap init
directorymap build
directorymap diff
directorymap stats
directorymap hash
directorymap watch

Commands

Command Description
init Initialize .directorymap/ and create config + initial snapshot
build Generate or update the structure snapshot
diff Show differences from the previous snapshot
stats Display file, folder, and size statistics
hash Output a structural fingerprint
watch Continuously update on file changes

Configuration

Configuration is stored at: .directorymap/config

Example

node_modules .git pycache .DS_Store *.log *.tmp dist


Ignore and Limit Rules

directorymap supports both ignore rules and controlled inclusion using limits.

Ignore rules

  • Plain names are ignored globally
  • Glob patterns (e.g. *.png) exclude matching files entirely

Example: *.png node_modules

Limit rules

You can restrict how many files of a certain pattern are included in the snapshot by adding a number: *.jpg 5

This means:

  • If a directory contains many .jpg files, only up to 5 will be included
  • Selection is deterministic to keep output stable

This is useful when:

  • Folders contain large numbers of similar assets
  • You want representative visibility without clutter
  • Maintaining stable diffs is important

Combined example: *.jpeg 5 *.png *.log 2


Output Example

directorymap/
├─ directorymap/
│  ├─ __init__.py
│  ├─ cli.py
│  └─ core.py
├─ .DS_Store
├─ .gitignore
├─ pyproject.toml
├─ README.md
└─ uploadCmd.txt

Local Development

git clone https://github.com/sankalp6115/directorymap
cd directorymap
pip install build
python -m build
pip install dist/*.whl

Make changes inside directorymap/ and validate using:

directorymap build
directorymap diff
directorymap stats

Building the Package

pip install build
python -m build

Testing

Currently, there is no automated test suite. Verify functionality using CLI commands:

directorymap init
directorymap build
directorymap diff
directorymap stats
directorymap hash
directorymap watch

Contributing

  1. Create a feature branch:
   git checkout -b feature/your-change
  1. Commit your changes:
   git commit -m "Add feature"
  1. Push to your branch:
   git push origin feature/your-change
  1. Open a pull request with:
    • Description of changes
    • Steps to test locally
    • Expected output/behavior

Design Goals

  • Deterministic output across environments
  • Minimal configuration overhead
  • Readable and diff-friendly structure
  • Suitable for version control and automation workflows

Contact

sankalpomar6115@gmail.com

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

directorymap-0.3.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

directorymap-0.3.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file directorymap-0.3.2.tar.gz.

File metadata

  • Download URL: directorymap-0.3.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for directorymap-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ae7690177f8feb6c25488e842885cdf491a3897e90ebeca6d2c7a3b5eeb542ae
MD5 d196bff459824f653a2042b69fadffd3
BLAKE2b-256 b3c55adf4dea6a9730a90faf354aff1d28b2b39f9adf70c5f3fd9485b190b5e3

See more details on using hashes here.

File details

Details for the file directorymap-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: directorymap-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for directorymap-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b1e8fe3a91c3794a7781df568cf953bfe1d2169663556128a597ffd8a6f57d7
MD5 5437e5bf8ab797a18172b48c619f6968
BLAKE2b-256 2f0075e43b55111377fb822c2ce6f1d41c81ff20d83ce072d2b1d808fbbc6093

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