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
.jpgfiles, 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
- Create a feature branch:
git checkout -b feature/your-change
- Commit your changes:
git commit -m "Add feature"
- Push to your branch:
git push origin feature/your-change
- 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
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae7690177f8feb6c25488e842885cdf491a3897e90ebeca6d2c7a3b5eeb542ae
|
|
| MD5 |
d196bff459824f653a2042b69fadffd3
|
|
| BLAKE2b-256 |
b3c55adf4dea6a9730a90faf354aff1d28b2b39f9adf70c5f3fd9485b190b5e3
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b1e8fe3a91c3794a7781df568cf953bfe1d2169663556128a597ffd8a6f57d7
|
|
| MD5 |
5437e5bf8ab797a18172b48c619f6968
|
|
| BLAKE2b-256 |
2f0075e43b55111377fb822c2ce6f1d41c81ff20d83ce072d2b1d808fbbc6093
|