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, 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

Repository Structure

repository/
├── db/
│   ├── config                  # Repository configuration
│   ├── integrity.csv           # Integrity verification information
│   └── seed.bin                # Random seed file (with .minisig signature)
├── changes/
│   ├── changelog-YYYY-MM-DD.csv       # Daily change logs
│   └── changelog-YYYY-MM-DD.csv.minisig # Signatures for change logs
└── [category-directories]/     # User-defined data categories

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.2.tar.gz (30.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.2-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: historify-0.1.2.tar.gz
  • Upload date:
  • Size: 30.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.2.tar.gz
Algorithm Hash digest
SHA256 b11d75aaa960cf4a31a8b4907a3e4f8eca3adc77e96cc41bea4214537a25bad2
MD5 485535cf024b976913d2b04e34124f90
BLAKE2b-256 bca865dd34195a095911e6b9701d9e410190a3e96572162b65f6622311935d9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: historify-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 40.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f07c24d1d4f6fe4194f0e500efa79232eee9b9abc1380b6d028eeaab05cc1668
MD5 dc8086ef190c0749ee0cdf28332ad8dc
BLAKE2b-256 8e42e1f66e9e82399d6b1fa52b8337f55de887597880bd782ee516b5638c2007

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