Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

223 Commits

License: MPL-2.0Palimpsest

Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> :toc: macro :icons: font :source-highlighter: rouge :experimental: :url-github: https://github.com/hyperpolymath/januskey :url-gitlab: https://gitlab.com/hyperpolymath/januskey :url-bitbucket: https://bitbucket.org/hyperpolymath/januskey :url-codeberg: https://codeberg.org/hyperpolymath/januskey

Reversible File Operations (formal proofs pending) Through Maximal Principle Reduction

RSR Certified

Overview

JanusKey is a file operation utility suite that pursues complete reversibility through architectural design rather than logging or backups. Unlike traditional backup systems that restore from external state, JanusKey operations carry sufficient information for inversion — the goal is to make data loss architecturally impossible (formal proofs pending).

Key Features

  • Reversible by design - Every operation carries inversion metadata (formal proofs pending)

  • Instant Rollback - Undo changes in milliseconds

  • Data loss resistant by construction - reversibility is the architectural goal the pending proofs are to establish. (Note: secure obliteration is the deliberate exception and is best-effort only — overwrite-in-place cannot guarantee physical erasure on SSD/CoW/journaling media; see the threat model.)

  • Complete Audit Trail - Every change tracked automatically

  • Transaction Support - Group operations, commit/rollback together

  • Content-Addressed Storage - SHA256 hashing with deduplication

Quick Start

# Build from source (requires Rust)
cargo build --workspace --release
# Initialize JanusKey in your project
jk init
# Delete files (reversible)
jk delete *.log
# Undo the delete
jk undo
# Transactions for batch operations
jk begin
jk delete temp*.txt
jk modify "s/DEBUG/INFO/g" config.yaml
jk preview # Review changes
jk commit # Or: jk rollback

Commands

CommandDescription
jkinitInitialize JanusKey in current directory
jkdelete<files>Delete files (reversible)
jkmodify<pattern><files>Modify files with sed-like syntax
jkmove<src><dst>Move/rename files
jkcopy<src><dst>Copy files
jkundo[--countN]Undo last operation(s)
jkbegin[name]Start a transaction
jkcommitCommit current transaction
jkrollbackRollback current transaction
jkpreviewPreview pending changes
jkhistoryShow operation history
jkstatusShow current status

Architecture

JanusKey implements Maximal Principle Reduction (MPR), a security methodology where vulnerability elimination occurs by construction rather than verification.

+----------------------------+
| JanusKey CLI | <-- jk delete, jk modify, jk move
+----------------------------+
| Operation Layer | <-- Generates inverse metadata
+----------------------------+
| Transaction Manager | <-- Groups ops, commit/rollback
+----------------------------+
| Metadata Store | <-- Append-only operation log
+----------------------------+
| Content-Addressed Storage | <-- SHA256, deduplication
+----------------------------+

Reversibility Guarantee

Every operation stores sufficient metadata for perfect inversion:

  • Delete: Stores full content + metadata for restoration

  • Modify: Stores original content hash for rollback

  • Move: Stores original path for unmove

  • Copy: Destination path for deletion

Installation

From Source (Rust)

# Clone the repository
git clone {url-github}
cd januskey
# Build release binary
cargo build --workspace --release
# Install to PATH
cargo install --path .

Mirrors

PlatformURL
GitHub (primary){url-github}
GitLab{url-gitlab}
Bitbucket{url-bitbucket}
Codeberg{url-codeberg}

License

This project is licensed under the Mozilla Public License, v. 2.0. See the LICENSE file for details.

SPDX-License-Identifier: CC-BY-SA-4.0

Contributing

See CONTRIBUTING.

Research

JanusKey is based on research into reversible computing (formal proofs are a target, not yet complete) and Maximal Principle Reduction. See the white paper in docs/ for formal proofs and theoretical foundations.

Metadata

  • Domain: software-development

  • Framework: RSR (Rhodium Standard Repository)

  • Language: Rust

  • Dublin Core: .well-known/dc.xml

Architecture

See TOPOLOGY for a visual architecture map and completion dashboard.

About

Provably reversible file operations through maximal principle reduction - data loss architecturally impossible

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages