⏳ Terminal Time Machine
Never lose a terminal command or its output again.
A powerful VS Code extension that automatically monitors all your terminals, intelligently captures commands + full output, and lets you search, replay, analyze, and export your entire terminal history — all stored locally.

✨ Features
🔄 Auto-Capture
- Automatically monitors every terminal using VS Code's shell integration.
- Captures: command, full output, duration, working directory, and terminal name.
- Terminals are dynamically named using their Process ID (e.g.
terminal-[PID]).
- Smart ignore list — filters noisy commands (
ls, cd, clear, etc.) automatically.
- Configurable via VS Code settings or the in-panel Settings gear.
🔍 Search & Filter
- Full-text search across commands and output in real-time.
- Filter chips: All · ✅ Success · ⛔ Errors · 🔌 Closed · ⭐ Starred.
- Closed Filter Indicator: The interface shifts to a tinted orange background when filtering closed terminals.
- Today's History Toggle: Under the terminal tab strip, easily toggle between today's commands/terminals and your complete history. Defaults to
ON at startup.
- 🆕 Tag Search: Type
#tag in the search bar to filter by user-defined tags.
📂 Terminal Grouping
- Commands are automatically grouped by individual terminal instances (
terminal-[PID]).
- Allows focusing on a single active or closed terminal tab in the tab strip.
💾 Flexible Exports
- Export any individual command with its output as
.txt, .md, or .json files.
- Export full history for any specific terminal as
.txt, .md, .json, or .pdf files.
- Export success notifications feature an Open Folder action to instantly view files in Finder/Explorer.
- PDF exports format CLI output inside beautiful editor-like dark code blocks using monospace fonts.
↩ One-Click Replay
- Click Replay on any log to instantly re-run the command in a new terminal window.
⭐ Star & Preserve
- Star important logs — they are exempt from automatic cleanup and kept forever until deleted manually.
📊 Stats Dashboard
- Daily command count, success rate, error rate.
- 7-day activity heatmap and top 5 most-used command triggers.
- 🆕 Error streak tracking — shows longest consecutive error run today.
- 🆕 Peak hours heatmap — visualizes which hours of the day you're most active.
- 🆕 Command timing trends — average execution time for your top commands.
- 🆕 Error hotspots — which directories have the most failures.
🔴 Status Bar Indicator
- Live status bar item shows capture state (
▶ TTM / ⏸ TTM).
- Click to toggle capture on/off or pause.
🆕 v2.0 Features
🔊 Sound Effects on Success / Error
- Faaah sound on error: When a command fails (non-zero exit code), plays
media/fail-sound.mp3.
- Success sound: When a command succeeds, plays
media/success.mp3.
- Two independent toggle switches in the settings panel — both OFF by default.
- Once toggled, the setting persists across VS Code sessions automatically.
- Cross-platform: uses
afplay (macOS), paplay/aplay (Linux), PowerShell (Windows).
Setup: Place your own fail-sound.mp3 and success.mp3 files in the media/ directory.
🔄 Diff View for Repeated Commands
- When the same command has been run multiple times, a 🔄 Diff button appears on the log card.
- Click it to open VS Code's native diff editor comparing the previous run's output with the current one.
- Great for: build outputs, test runs,
git status, deployment logs.
- Click + tag on any log to add custom tags like
#bug, #deploy, #important.
- Tags appear as colored chips — click the ✕ to remove.
- Click + add note to attach a free-text annotation to any log entry.
⌨️ Quick Command Palette
- Press
Cmd+Shift+R (Mac) / Ctrl+Shift+R (Windows/Linux) to open the Quick Replay palette.
- Fuzzy-searches through your entire command history.
- Shows: frequency count, last exit status, and time since last run.
- One-click to replay any command in a new terminal.
📌 Command Collections
- Group bookmarked commands into named collections (e.g., "Build Commands", "Deploy Scripts").
- Manage collections from the sidebar settings.
📊 Enhanced Stats Dashboard
- Error Streak: Longest consecutive error run today.
- Peak Hours: 24-hour bar chart showing your most active terminal hours.
- Avg Timing: Average execution time per command.
- Error Hotspots: Top 5 directories with the most failed commands.
🚀 Getting Started
- Install the extension.
- The ⏳ icon appears in the Activity Bar — click it to open the sidebar.
- Open a terminal and run any command (ensure Shell Integration is active).
- Your commands appear automatically in the History panel.
- Use search, filter chips, or select individual terminal tabs to find what you need.
Enabling Sound Effects
- Open the sidebar settings (⚙️ icon).
- Toggle "Play sound on error (faaah)" and/or "Play sound on success" ON.
- Place
fail-sound.mp3 and/or success.mp3 in the extension's media/ folder.
⌨️ Keyboard Shortcuts
| Action |
Mac |
Windows / Linux |
| Focus Terminal History |
Cmd+Shift+H |
Ctrl+Shift+H |
| Quick Replay Palette |
Cmd+Shift+R |
Ctrl+Shift+R |
🔧 Commands
Open the Command Palette (Cmd+Shift+P) and search for:
| Command |
Description |
Terminal Time Machine: Search Terminal History |
Focus the history panel |
Terminal Time Machine: Export History |
Export full history for a selected terminal |
Terminal Time Machine: Clear Logs |
Manually delete logs older than retention period |
Terminal Time Machine: Toggle Capture |
Pause / resume automatic capture |
Terminal Time Machine: Show Daily Stats |
Open the enhanced stats dashboard |
Terminal Time Machine: Quick Replay Command |
Open quick replay palette |
Terminal Time Machine: Compare Command Output |
Diff current vs previous run |
⚙️ Configuration
Set these configurations in VS Code or in the Settings panel:
- Capture Enabled: Toggle switch to pause or resume recording.
- Retention Days: Automatically prunes older unstarred logs. Set to
0 to keep logs forever.
- Ignored Commands: Array of command patterns to exclude.
- 🆕 Play Sound on Error: Toggle to play
fail-sound.mp3 on command failure (default: OFF).
- 🆕 Play Sound on Success: Toggle to play
success.mp3 on command success (default: OFF).
{
"terminalTimeMachine.retentionDays": 7,
"terminalTimeMachine.captureEnabled": true,
"terminalTimeMachine.autoIgnoreCommands": ["ls", "ll", "la", "cd", "clear", "pwd", "history", "exit", "cls"],
"terminalTimeMachine.playSoundOnError": false,
"terminalTimeMachine.playSoundOnSuccess": false
}
🗄️ Data Storage
All data is stored locally in VS Code's global storage directory as a JSON file. No data ever leaves your machine.
🏗️ Development
npm install
npm run compile
# Press F5 to launch Extension Development Host
📋 Release Notes
v2.0.0 — September 2026
🆕 New Features
- 🔊 Sound Effects — Play a "faaah" sound on command failure and a ding on success. Two independent toggles, both OFF by default, persisted across sessions. Cross-platform audio via native OS commands.
- 🔄 Diff View — Compare output of repeated commands side-by-side in VS Code's native diff editor. A "🔄 Diff" button appears automatically when the same command has prior runs.
- 🏷️ Tags & Annotations — Add custom tags (
#bug, #deploy, #important) and free-text notes to any log entry. Tags render as colored chips with one-click removal.
- ⌨️ Quick Replay Palette —
Cmd+Shift+R opens a fuzzy-searchable palette showing your full command history with frequency, exit status, and recency.
- 📌 Command Collections — Group bookmarked commands into named collections for quick access.
- 📊 Enhanced Stats Dashboard — Error streak tracking, 24-hour peak hours chart, average command timing trends, and error hotspot directories.
🔧 Improvements
- Settings panel now includes 🔊 Sound Effects section with toggle switches.
- Log cards now display tag chips, notes, and a Diff button when applicable.
- Stats dashboard upgraded with 5 stat cards, peak hours bar chart, timing trends, and error hotspots in a two-column layout.
v1.0.0 — September 2026
🎉 Initial Release
- 🔄 Auto-Capture — Automatically monitors every terminal via VS Code Shell Integration. Captures command, full output, exit code, duration, CWD, and terminal name.
- 🔍 Search & Filter — Full-text search across commands and output. Filter chips: All, Success, Errors, Closed, Starred. Today's History toggle.
- 📂 Terminal Grouping — Commands grouped by terminal PID with a tab strip UI.
- 💾 Export — Export individual commands or full terminal history as
.txt, .md, .json, or .pdf. PDF uses editor-like dark code blocks.
- ↩ One-Click Replay — Re-run any captured command in a new terminal.
- ⭐ Star & Preserve — Star important logs to exempt them from automatic cleanup.
- 📊 Stats Dashboard — Daily command count, success/error rate, 7-day activity heatmap, and top 5 commands.
- 🔴 Status Bar — Live
▶ TTM / ⏸ TTM indicator with click-to-toggle.
- ⚙️ Configurable — Retention days, ignored commands list, capture toggle — all from settings panel or VS Code config.
- 🛡️ Shell Integration Guide — Built-in setup guide when shell integration is not detected, plus manual log fallback.
🔗 Connect
Made with ❤️ by Siva
| |