https://github.com/remvisual/claude-workspace-snapshot
Never lose your Claude Code tabs again. Snapshot and restore sessions as color-coded Windows Terminal tabs.
https://github.com/remvisual/claude-workspace-snapshot
anthropic-claude claude-code developer-tools powershell productivity session-management windows-terminal workspace-management
Last synced: 19 days ago
JSON representation
Never lose your Claude Code tabs again. Snapshot and restore sessions as color-coded Windows Terminal tabs.
- Host: GitHub
- URL: https://github.com/remvisual/claude-workspace-snapshot
- Owner: REMvisual
- License: mit
- Created: 2026-03-29T03:56:52.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-04-04T06:30:32.000Z (2 months ago)
- Last Synced: 2026-04-20T01:03:38.807Z (about 2 months ago)
- Topics: anthropic-claude, claude-code, developer-tools, powershell, productivity, session-management, windows-terminal, workspace-management
- Language: PowerShell
- Homepage: https://remrepo.com
- Size: 73.2 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/REMvisual/claude-handoff/releases/latest)

## Why This Exists
You run multiple Claude Code sessions across different projects. You restart your machine. Now every tab is gone. The built-in `claude --resume` command exists, but it needs 36-character UUIDs that you have to dig out of a wall of text. For each session. One at a time.
This tool fixes that. Two scripts. One saves your workspace, the other brings it back.
## Before / After
```
BEFORE: Restart -> lose 15 tabs -> manually find UUIDs -> type claude --resume for each one
AFTER: Restart -> double-click restore.bat -> all tabs back in 5 seconds
```
## Quick Demo
```
1. Work across multiple projects in Claude Code
2. Before shutdown: run snapshot.bat
3. After restart: run restore.bat -> everything's back
```
That's it. Your sessions come back in the right directories, with the right tab names, grouped by project, color-coded.
## Install
**PowerShell (recommended):**
```powershell
irm https://raw.githubusercontent.com/REMvisual/claude-workspace-snapshot/main/install.ps1 | iex
```
**Git Bash / WSL:**
```bash
curl -fsSL https://raw.githubusercontent.com/REMvisual/claude-workspace-snapshot/main/install.sh | bash
```
**Manual:**
```bash
git clone https://github.com/REMvisual/claude-workspace-snapshot.git
cp claude-workspace-snapshot/scripts/* ~/.claude/scripts/
```
## Usage
### Snapshot (before shutdown)
Double-click `workspace-snapshot.bat` or run it from terminal:
```
~/.claude/scripts/workspace-snapshot.bat
```
It finds your live sessions, groups them by project, and saves everything to `~/.claude/workspace.json`:
```
WORKSPACE SNAPSHOT (live detection)
13 live sessions (8 from processes, 5 from file activity)
--- skywatch (#4A9BD9) ---
1. Add hourly forecast caching to reduce API calls [P] Mar 28 14:25
2. Fix timezone handling in weather alerts [F] Mar 28 14:10
--- taskflow-api (#E67E22) ---
3. Fix race condition in concurrent task assignment [P] Mar 28 14:20
4. Add WebSocket notifications for task updates [F] Mar 28 13:45
Save all? [Y/n] or enter numbers (e.g. 1,3,5)
```
### Restore (after restart)
Double-click `workspace-restore.bat` or run it from terminal:
```
~/.claude/scripts/workspace-restore.bat
```
It rebuilds your Windows Terminal layout -- one window per project, each tab resuming its session with the correct directory, name, and color:
```
WORKSPACE RESTORE
Snapshot: 2026-03-28 14:30 (2h ago)
Window 1: skywatch (#4A9BD9) -- 2 tab(s)
1. skywatch: Add hourly forecast caching to reduc...
2. skywatch: Fix timezone handling in weather aler...
Window 2: taskflow-api (#E67E22) -- 2 tab(s)
3. taskflow-api: Fix race condition in concurrent ...
4. taskflow-api: Add WebSocket notifications for t...
Options:
Enter = restore all windows
w1,w2 = restore specific windows (e.g. w1,w3)
1,3,5 = restore specific tabs (e.g. 1,3,5)
n = cancel
```
## How It Works
1. **Detects sessions** -- scans running `claude.exe` processes and recently active session files to find every live session
2. **Extracts metadata** -- reads the session summary, working directory, and git branch from each session's data
3. **Groups and colors** -- clusters sessions by project and assigns each project a stable color based on its name
4. **Saves to JSON** -- writes everything to `~/.claude/workspace.json` (editable if you want to rename tabs or change colors)
5. **Restores via Windows Terminal** -- builds `wt.exe` commands with the right title, color, directory, and `--resume` flag for each tab
## Options
| Command | Description |
|---------|-------------|
| `workspace-snapshot.bat` | Snapshot with default 30-minute activity window |
| `workspace-snapshot.bat 60` | Snapshot with 60-minute window (catches idle sessions) |
| `workspace-restore.bat` | Interactive restore with session/window picker |
| `workspace-restore.bat --all` | Restore everything without prompting |
## Editing Your Workspace
After snapshotting, edit `~/.claude/workspace.json` directly to:
- Rename tabs (change the `tabName` field)
- Change tab colors (set `tabColor` to any `#RRGGBB` value)
- Rearrange or remove sessions
## Requirements
- Windows 10 or 11
- [Windows Terminal](https://aka.ms/terminal) (wt.exe)
- PowerShell 5.1+ (built into Windows 10+)
- [Claude Code CLI](https://claude.ai/code) installed and on PATH
## Uninstall
```powershell
~/.claude/scripts/uninstall.ps1
```
Or remove the files manually:
```powershell
rm ~/.claude/scripts/workspace-snapshot.ps1
rm ~/.claude/scripts/workspace-snapshot.bat
rm ~/.claude/scripts/workspace-restore.ps1
rm ~/.claude/scripts/workspace-restore.bat
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. PRs are welcome.
## License
[MIT](LICENSE)
---
If this tool saved you time, [give it a star](https://github.com/REMvisual/claude-workspace-snapshot). It helps others find it.
[](LICENSE)
[](https://claude.ai/code)
[](CONTRIBUTING.md)