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.1.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.1-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: historify-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 12778390924f5c1d1adf55d09519303d670ce823972d6f32aee9016f9dab6cfa
MD5 eea562174785e1bf65c322c53f7a05bc
BLAKE2b-256 558657918c72c648aa35e82ec2c343f2a215bc0a093d04c1159364bc35d495e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: historify-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45b5d31be9d129fbd446082e513463505d85598f47b1453809461d9652fb99f9
MD5 80033ae64fa30950753ad21315d28d30
BLAKE2b-256 36a283b9c7a277b959ca2a8b9c7b73b2d8ccc512bc47dfb6d35f0c9717061ebf

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