diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..beee1da --- /dev/null +++ b/README.md @@ -0,0 +1,158 @@ +# ⚡ TIMELORD (CLI) + +> **"Physics remains annoyingly committed to its current business model. TIMELORD isn't."** + +**TIMELORD** (`tl`) is an experimental snapshot and parallel universe branching CLI for developers. + +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). + +--- + +``` + ╔═════════════════════════════════════════════════════════════════════════╗ + ║ ████████╗██╗███╗ ███╗███████╗██╗ ██████╗ ██████╗ ██████╗ ║ + ║ ╚══██╔══╝██║████╗ ████║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗ ║ + ║ ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║██████╔╝██║ ██║ ║ + ║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║ ║ + ║ ██║ ██║██║ ╚═╝ ██║███████╗███████╗╚██████╔╝██║ ██║██████╔╝ ║ + ║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ║ + ║ Rewind your dev environment • Split parallel timelines • Break anomalies ║ + ╚═════════════════════════════════════════════════════════════════════════╝ +``` + +--- + +## 🚀 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. + +--- + +## 📦 Installation + +```bash +# Clone and install in editable mode +cd timelord +pip install -e . + +# Or run directly via Python +python3 -m timelord.cli --help +``` + +Both `timelord` and the short alias `tl` will be available in your `$PATH`. + +--- + +## 🕹️ Quickstart: 3-Minute Time Travel Walkthrough + +### 1. Anchor your Prime Continuum (Earth-616) +Navigate to any coding project (Git or non-Git) and initialize TIMELORD: +```bash +tl init +``` + +### 2. Freeze a Temporal Snapshot +Before making major changes, freeze time: +```bash +tl freeze "Before migrating database from PostgreSQL to SQLite" +``` + +### 3. Split Reality into a Parallel Universe +Want to test a risky architectural pivot? Branch into an alternate universe: +```bash +tl branch quantum-sqlite --port-offset 100 +``` + +### 4. Enter the Parallel Universe Subshell +Warp into the universe with an isolated terminal prompt and custom environment variables: +```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! +``` + +Or execute commands without entering: +```bash +tl run quantum-sqlite -- npm test +``` + +### 5. Compare Prime vs The Universe Side by Side +Inspect your temporal divergence: +```bash +tl diff quantum-sqlite +``` + +### 6. Decide the Fate of the Universe! + +- **Option A: Break the Timeline (Prune it)** + The experiment failed? Vaporize it: + ```bash + tl break quantum-sqlite + ``` + +- **Option B: Canon Event (Merge into Prime)** + The experiment was a massive success? Promote it to Prime: + ```bash + tl canon quantum-sqlite --git-commit + ``` + +--- + +## 📖 Command Reference & Aliases + +| Command | Alias | 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 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 | + +--- + +## 🧠 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 +│ │ └── tree/ # Block-level APFS copy-on-write file snapshot +└── universes/ + ├── quantum-sqlite/ + │ ├── timelord_universe.json # Universe manifest, port offsets, parent ID + │ └── [project files...] # Isolated, live mutable sandbox +``` + +- **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. + +--- + +## 📜 License +MIT License. Travel through time responsibly. Do not cause grandfather paradoxes. |
