CLI Resume — Development skill for Claude Code
重启后一键恢复 codebuddy / claude 终端现场:直接读 CLI 自己的会话历史还原工作区与会话 id,Windows Terminal 多标签 --resume.
How to install CLI Resume
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Wike-CHI/cli-resume and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What CLI Resume does
重启后一键恢复 codebuddy / claude 终端现场:直接读 CLI 自己的会话历史还原工作区与会话 id,Windows Terminal 多标签 --resume。Node 命令行版 + C++/WebView2 桌面端,零依赖
Alternatives in Development
- MyAgents — MyAgents - 优雅、易用的 Agent 桌面端 ,一站式 Agent 工作台与任务中心 855 ★
- Windows To Wsl2 Screenshots — Automate Windows screenshots for Claude Code workflows in WSL2. Take screenshots (Win+Shift+S, Win+PrintScreen 85 ★
- Tuimux — A terminal multiplexer for TUI apps 31 ★
README
cli-resume
重启电脑后,把 `codebuddy` / `claude` 的终端现场一把拉回来。
不维护项目清单、不记笔记、不用手动 `cd` —— 直接读两个 CLI 自己落的会话历史, 还原出「上次在哪些目录干活、会话 id 是多少」,然后用 Windows Terminal 多标签 `--resume` 回去。
两种形态,同一套思路
| 命令行版 | 桌面端 | |
|---|---|---|
| 入口 | cr list / cr open |
双击窗口,可设开机自启 |
| 颗粒度 | 工作区级:每个目录开一个标签 | 对话级:点标题直接进那一条 |
| 技术栈 | Node 18+,零依赖 | C++17 + Win32 + WebView2 |
| 适合 | 开机自动恢复、脚本里调 | 先看一眼有哪些现场,再决定进哪个 |
命令行版在 [`cli/`](cli/),桌面端在 [`desktop/`](desktop/),各有详细文档。
快速开始
命令行版
git clone https://github.com/Wike-CHI/cli-resume.git
cd cli-resume\cli
npm link
之后任何目录下敲 `cr` 就能用(不想装全局,也可以把 `cli` 目录加进 PATH, `cr.cmd` 就在里面)。
$ cr list
# 最后活跃 CLI 项目目录
──────────────────────────────────────────────────────────────
1 今天 11:47 cb 7m d:\work\acme-portal
2 今天 04:39 cb 15h · cl 7h d:\work\internal-tools
3 11/12 18:11 cb 17h · cl 1d c:\Users\you
$ cr open
即将恢复 2 个标签页:
· acme-portal · codebuddy d:\work\acme-portal
codebuddy --resume 01a1cf71-…
· internal-tools · claude d:\work\internal-tools
claude --resume 022945b6-…
桌面端
需要 Visual Studio 2022 的 C++ 工具链和 WebView2 SDK,SDK 不随仓库分发:
cd cli-resume\desktop
build.bat
bin\cli-resume.exe
装好 CLI 后 `cr gui` 也能直接拉起来。SDK 怎么放、编译常见问题见 [`desktop/README.md`](desktop/README.md)。
没装 CLI 也想看看界面长什么样:`bin\cli-resume.exe --demo`,会用内置示例数据渲染, 不会扫本机历史也不会真的开终端。
它怎么知道你在哪些目录干过活
两套 CLI 都把会话落在 `%USERPROFILE%` 下,格式还一样(jsonl,每条消息带 `cwd` 和 `sessionId`):
~/.codebuddy/projects/<编码目录>/.jsonl
~/.claude/projects/<编码目录>/.jsonl
- codebuddy:目录名编码不可逆(非字母数字全变
-),所以直接从 jsonl 里读cwd。 只读文件头 64KB —— 最大的会话有 4MB,全读没必要。 - claude:jsonl 不一定带
cwd,改用~/.claude.json里的projects键(真实绝对路径) 反算编码去对表,对不上的再退回嗅探。 - 文件 mtime 当最后活跃时间。目录已经被删掉的会话直接跳过,不会拉起一个不存在的路径。
- 桌面端还会从 jsonl 尾部读
ai-title记录(模型给会话起的标题),老会话没有就退回
Related Skills
Agent Inspector
把 ZCode / Codex / Claude Code / Cursor / DeepSeek Harness 的落盘目录摊开看清楚:每类占多少、删了会怎样,然后决定清掉哪些。零依赖 Node;按会话粒度级联清理(库
Rpe Harness
Local-first, zero-daemon verifiable execution kernel for coding agents (v1.19.0) — Linux/macOS/Windows, C2 Sou
Cluade Codex Links
默认支持同一 Windows 用户、同一台电脑上的两个原生 CLI。使用者需自行安装并登录 Claude Code、Codex 和 Node.js。联动 skill 支持通用任务;封面模板作为可选示例,ImageGen
Pulse Band
把 Claude/Codex/Antigravity 的实时工作状态推到小米手环 10 — Windows 桌面端 + 手环快应用
Racker Terminal
A Windows terminal for running Claude Code — one-click project launchers, session resume after restart, and pe
Cloophole
Auto-resume your Claude Code work the moment your usage limit resets. A tiny Windows app that watches the limi
Related Agents
Gpui Engineer
Rust/GPUI engineer for Acta. Use for the desktop app itself - windows, views, components, the embedded termina
Pwauto Env Setup
Analyses the user's computer (Windows, macOS, Linux) and installs and verifies everything pwauto needs — Node.
Field Windows Lead
Use PROACTIVELY and automatically — do not wait to be asked — as the Claude-Code node lead FOR a roaming lapto