|
| 1 | +<!-- |
| 2 | +SPDX-License-Identifier: CC-BY-SA-4.0 |
| 3 | +SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
| 4 | +--> |
| 5 | + |
| 6 | +[](https://opensource.org/licenses/MPL-2.0) |
| 7 | +[](https://github.com/hyperpolymath/palimpsest-license) |
| 8 | + |
| 9 | +Jonathan D.A. Jewell \<[j.d.a.jewell@open.ac](j.d.a.jewell@open.ac).uk\> |
| 10 | +:toc: macro :icons: font :source-highlighter: rouge :experimental: |
| 11 | +:url-github: <https://github.com/hyperpolymath/januskey> :url-gitlab: |
| 12 | +<https://gitlab.com/hyperpolymath/januskey> :url-bitbucket: |
| 13 | +<https://bitbucket.org/hyperpolymath/januskey> :url-codeberg: |
| 14 | +<https://codeberg.org/hyperpolymath/januskey> |
| 15 | + |
| 16 | +**Reversible File Operations (formal proofs pending) Through Maximal |
| 17 | +Principle Reduction** |
| 18 | + |
| 19 | +[](https://github.com/hyperpolymath/rhodium-standard-repositories) |
| 20 | + |
| 21 | +<div id="toc"> |
| 22 | + |
| 23 | +</div> |
| 24 | + |
| 25 | +# Overview |
| 26 | + |
| 27 | +JanusKey is a file operation utility suite that pursues complete |
| 28 | +reversibility through architectural design rather than logging or |
| 29 | +backups. Unlike traditional backup systems that restore from external |
| 30 | +state, JanusKey operations carry sufficient information for inversion — |
| 31 | +the goal is to make data loss architecturally impossible (formal proofs |
| 32 | +pending). |
| 33 | + |
| 34 | +## Key Features |
| 35 | + |
| 36 | +- **Reversible by design** - Every operation carries inversion metadata |
| 37 | + (formal proofs pending) |
| 38 | + |
| 39 | +- **Instant Rollback** - Undo changes in milliseconds |
| 40 | + |
| 41 | +- **Data loss impossible by construction** - the architectural goal the |
| 42 | + pending proofs are to establish |
| 43 | + |
| 44 | +- **Complete Audit Trail** - Every change tracked automatically |
| 45 | + |
| 46 | +- **Transaction Support** - Group operations, commit/rollback together |
| 47 | + |
| 48 | +- **Content-Addressed Storage** - SHA256 hashing with deduplication |
| 49 | + |
| 50 | +# Quick Start |
| 51 | + |
| 52 | +```bash |
| 53 | +# Build from source (requires Rust) |
| 54 | +cd src/januskey |
| 55 | +cargo build --release |
| 56 | + |
| 57 | +# Initialize JanusKey in your project |
| 58 | +jk init |
| 59 | + |
| 60 | +# Delete files (reversible) |
| 61 | +jk delete *.log |
| 62 | + |
| 63 | +# Undo the delete |
| 64 | +jk undo |
| 65 | + |
| 66 | +# Transactions for batch operations |
| 67 | +jk begin |
| 68 | +jk delete temp*.txt |
| 69 | +jk modify "s/DEBUG/INFO/g" config.yaml |
| 70 | +jk preview # Review changes |
| 71 | +jk commit # Or: jk rollback |
| 72 | +``` |
| 73 | + |
| 74 | +# Commands |
| 75 | + |
| 76 | +| Command | Description | |
| 77 | +|----|----| |
| 78 | +| `jk` `init` | Initialize JanusKey in current directory | |
| 79 | +| `jk` `delete` `<files>` | Delete files (reversible) | |
| 80 | +| `jk` `modify` `<pattern>` `<files>` | Modify files with sed-like syntax | |
| 81 | +| `jk` `move` `<src>` `<dst>` | Move/rename files | |
| 82 | +| `jk` `copy` `<src>` `<dst>` | Copy files | |
| 83 | +| `jk` `undo` `[--count` `N]` | Undo last operation(s) | |
| 84 | +| `jk` `begin` `[name]` | Start a transaction | |
| 85 | +| `jk` `commit` | Commit current transaction | |
| 86 | +| `jk` `rollback` | Rollback current transaction | |
| 87 | +| `jk` `preview` | Preview pending changes | |
| 88 | +| `jk` `history` | Show operation history | |
| 89 | +| `jk` `status` | Show current status | |
| 90 | + |
| 91 | +# Architecture |
| 92 | + |
| 93 | +JanusKey implements **Maximal Principle Reduction (MPR)**, a security |
| 94 | +methodology where vulnerability elimination occurs by construction |
| 95 | +rather than verification. |
| 96 | + |
| 97 | + +----------------------------+ |
| 98 | + | JanusKey CLI | <-- jk delete, jk modify, jk move |
| 99 | + +----------------------------+ |
| 100 | + | Operation Layer | <-- Generates inverse metadata |
| 101 | + +----------------------------+ |
| 102 | + | Transaction Manager | <-- Groups ops, commit/rollback |
| 103 | + +----------------------------+ |
| 104 | + | Metadata Store | <-- Append-only operation log |
| 105 | + +----------------------------+ |
| 106 | + | Content-Addressed Storage | <-- SHA256, deduplication |
| 107 | + +----------------------------+ |
| 108 | + |
| 109 | +## Reversibility Guarantee |
| 110 | + |
| 111 | +Every operation stores sufficient metadata for perfect inversion: |
| 112 | + |
| 113 | +- **Delete**: Stores full content + metadata for restoration |
| 114 | + |
| 115 | +- **Modify**: Stores original content hash for rollback |
| 116 | + |
| 117 | +- **Move**: Stores original path for unmove |
| 118 | + |
| 119 | +- **Copy**: Destination path for deletion |
| 120 | + |
| 121 | +# Installation |
| 122 | + |
| 123 | +## From Source (Rust) |
| 124 | + |
| 125 | +```bash |
| 126 | +# Clone the repository |
| 127 | +git clone {url-github} |
| 128 | +cd januskey/src/januskey |
| 129 | + |
| 130 | +# Build release binary |
| 131 | +cargo build --release |
| 132 | + |
| 133 | +# Install to PATH |
| 134 | +cargo install --path . |
| 135 | +``` |
| 136 | + |
| 137 | +# Mirrors |
| 138 | + |
| 139 | +| Platform | URL | |
| 140 | +|------------------|-----------------| |
| 141 | +| GitHub (primary) | {url-github} | |
| 142 | +| GitLab | {url-gitlab} | |
| 143 | +| Bitbucket | {url-bitbucket} | |
| 144 | +| Codeberg | {url-codeberg} | |
| 145 | + |
| 146 | +# License |
| 147 | + |
| 148 | +This project is licensed under the Mozilla Public License, v. 2.0. See |
| 149 | +the `LICENSE` file for details. |
| 150 | + |
| 151 | +SPDX-License-Identifier: CC-BY-SA-4.0 |
| 152 | + |
| 153 | +# Contributing |
| 154 | + |
| 155 | +See <a href="CONTRIBUTING.md" class="md">CONTRIBUTING</a>. |
| 156 | + |
| 157 | +# Research |
| 158 | + |
| 159 | +JanusKey is based on research into reversible computing (formal proofs |
| 160 | +are a target, not yet complete) and Maximal Principle Reduction. See the |
| 161 | +white paper in `docs/` for formal proofs and theoretical foundations. |
| 162 | + |
| 163 | +# Metadata |
| 164 | + |
| 165 | +- Domain: software-development |
| 166 | + |
| 167 | +- Framework: RSR (Rhodium Standard Repository) |
| 168 | + |
| 169 | +- Language: Rust |
| 170 | + |
| 171 | +- Dublin Core: <a href=".well-known/dc.xml" |
| 172 | + class="well-known/dc xml">.well-known/dc.xml</a> |
| 173 | + |
| 174 | +# Architecture |
| 175 | + |
| 176 | +See <a href="TOPOLOGY.md" class="md">TOPOLOGY</a> for a visual |
| 177 | +architecture map and completion dashboard. |
0 commit comments