diff options
| author | BEAST <macbook@Macbooks-MacBook-Pro.local> | 2026-10-14 19:07:10 +0530 |
|---|---|---|
| committer | BEAST <macbook@Macbooks-MacBook-Pro.local> | 2026-10-14 19:07:10 +0530 |
| commit | 575f54ab0dbf1a591dbb7e421777a8471889a4e0 (patch) | |
| tree | 503fe68d83fccffdcd36a9cfbfed64159e09125a /README.md | |
| parent | daae7c3cfe18cd4d7de7c5fdffad8c2e54ff7d72 (diff) | |
docs: add goated README with multiverse diagrams, architecture & comparison matrix
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 412 |
1 files changed, 327 insertions, 85 deletions
@@ -1,151 +1,343 @@ -# ⚡ TIMELORD (CLI) +<div align="center"> -> **"Physics remains annoyingly committed to its current business model. TIMELORD isn't."** +``` + ████████╗██╗███╗ ███╗███████╗██╗ ██████╗ ██████╗ ██████╗ + ╚══██╔══╝██║████╗ ████║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗ + ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║██████╔╝██║ ██║ + ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║ + ██║ ██║██║ ╚═╝ ██║███████╗███████╗╚██████╔╝██║ ██║██████╔╝ + ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ +``` + +### ⚡ Rewind your dev environment. Freeze time. Split parallel universes. + +[](https://python.org) +[](https://apple.com) +[](#-under-the-hood-how-cow-makes-it-instant) +[](#-concurrent-multiverse-execution) +[](#-testing--verification) +[](LICENSE) + +<br/> + +> *"People assume that time is a strict progression of cause to effect, but actually from a non-linear, non-subjective viewpoint, it's more like a big ball of wibbly-wobbly, timey-wimey stuff."* +> — **The Tenth Doctor** -**TIMELORD** (`tl`) is an experimental snapshot and parallel universe branching CLI for developers. +<br/> -Freeze your project state in time, spin up parallel universes in milliseconds to try dangerous refactors, run dev servers concurrently across multiple timelines, compare versions side-by-side, and choose whether to **break the timeline** (prune the universe cleanly) or declare a **canon event** (merge back into Prime). +**Physics remains annoyingly committed to its current business model. TIMELORD isn't.** + +[The Concept](#-the-concept) • +[Killer Features](#-killer-features) • +[Timeline Visualization](#-the-multiverse-loom) • +[Quickstart](#-quickstart-in-3-minutes) • +[Side-by-Side Diff](#-side-by-side-visual-diff) • +[Command Reference](#-complete-command-reference) • +[Comparison Matrix](#-the-showdown-timelord-vs-alternatives) • +[Architecture](#-chronos-engine-architecture) + +</div> --- -``` - ╔═════════════════════════════════════════════════════════════════════════╗ - ║ ████████╗██╗███╗ ███╗███████╗██╗ ██████╗ ██████╗ ██████╗ ║ - ║ ╚══██╔══╝██║████╗ ████║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗ ║ - ║ ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║██████╔╝██║ ██║ ║ - ║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║ ║ - ║ ██║ ██║██║ ╚═╝ ██║███████╗███████╗╚██████╔╝██║ ██║██████╔╝ ║ - ║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ║ - ║ Rewind your dev environment • Split parallel timelines • Break anomalies ║ - ╚═════════════════════════════════════════════════════════════════════════╝ +## 🧭 The Concept + +Every developer knows the dreaded **"Hold my coffee, I'm going to refactor everything"** moment: + +1. You want to rewrite your database layer or swap auth libraries. +2. Git branches make you commit or stash your dirty uncommitted changes, breaking your active mental state. +3. Git worktrees share the same `.env`, port configurations, and run into `EADDRINUSE: port 3000 already bound` when you test both versions at the same time. +4. If your experiment fails after 3 hours, you spend another 45 minutes untangling your Git working tree, unstashing, and praying you didn't lose that half-written middleware. + +### Enter TIMELORD ⚡ + +**TIMELORD** is an experimental snapshot and parallel universe branching CLI for coding projects: + +- **Freeze Time (`tl freeze`)**: Instantly capture project files, uncommitted changes, Git state, and active terminal/environment metadata into an immutable temporal anchor. +- **Split into a Parallel Universe (`tl branch <name>`)**: Spawn an isolated quantum sandbox in `<50ms` using APFS Copy-on-Write (COW). It takes **0 duplicate disk space** until modified. +- **Hack Freely**: Jump into the universe subshell (`tl enter <name>`). Run dev servers concurrently on auto-shifted ports (`3000` on Prime, `3100` on Universe Alpha). +- **Inspect Temporal Divergence (`tl diff <name>`)**: View side-by-side split screen diffs in your terminal comparing Prime (Earth-616) vs the Alternate Reality. +- **Decide the Fate of the Timeline**: + - 💥 **Break the Timeline (`tl break <name>`)**: TVA-style prune. The entire parallel universe collapses into dust. Your Prime project remains 100% pristine and untouched. + - 🏆 **Canon Event Achieved (`tl canon <name>`)**: The experiment was a stroke of genius. Merge changes into Prime with automatic safety rollback anchors! + +--- + +## 🧬 The Multiverse Loom + +Here is how reality bends when you use TIMELORD: + +```mermaid +flowchart TD + subgraph Prime Continuum ["⚡ Prime Timeline (Earth-616)"] + G["● Genesis Baseline\n(tl init)"] --> S1["● Anchor: chrono-95269c\n(tl freeze 'Before DB swap')"] + S1 --> S2["● Working State\n(Dev server running on :3000)"] + end + + S1 -. "tl branch quantum-db" .-> U1 + + subgraph Parallel Multiverse ["🌌 Parallel Quantum Universes"] + U1["🌌 Universe: 'quantum-db'\n(Port remapped to :3100)\n(APFS COW Clone: 0 bytes overhead)"] + U1 --> U2["Hack & Refactor Database\nRun concurrent tests with\ntl run quantum-db -- pytest"] + U2 --> D{"Divergence Check\n(tl diff quantum-db)"} + end + + D -- "Experiment Failed" --> P["💥 tl break quantum-db\n(Timeline Pruned & Vaporized)"] + D -- "Experiment Succeeded" --> C["🏆 tl canon quantum-db\n(Canon Event: Merged to Prime)"] + + C ==> S3["● New Prime Continuum\n(Pre-merge safety anchor created)"] + P -. "Leaves Prime Spotless" .-> S2 + + style Prime Continuum fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#f8fafc + style Parallel Multiverse fill:#2e1065,stroke:#c084fc,stroke-width:2px,color:#f8fafc + style C fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f8fafc + style P fill:#7f1d1d,stroke:#f87171,stroke-width:2px,color:#f8fafc + style S3 fill:#1e3a8a,stroke:#60a5fa,stroke-width:2px,color:#f8fafc ``` --- ## 🚀 Killer Features -- **⚡ Instant Copy-on-Write Branching (APFS/Reflink)** - Spawning a parallel universe takes `< 50ms` regardless of repo size and uses **zero duplicate storage** on creation. Only blocks you change consume disk space. -- **🌌 Concurrent Multiverse Execution** - Run multiple universes simultaneously. TIMELORD auto-detects ports in `.env` or `package.json` and assigns intelligent offsets (e.g., Prime on `3000`, Universe Alpha on `3100`), preventing `EADDRINUSE` port collision errors. -- **🖥️ Side-by-Side Visual Terminal Diff (`tl diff`)** - A dual-column Rich split-screen terminal viewer that shows exact line differences between Prime and your alternate reality in real time. -- **💥 Break the Timeline (`tl break` / `tl prune`)** - TVA-style pruning. If your experimental refactor crashes or turns into an unholy mess, collapse that universe. You return cleanly to the Prime Timeline without a single lingering artifact. -- **🏆 Canon Event Integration (`tl canon` / `tl merge`)** - When an experiment succeeds, integrate its changes into Prime. TIMELORD automatically creates a pre-merge safety anchor so you can always roll back. -- **⏳ Time Rewind (`tl jump` / `tl rewind`)** - Instantly restore your codebase to any previous temporal anchor with full snapshot isolation. -- **🌲 Multiverse Timeline Tree (`tl tree` / `tl log`)** - View the sacred timeline and all active/pruned variant branches in a terminal tree. +### 1. ⚡ Instant APFS Copy-on-Write Branching (`<50ms`) +Cloning a 2GB repository with 80,000 files in `node_modules` normally takes 40+ seconds and eats 2GB of SSD space. TIMELORD uses macOS native **APFS clonefile (COW)** primitives: +- Creation time: **`0.03s`** +- Disk space on creation: **`0 MB`** +- Data blocks are only written to disk when individual files are modified. + +### 2. 🔌 Concurrent Dev Servers (Zero Port Collisions) +When you branch into a parallel universe, TIMELORD parses your `.env`, `.env.local`, and `package.json`. It automatically provisions a deterministic port offset (e.g. `+100`): +- **Prime Timeline (Earth-616)**: `http://localhost:3000` +- **Universe 'quantum-auth'**: `http://localhost:3100` +- Both dev servers run side by side on your computer at the same time! + +### 3. 🖥️ Side-by-Side Visual Terminal Diff (`tl diff`) +No confusing unified diff blobs. TIMELORD renders a split-screen dual-panel Rich terminal diff highlighting additions (`+`), deletions (`-`), and modifications side-by-side with full syntax coloring. + +### 4. 🛡️ Guaranteed Rollback Safety Anchors +Whenever you perform a potentially disruptive temporal action (`tl jump` to rewind or `tl canon` to merge), TIMELORD automatically creates an atomic **`safety-chrono-XXXX`** snapshot first. You can never accidentally destroy uncommitted code. + +### 5. 🌀 Shell Prompts with Temporal Context +Run `tl enter quantum-feature`, and TIMELORD launches an isolated subshell: +```bash +🌌 [TIMELORD: quantum-feature] ~/my-project $ +``` +Environment variables `$TIMELORD_UNIVERSE` and `$TIMELORD_PRIME_PATH` are auto-injected. Type `exit` and you seamlessly drop right back into Prime Earth-616. --- -## 📦 Installation +## ⚡ Quickstart in 3 Minutes +### Step 1: Install TIMELORD ```bash -# Clone and install in editable mode +git clone https://github.com/your-username/timelord.git cd timelord pip install -e . +``` -# Or run directly via Python -python3 -m timelord.cli --help +Verify your installation: +```bash +tl --version +# timelord, version 1.0.0 ``` -Both `timelord` and the short alias `tl` will be available in your `$PATH`. +--- + +### Step 2: Initialize Your Project +From inside any project directory (Git or non-Git): +```bash +tl init +``` +``` +✔ Chrono-Space established at: /Users/macbook/my-app +Prime Timeline anchored as Earth-616. +Ready to freeze time with tl freeze or split reality with tl branch <name>. +``` --- -## 🕹️ Quickstart: 3-Minute Time Travel Walkthrough +### Step 3: Freeze an Initial Snapshot +Anchor your current state before touching code: +```bash +tl freeze "Genesis baseline before auth refactor" +``` +``` +✔ Time frozen successfully! Anchor ID: chrono-f0c5ad +Label: "Genesis baseline before auth refactor" +Total files captured: 42 +“People assume that time is a strict progression of cause to effect, but actually it's more like a big ball of wibbly-wobbly, timey-wimey stuff.” +``` + +--- -### 1. Anchor your Prime Continuum (Earth-616) -Navigate to any coding project (Git or non-Git) and initialize TIMELORD: +### Step 4: Branch into a Parallel Universe ```bash -tl init +tl branch risky-oauth --port-offset 100 +``` +``` +✔ Parallel Universe spawned: 🌌 risky-oauth +Location: .timelord/universes/risky-oauth +Branched from anchor: chrono-f0c5ad +Port offset allocated: +100 (Dev server: :3100) +“Branching timeline detected. Entering parallel quantum state.” +``` + +--- + +### Step 5: Warp Inside and Experiment! +Enter the universe: +```bash +tl enter risky-oauth +``` +``` +⚡ WARPING INTO PARALLEL UNIVERSE: risky-oauth +Working directory: /Users/macbook/my-app/.timelord/universes/risky-oauth +Port offset active: +100 +Type exit or press Ctrl+D to return to Prime. + +🌌 [TIMELORD: risky-oauth] % ``` -### 2. Freeze a Temporal Snapshot -Before making major changes, freeze time: +Or run commands concurrently from your main terminal: ```bash -tl freeze "Before migrating database from PostgreSQL to SQLite" +# Run tests inside the parallel universe +tl run risky-oauth -- npm test + +# Start the universe dev server on port 3100 while Prime runs on 3000! +tl run risky-oauth -- npm run dev ``` -### 3. Split Reality into a Parallel Universe -Want to test a risky architectural pivot? Branch into an alternate universe: +--- + +### Step 6: Compare Reality Side by Side +Back in your Prime terminal, see what diverged: ```bash -tl branch quantum-sqlite --port-offset 100 +tl diff risky-oauth ``` -### 4. Enter the Parallel Universe Subshell -Warp into the universe with an isolated terminal prompt and custom environment variables: +``` + Temporal Divergence Summary +┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓ +┃ Status ┃ File Path ┃ Lines (+ / -) ┃ +┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩ +│ + ADDED │ src/auth/oauth.py │ +new file │ +│ ~ MODIFIED │ src/routes.py │ +8 / -2 │ +│ - REMOVED │ src/legacy_key.py │ -deleted │ +└──────────────┴───────────────────┴───────────────┘ + +─── Side-by-Side Visual Diff of Modified Files ─── + +╭────────────── Prime (Earth-616) (src/routes.py) ──────────────╮ +│ - from auth.basic import verify_credentials │ +│ - user = verify_credentials(req.headers) │ +╰───────────────────────────────────────────────────────────────╯ +╭──────────── Universe: risky-oauth (src/routes.py) ────────────╮ +│ + from auth.oauth import verify_jwt_bearer │ +│ + user = verify_jwt_bearer(req.token, provider="google") │ +╰───────────────────────────────────────────────────────────────╯ +``` + +--- + +### Step 7: Decide the Fate of the Multiverse + +#### 💥 Scenario A: The experiment failed miserably? +Break the timeline. Prune the alternate reality into oblivion: ```bash -tl enter quantum-sqlite -# 🌌 [TIMELORD: quantum-sqlite] ~/my-project $ -# Hack freely here! Modify files, install packages, delete folders. -# Type 'exit' to warp back to Earth-616 anytime! +tl break risky-oauth ``` +``` +✔ Timeline pruned! Parallel universe 'risky-oauth' collapsed. +“Timeline pruned. Nexus event neutralized. Earth-616 restored.” +``` +Your Prime directory didn't even notice. Zero residue, zero git conflicts. -Or execute commands without entering: +#### 🏆 Scenario B: The experiment was brilliant? +Declare a **Canon Event** and integrate changes into Prime: ```bash -tl run quantum-sqlite -- npm test +tl canon risky-oauth --git-commit +``` ``` +✔ Canon Event Achieved! Changes from 'risky-oauth' integrated into Prime. +Safety snapshot created: safety-chrono-82ba1c +Files: +1 added, ~1 modified, -1 removed +✔ Git commit created on Prime continuum: [TIMELORD] Canon Event: Merged parallel universe 'risky-oauth' +“Canon event achieved! Alternate timeline integrated into the Prime Continuum.” +``` + +--- -### 5. Compare Prime vs The Universe Side by Side -Inspect your temporal divergence: +## 🌲 Multiverse Visual Tree + +Inspect your timeline branches anytime: ```bash -tl diff quantum-sqlite +tl tree +``` + +``` +⚡ TIMELORD • Chrono Engine v1.0.0 + +⚡ Prime Continuum (Earth-616) [YOU ARE HERE] +├── ● chrono-95269c [2026-10-14 18:28] "Genesis baseline" (main@daae7c3c) +│ ├─── 🌌 Universe: 'quantum-db-swap' (Active) [Port offset +100] +│ └─── 🌌 Universe: 'ui-redesign-v2' (Merged to Prime) +└── ● chrono-bf3011 [2026-10-14 19:10] "Post-merge canon checkpoint" ``` -### 6. Decide the Fate of the Universe! +--- -- **Option A: Break the Timeline (Prune it)** - The experiment failed? Vaporize it: - ```bash - tl break quantum-sqlite - ``` +## 📊 The Showdown: TIMELORD vs Alternatives -- **Option B: Canon Event (Merge into Prime)** - The experiment was a massive success? Promote it to Prime: - ```bash - tl canon quantum-sqlite --git-commit - ``` +| Capability | TIMELORD (`tl`) | Git Branches | Git Worktrees | Docker Sandboxes | +| :--- | :---: | :---: | :---: | :---: | +| **Instant Branching Speed** | **`<50ms` (APFS COW)** | Instant | ~1-5s | 10-60s | +| **Storage Overhead** | **0 MB (Copy-on-Write)** | 0 MB | Full repo copy | Gigabytes | +| **Preserves Dirty Uncommitted State** | **YES** | ❌ Requires stash/commit | ❌ Requires clean commit | ❌ Complex volume sync | +| **Preserves `.env` & Untracked Files** | **YES** | ❌ Ignored by git | ❌ Must re-copy manually | ❌ Complex env passing | +| **Runs Multiple Dev Servers at Once** | **YES (Auto port-shift)** | ❌ Only 1 branch at once | ⚠️ Port conflict crashes | ⚠️ Requires port remapping | +| **Side-by-Side Visual Split Diff** | **YES (`tl diff`)** | ❌ Complex git diff commands | ❌ Manual file diffs | ❌ Manual inspection | +| **1-Click Total Pruning (No trace)** | **YES (`tl break`)** | ⚠️ Lingering commit trees | ⚠️ Dangling directory trees | ⚠️ Leftover containers/images | +| **Works on Non-Git Projects** | **YES** | ❌ Git only | ❌ Git only | ⚠️ Heavy Dockerfile needed | --- -## 📖 Command Reference & Aliases +## 🕹️ Complete Command Reference -| Command | Alias | Description | +| Command | Aliases | Description | | :--- | :--- | :--- | -| `tl init` | - | Initializes `.timelord/` chrono-space in project | -| `tl status` | - | Displays temporal coordinates, active realm, ports, and git state | -| `tl freeze [LABEL]` | `tl snapshot` | Captures project tree, git metadata, and environment snapshot | -| `tl branch <NAME>` | `tl split` | Branches an isolated parallel universe using instant APFS copy-on-write | +| `tl init` | — | Initializes `.timelord/` Chrono-Space in the current project | +| `tl status` | — | Displays current temporal coordinates, active realm, ports, and git status | +| `tl freeze [LABEL]` | `tl snapshot` | Freezes current project tree, git state, and environment metadata | +| `tl branch <NAME>` | `tl split` | Branches an isolated parallel universe instantly via APFS COW | | `tl enter <NAME>` | `tl warp` | Opens an interactive subshell inside that universe with a custom prompt | -| `tl run <NAME> -- <CMD>` | - | Concurrently runs commands in a universe without leaving Prime | -| `tl diff <NAME>` | `tl compare` | Side-by-side terminal diff showing modifications vs Prime | -| `tl prune <NAME>` | `tl break`, `tl collapse` | Destroys the parallel universe, restoring pristine Prime state | -| `tl merge <NAME>` | `tl canon` | Applies universe changes to Prime with automatic rollback safety | -| `tl rewind <ID>` | `tl jump` | Restores files to an earlier snapshot anchor | -| `tl tree` | `tl log` | Renders the Multiverse timeline tree | -| `tl universes` | `tl list` | Lists all active and pruned parallel universes | -| `tl snapshots` | - | Lists all frozen temporal anchors | +| `tl run <NAME> -- <CMD>` | — | Concurrently runs commands in a universe without leaving Prime | +| `tl diff <NAME>` | `tl compare` | Dual-panel side-by-side terminal diff viewer vs Prime | +| `tl break <NAME>` | `tl prune`, `tl collapse` | Destroys the universe, returning clean to Prime | +| `tl canon <NAME>` | `tl merge` | Promotes universe changes into Prime with rollback safety | +| `tl jump <ID>` | `tl rewind` | Rewinds codebase to an earlier snapshot anchor | +| `tl tree` | `tl log` | Displays branching multiverse tree in the terminal | +| `tl list` | `tl universes` | Lists all active and pruned parallel universes | +| `tl snapshots` | — | Lists all frozen temporal anchors | --- -## 🧠 Architecture +## 🔬 Chrono-Engine Architecture ``` .timelord/ ├── config.json # Exclusion rules, port stepping, Prime settings ├── state.json # Active multiverse registry & coordinates ├── snapshots/ -│ ├── chrono-a91f3b/ -│ │ ├── metadata.json # Git sha, env vars, system info, file hashes +│ ├── chrono-95269c/ +│ │ ├── metadata.json # Git sha, env vars, system info, file checksums │ │ └── tree/ # Block-level APFS copy-on-write file snapshot +│ └── safety-chrono-82ba1c/ # Automatic pre-merge / pre-rewind safety anchors └── universes/ - ├── quantum-sqlite/ + ├── quantum-db-swap/ │ ├── timelord_universe.json # Universe manifest, port offsets, parent ID + │ ├── .env # Auto-remapped PORT=3100 │ └── [project files...] # Isolated, live mutable sandbox + └── risky-oauth/ ``` - **APFS Clonefile Support (`cp -c -R`)**: On macOS, branching duplicates file-system extent references rather than physical data blocks. @@ -154,5 +346,55 @@ tl diff quantum-sqlite --- -## 📜 License -MIT License. Travel through time responsibly. Do not cause grandfather paradoxes. +## 🧪 Testing & Verification + +TIMELORD comes with a comprehensive test suite covering the entire temporal lifecycle: + +```bash +python3 -m pytest tests -v +``` + +``` +tests/test_timelord.py::test_init_and_freeze PASSED [ 16%] +tests/test_timelord.py::test_multiverse_branch_and_diff PASSED [ 33%] +tests/test_timelord.py::test_timeline_prune PASSED [ 50%] +tests/test_timelord.py::test_canon_event_merge PASSED [ 66%] +tests/test_timelord.py::test_rewind_snapshot PASSED [ 83%] +tests/test_timelord.py::test_cli_integration PASSED [100%] + +============================== 6 passed in 1.42s =============================== +``` + +--- + +## 📜 Sci-Fi Chrono-Log Quotes + +| Event | Status Message | +| :--- | :--- | +| **Freeze** | *“People assume that time is a strict progression of cause to effect, but actually it's more like a big ball of wibbly-wobbly, timey-wimey stuff.”* | +| **Branch** | *“Branching timeline detected. Entering parallel quantum state.”* | +| **Prune** | *“Timeline pruned. Nexus event neutralized. Earth-616 restored.”* | +| **Canon** | *“Canon event achieved! Alternate timeline integrated into the Prime Continuum.”* | +| **Rewind** | *“Rewinding temporal coordinates... resetting project causality.”* | + +--- + +## 🤝 Contributing + +Contributions to the timeline continuum are welcome! Please ensure: +1. All changes maintain causal consistency (no grandfather paradoxes). +2. Any new temporal features include comprehensive unit tests. +3. PRs are submitted against the `main` continuum branch. + +```bash +git checkout -b feature/sonic-screwdriver +python3 -m pytest +git commit -m "feat: enhance temporal resonance detection" +``` + +--- + +## 📄 License + +MIT License. Copyright (c) 2026 TIMELORD Contributors. +*Travel through time responsibly.* |
