An intelligent checkpoint management system for Claude Code with incremental storage and automatic cleanup.
- Incremental Storage: Hard-link unchanged files to save 60-90% disk space
- Space Efficiency: Only copy modified files, link the rest
- Compression: Achieve 5x storage reduction on large codebases
- Auto Checkpoint: Create checkpoints automatically when conversations end
- Smart Cleanup: Protect critical checkpoints while cleaning old ones
- Integrity Validation: Verify checkpoint dependencies and health
- MCP File Watching: Monitor file changes in real-time (default enabled)
- IDE Integration: Detect changes from any IDE (VS Code, PyCharm, etc.)
- Smart Batching: Merge multiple file changes into single checkpoint
- Configurable Delay: 30-second delay to avoid checkpoint spam
- Project Detection: Automatically detect project root directory
- File Ignoring: Smart ignore patterns for common development files
- Quick Setup: One-command default configuration
- Background Service: Optional independent background monitoring
pip install -e .Add this MCP server to your Claude Code configuration.
Note: Configuration is automatic! The optimal defaults are applied when the MCP server first runs.
# Create a checkpoint
"Create checkpoint with description 'Feature complete'"
# List all checkpoints
"List all checkpoints"
# Restore to a checkpoint
"Restore to checkpoint cp_0005"# Compare with checkpoint
"Show diff with checkpoint cp_0003"
# Configure settings
"Enable auto conversation checkpoint"
# Validate integrity
"Validate all checkpoint integrity"# Check file watching status
"Get file watching status"
# Configure file watching
"Configure file watching with enabled=true and interval=30"
# Enable real-time monitoring
"Configure file watching enabled=true"
# Disable real-time monitoring
"Configure file watching enabled=false"- CheckpointManager: Core checkpoint logic and storage management
- MCP Server: Protocol implementation for Claude Code integration
- FileWatcher: Real-time file monitoring with smart batching
- Auto Hooks: Conversation end checkpoint automation
- Background Service: Independent monitoring without Claude Code
project_root/
.checkpoints/ # Checkpoint storage
config.json # User configuration
metadata.json # Checkpoint metadata
20250619_143022/ # Time-based checkpoint folder
20250619_143055/ # Another checkpoint
...
- File 1 (100MB): Unchanged → Hard link (near 0 storage)
- File 2 (10MB): Modified → Copy (10MB storage)
- Result: 110MB original → 10MB actual storage (90% saved)
{
"auto_checkpoint_on_conversation_end": true,
"default_incremental": true,
"auto_cleanup_enabled": true,
"max_checkpoints": 20,
"conversation_checkpoint_description": "Auto-saved at conversation end",
"auto_file_watching_enabled": true,
"file_watch_interval": 30,
"auto_start_file_watcher": true
}Automatically ignores:
.git,__pycache__,node_modules.vscode,.idea, build artifacts- Temporary files and logs
echo '{}' | python src/server.pyfrom src.checkpoint_manager import CheckpointManager
manager = CheckpointManager('.')
checkpoint_id = manager.create_checkpoint("Test checkpoint")python -c "from src.checkpoint_manager import CheckpointManager; print(CheckpointManager('.').validate_checkpoint_integrity())"- Storage Efficiency: 60-90% space reduction with incremental storage
- Operation Speed: 10-20x faster checkpoint creation via hard links
- Memory Usage: Minimal overhead, processes files in streams
- Reliability: Built-in integrity validation and dependency checking
- Fork the repository
- Create your feature branch
- Run tests and ensure code quality
- Submit a pull request
MIT License - see LICENSE file for details.
为 Claude Code 设计的智能检查点管理系统,支持增量存储和自动清理。
- 增量存储: 通过硬链接未变更文件,节省60-90%磁盘空间
- 空间效率: 仅复制修改文件,其余文件使用链接
- 压缩效果: 大型代码库可实现5倍存储空间缩减
- 自动检查点: 对话结束时自动创建检查点
- 智能清理: 保护关键检查点,清理旧检查点
- 完整性验证: 验证检查点依赖关系和健康状态
- MCP文件监听: 实时监控文件变更(默认启用)
- IDE集成: 检测任意IDE的文件修改(VS Code、PyCharm等)
- 智能批处理: 将多个文件变更合并为单个检查点
- 可配置延迟: 30秒延迟避免检查点泛滥
- 项目识别: 自动检测项目根目录
- 文件忽略: 智能忽略常见开发文件模式
- 快速设置: 一键配置默认设置
- 后台服务: 可选的独立后台监控
pip install -e .将此MCP服务器添加到Claude Code配置中。
注意: 配置完全自动化!MCP服务器首次运行时会自动应用最优默认设置。
# 创建检查点
"创建一个检查点,描述为'功能完成'"
# 列出所有检查点
"列出所有检查点"
# 恢复到检查点
"恢复到检查点 cp_0005"# 与检查点比较
"显示与检查点 cp_0003 的差异"
# 配置设置
"启用对话结束自动保存"
# 验证完整性
"验证所有检查点完整性"# 查看文件监听状态
"获取文件监听状态"
# 配置文件监听
"配置文件监听,启用=true,间隔=30"
# 启用实时监控
"配置文件监听启用=true"
# 禁用实时监控
"配置文件监听启用=false"- CheckpointManager: 核心检查点逻辑和存储管理
- MCP服务器: Claude Code集成的协议实现
- 文件监听: 实时文件监控与智能批处理
- 自动钩子: 对话结束检查点自动化
- 后台服务: 独立的监控服务(无需Claude Code)
项目根目录/
.checkpoints/ # 检查点存储
config.json # 用户配置
metadata.json # 检查点元数据
20250619_143022/ # 基于时间的检查点目录
20250619_143055/ # 另一个检查点
...
- 文件1 (100MB): 未变更 → 硬链接 (几乎零存储)
- 文件2 (10MB): 已修改 → 复制 (10MB存储)
- 结果: 110MB原始 → 10MB实际存储 (节省90%)
{
"auto_checkpoint_on_conversation_end": true, // 对话结束自动保存
"default_incremental": true, // 默认增量存储
"auto_cleanup_enabled": true, // 自动清理
"max_checkpoints": 20, // 最大保留数量
"conversation_checkpoint_description": "对话结束时自动保存",
"auto_file_watching_enabled": true, // 默认启用文件监听
"file_watch_interval": 30, // 监听延迟间隔(秒)
"auto_start_file_watcher": true // MCP启动时自动开始监听
}自动忽略:
.git,__pycache__,node_modules.vscode,.idea, 构建产物- 临时文件和日志
echo '{}' | python src/server.pyfrom src.checkpoint_manager import CheckpointManager
manager = CheckpointManager('.')
checkpoint_id = manager.create_checkpoint("测试检查点")python -c "from src.checkpoint_manager import CheckpointManager; print(CheckpointManager('.').validate_checkpoint_integrity())"- 存储效率: 增量存储节省60-90%空间
- 操作速度: 硬链接使检查点创建速度提升10-20倍
- 内存使用: 最小开销,流式处理文件
- 可靠性: 内置完整性验证和依赖检查
- Fork 本仓库
- 创建功能分支
- 运行测试并确保代码质量
- 提交Pull Request
MIT协议 - 详见LICENSE文件。