Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📸 Directory Snapshot Tool

The Directory Snapshot Tool is a powerful Python utility designed to help developers and system administrators take detailed snapshots of directory structures—including file sizes, SHA256 hashes, and modification timestamps—and compare them effortlessly over time. Ideal for plugin developers, security auditors, and IT professionals, it provides clear JSON reports highlighting added, removed, or modified files. The tool features an intuitive command-line interface enhanced with Rich for clean and colorful output. By using the Directory Snapshot Tool from KMS STUDIO DEV, you gain reliable insights into filesystem changes, enabling better version control, auditing, and system integrity checks. Developed by Du-rock KOUMASSI (heresalord)- KMS STUDIO DEV.

🧾 Features

  • Recursive directory scan
  • JSON snapshot with:
    • Relative path
    • File size
    • SHA256 hash
    • Last modification date
  • Snapshot naming: timestamp or custom name
  • Compare two snapshots:
    • Added files
    • Removed files
    • Modified files (size or hash changes)
  • Clean CLI output using Rich

🚀 Usage

python main.py

Interactive menu will let you:

  • Take a snapshot
  • Compare snapshots
  • Exit safely

📂 Project Structure

directory_snapshot_tool/
├── main.py              # CLI entry point
├── snapshot.py          # Snapshot creation logic
├── compare.py           # Snapshot comparison logic
├── utils.py             # Hashing, formatting, timestamp utilities
├── snapshots/           # Stores snapshot .json files
└── assets/
    └── banner.txt       # ASCII banner

🔧 Installation

pip install -r requirements.txt

✅ Requirements

  • Python 3.8+ typer Création de la CLI et interface interactive rich Affichage coloré et convivial dans le terminal (tables, prompts, etc.) hashlib Calcul du hash SHA256 (inclus dans Python standard) pathlib Manipulation des chemins de fichiers (standard Python) json Sauvegarde et lecture des snapshots (standard Python) os, sys

---

## 🔹 2. `requirements.txt`

```txt
rich
typer
hashlib
pathlib
os

🔹 3. .gitignore

# Ignore Python cache
__pycache__/
*.pyc

# Ignore virtual environments
.venv/
env/
venv/

# Ignore snapshots
snapshots/*.json

# Ignore system files
.DS_Store

🔹 4. LICENSE (MIT example)

MIT License

Copyright (c) 2025 [Your Name]

Permission is hereby granted, free of charge, to any person obtaining a copy...
(full MIT license here)

About

Directory Snapshot Tool by Du-rock KOUMASSI (heresalord) - KMS STUDIO DEV. A Python CLI tool to capture and compare directory snapshots with file size, SHA256 hash, and modification date. Perfect for developers and auditors to track file changes with clear JSON reports and rich CLI output.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages