```
████████╗██╗███╗ ███╗███████╗██╗ ██████╗ ██████╗ ██████╗
╚══██╔══╝██║████╗ ████║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗
██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║██████╔╝██║ ██║
██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║
██║ ██║██║ ╚═╝ ██║███████╗███████╗╚██████╔╝██║ ██║██████╔╝
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝
```
### ⚡ 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)
> *"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**
**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)
---
## 🧭 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 `)**: 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 `). Run dev servers concurrently on auto-shifted ports (`3000` on Prime, `3100` on Universe Alpha).
- **Inspect Temporal Divergence (`tl diff `)**: 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 `)**: TVA-style prune. The entire parallel universe collapses into dust. Your Prime project remains 100% pristine and untouched.
- 🏆 **Canon Event Achieved (`tl canon `)**: 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
### 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.
---
## ⚡ Quickstart in 3 Minutes
### Step 1: Install TIMELORD
```bash
git clone https://github.com/gigagamerchaddhruv-spec/timelord.git
cd timelord
pip install -e .
```
Verify your installation:
```bash
tl --version
# timelord, version 1.0.0
```
---
### 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 .
```
---
### 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.”
```
---
### Step 4: Branch into a Parallel Universe
```bash
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] %
```
Or run commands concurrently from your main terminal:
```bash
# 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
```
---
### Step 6: Compare Reality Side by Side
Back in your Prime terminal, see what diverged:
```bash
tl diff risky-oauth
```
```
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 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.
#### 🏆 Scenario B: The experiment was brilliant?
Declare a **Canon Event** and integrate changes into Prime:
```bash
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.”
```
---
## 🌲 Multiverse Visual Tree
Inspect your timeline branches anytime:
```bash
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"
```
---
## 📊 The Showdown: TIMELORD vs Alternatives
| 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 |
---
## 🕹️ Complete Command Reference
| Command | Aliases | Description |
| :--- | :--- | :--- |
| `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 ` | `tl split` | Branches an isolated parallel universe instantly via APFS COW |
| `tl enter ` | `tl warp` | Opens an interactive subshell inside that universe with a custom prompt |
| `tl run -- ` | — | Concurrently runs commands in a universe without leaving Prime |
| `tl diff ` | `tl compare` | Dual-panel side-by-side terminal diff viewer vs Prime |
| `tl break ` | `tl prune`, `tl collapse` | Destroys the universe, returning clean to Prime |
| `tl canon ` | `tl merge` | Promotes universe changes into Prime with rollback safety |
| `tl jump ` | `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 |
---
## 🔬 Chrono-Engine Architecture
```
.timelord/
├── config.json # Exclusion rules, port stepping, Prime settings
├── state.json # Active multiverse registry & coordinates
├── snapshots/
│ ├── 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-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.
- **Port Offset Engine**: Dynamically shifts environment `PORT` specifications in child universes to let both dev servers listen simultaneously.
- **Safety Pre-Rollbacks**: Any destructive action (`rewind` or `merge`) automatically creates an un-pruned safety snapshot before modifying disks.
---
## 🧪 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.*