Skip to main content

A tool for revision-safe logging of file changes

Project description

Historify

A tool for revision-safe logging of file changes with cryptographic integrity verification.

Overview

Historify is a command-line utility that tracks file changes in one or multiple data directories while maintaining a secure and verifiable record of all modifications. It logs changes with cryptographic hashes (BLAKE3 and SHA256) and secures logs with minisign signatures, ensuring data authenticity and auditability.

Key Features

  • Secure Tracking: Uses BLAKE3 and SHA256 hashing with minisign signatures
  • Multiple Categories: Organize content with logical categorization of data
  • Integrity Verification: Full chain verification ensures tamper-evident history
  • Comprehensive Logging: Tracks new files, modifications, moves, deletions, and administrative events
  • Multiple Repositories: Supports managing multiple independent repositories

Installation

pip install historify

Requirements

  • Python 3.13 or later
  • minisign (for signing and verification)
  • b3sum (optional, for BLAKE3 hashing if native implementation is unavailable)

Quick Start

Initialize a Repository

# Create a new repository
historify init /path/to/repository --name "My Repository"

# Configure minisign keys
historify config minisign.key /path/to/minisign.key /path/to/repository
historify config minisign.pub /path/to/minisign.pub /path/to/repository

# Add a data category
historify add-category documents docs /path/to/repository

# Start tracking changes
historify start /path/to/repository

Daily Usage

# Scan for changes
historify scan /path/to/repository

# Add a comment about recent activity
historify comment "Updated documentation files" /path/to/repository

# Close current changelog and start a new one
historify closing /path/to/repository

# Verify the integrity of your repository
historify verify /path/to/repository

# Verify the full chain from seed to the latest signed changelog
historify verify --full-chain /path/to/repository

View Repository Information

# View repository status
historify status /path/to/repository

# View change history
historify log /path/to/repository

# Find duplicate files
historify duplicates /path/to/repository

Setting Up Automated Tracking

You can set up automated scanning using cron:

# Add to crontab to run daily at 2am
0 2 * * * HISTORIFY_PASSWORD="mypassword" /usr/local/bin/historify scan /path/to/repository

Environment Variables

  • HISTORIFY_PASSWORD: Password for encrypted minisign key

Documentation

For complete documentation on all commands and options, refer to the manual page.

Common Commands

Command Description
init Initialize a new repository
config Set configuration options
add-category Add a data category
start / closing Sign current changelog and create a new one
scan Scan for changes in tracked files
verify Verify repository integrity
log View change history
comment Add administrative comments
status Display repository status
duplicates Find duplicate files
snapshot Create a compressed archive of the repository

Change Detection

Historify automatically detects and tracks different types of file changes:

  • New Files: Files that appear for the first time in a category
  • Changed Files: Modifications to existing files (content changes)
  • Moved Files: Files that have been renamed or moved to a different location
  • Deleted Files: Files that no longer exist in the category

Each scan operation identifies these changes automatically and logs appropriate transactions in the changelog.

Repository Structure

repository/
├── db/
│   ├── config                  # Repository configuration
│   ├── integrity.csv           # Integrity verification information
│   └── seed.bin                # Random seed file 
│   └── seed.bin.minisig        # Signature for seed
└── changes/
    ├── changelog-YYYY-MM-DD.csv       # Daily change logs
    └── changelog-YYYY-MM-DD.csv.minisig # Signatures for change 

Integrity Verification

Historify provides two levels of integrity verification:

  1. File Integrity: Verifies that files haven't been modified since scanning
  2. Log Integrity: Verifies the changelog files themselves through:
    • Cryptographic signatures using minisign
    • Hash chaining where each changelog references the previous file

Contributions

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file 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

historify-0.1.4.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

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

historify-0.1.4-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

Details for the file historify-0.1.4.tar.gz.

File metadata

  • Download URL: historify-0.1.4.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Linux/6.14.2-arch1-1

File hashes

Hashes for historify-0.1.4.tar.gz
Algorithm Hash digest
SHA256 34da70cb0f50df355a7f972b9ee99ff35d297e6a15d93572dbef7146a2f3cd1a
MD5 e2184d18dfb37abd59f3c0714dd6d881
BLAKE2b-256 ce16ef13daf06ee2bf3a27cba599fbe414a8bf130b75eabc65132ecf60234b58

See more details on using hashes here.

File details

Details for the file historify-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: historify-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 44.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Linux/6.14.2-arch1-1

File hashes

Hashes for historify-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 72ebff210c51cbfd6eb5fe596ff99cb563c0d842dae27a50b6107782a2037d05
MD5 58b1bfa4a7173a01b7667e36dde3c0c7
BLAKE2b-256 d17ac1f90f1d44ee53c849d1050f169b95fb2c6a7b00f47f5ba7419c87b15bc5

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