Ccundo introduces intelligent undo and redo functionality to Claude Code by directly parsing native session files. The tool tracks every file creation, edit, deletion, rename, and directory change. Before any action is finalized, Ccundo provides a detailed preview of the changes. Its cascade system ensures project integrity: reverting a specific action automatically rolls back all subsequent operations to prevent state conflicts. The redo system follows the same logical chain. Ccundo also monitors bash commands and generates a secure backup before any modification is applied. The tool supports English and Japanese natively and requires no configuration files. You can also switch between multiple Claude Code sessions with ease.
Install the tool globally using npm:
npm install -g ccundo
cd) to a directory where you have used Claude Code.ccundo list
ccundo preview
ccundo undo
ccundo redo
View the history of the current Claude Code session:
ccundo list # Display recent active actions
ccundo list --all # Include actions that have already been undone
Sample output:
Operations in Claude Code session:
1. [ACTIVE] file_edit - 2 minutes ago
ID: toolu_01XYZ...
File: /project/src/app.js
2. [ACTIVE] file_create - 5 minutes ago
ID: toolu_01ABC...
File: /project/src/utils.js
3. [ACTIVE] bash_command - 7 minutes ago
ID: toolu_01DEF...
Command: npm install express
Inspect the effects of an undo operation without modifying any files:
ccundo preview # Open the interactive picker
ccundo preview <operation-id> # Preview a specific action by ID
Previews display:
Revert changes with a confirmation step:
ccundo undo # Interactive mode with preview
ccundo undo <operation-id> # Revert a specific operation
ccundo undo --yes # Skip the confirmation prompt
Cascade Undo: When you select an action to revert, Ccundo also undoes every subsequent action in the timeline. This prevents the project from entering a partially broken or inconsistent state.
Restore actions that were previously undone:
ccundo redo # Interactive picker for undone actions
ccundo redo <operation-id> # Redo a specific action by ID
ccundo redo --yes # Skip confirmation
Cascade Redo: When redoing an action, Ccundo also reapplies any undone actions that preceded it in the sequence to maintain the logical chain.
Manage undo history across different projects:
ccundo sessions # List all available project sessions
ccundo session <session-id> # Switch context to a different session
Ccundo persists your preferred language setting:
ccundo language # Display current and available languages
ccundo language en # Switch to English
ccundo language ja # Switch to Japanese (日本語)
Supported:
en) – Defaultja) – Full supportCcundo integrates with Claude Code through the following process:
.jsonl files stored in ~/.claude/projects/.~/.ccundo/backups/ before any changes occur.~/.ccundo/.| Type | Description | Undo Action | Redo Action |
|---|---|---|---|
| File Create | Claude created a file | Delete file (backed up) | Recreate file with original content |
| File Edit | File content modified | Restore original content | Reapply the edit |
| File Delete | Claude removed a file | Restore file content | Delete file again (backed up) |
| File Rename | File or folder renamed | Revert to original name | Reapply rename |
| Directory Create | New folder created | Remove folder | Recreate folder |
| Directory Delete | Folder removed | Recreate folder | Remove folder again |
| Bash Command | Shell command executed | Manual review required | Manual review required |
Undo a Recent File Edit
$ ccundo list
Operations in Claude Code session:
1. [ACTIVE] file_edit - 30 seconds ago
ID: toolu_01XYZ123
File: /project/src/app.js
$ ccundo preview
📋 Preview: 1 operation will be undone:
1. file_edit - 30 seconds ago
Will restore file: /project/src/app.js
- const newFeature = true;
+ const newFeature = false;
console.log('App started');
$ ccundo undo --yes
✓ File restored: /project/src/app.js
Backup saved to: ~/.ccundo/backups/toolu_01XYZ123-current
Done: 1 succeeded, 0 failed
Cascade Undo Example
$ ccundo preview
⚠️ Cascade Undo: Reverting an operation will also undo all subsequent operations.
? Select an operation to preview:
❯ file_create - 1 minute ago (will also undo 2 operations)
file_edit - 2 minutes ago (will also undo 1 operation)
bash_command - 5 minutes ago
📋 Preview: 3 operations will be undone:
1. file_create - 1 minute ago
Will delete file: /project/new-feature.js
2. file_edit - 2 minutes ago
Will restore file: /project/app.js
3. bash_command - 5 minutes ago
Cannot automatically undo bash command: npm install new-package
Manual intervention required
Ccundo stores configuration and metadata in ~/.ccundo/:
~/.ccundo/
├── config.json # Language preferences
├── undone-operations.json # Undo/redo state tracking
├── sessions/ # Local session metadata
└── backups/ # Pre-operation file backups
Config format:
{
"language": "en"
}
To contribute to Ccundo or build from source:
git clone https://github.com/RonitSachdev/ccundo.git
cd ccundo
npm install
npm link
Adding a New Language
src/i18n/languages.js.npm run test.
withoutbg: Free Local & API-Based AI Background Removal Tool
FireRedTTS‑2: Stream Voice Cloning for Long‑Form Podcasts and Chatbots
AI-FFmpeg-CLI: Turn Plain English into FFmpeg Commands
AoxVPN 8.8 Member Day Sale | No-Log VPN Featuring IEPL Private Lines
MonkeyCode: Secure Private AI Coding with Integrated Security Scanning & Admin Controls
Fooocus: Free Offline SDXL Image Generator & Installation Guide
How to Install and Use Vosk Offline Speech Recognition
BAGEL 7B MoT: The Open Multimodal Model Outperforming Qwen2.5-VL
Jitsi Meet Review: Open-Source Video Conferencing That Just Works
ACI.dev: 600+ Tools for AI Agents with Built-In Auth and MCP Support
Shendeng VPN: Game & App Accelerator – Now 22% Off
Shendeng VPN: Unlimited Bandwidth, Smart Routing & VIP Membership (¥28/Month)