
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews
Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews.
ccundo seamlessly integrates with Claude Code to provide granular undo and redo functionality. It reads directly from Claude Code's session files to track file operations and allows you to selectively revert or restore changes with full preview and cascading safety.
npm install -g ccundo
ccundo list
ccundo preview
ccundo undo
ccundo redo
View all operations from your current Claude Code session:
ccundo list # Show recent operations
ccundo list --all # Include already undone operations
Example output:
Operations from Claude Code session:
1. [ACTIVE] file_edit - 2m ago
ID: toolu_01XYZ...
File: /project/src/app.js
2. [ACTIVE] file_create - 5m ago
ID: toolu_01ABC...
File: /project/src/utils.js
3. [ACTIVE] bash_command - 7m ago
ID: toolu_01DEF...
Command: npm install express
See exactly what will be undone without making any changes:
ccundo preview # Interactive selection
ccundo preview <operation-id> # Preview specific operation
Preview shows:
Safely revert operations with detailed confirmation:
ccundo undo # Interactive selection with preview
ccundo undo <operation-id> # Undo specific operation
ccundo undo --yes # Skip confirmation prompts
Cascading Undo: When you select an operation to undo, ccundo will also undo ALL operations that came after it. This ensures your project remains in a consistent state.
Restore previously undone operations with the same safety and preview features:
ccundo redo # Interactive selection of undone operations
ccundo redo <operation-id> # Redo specific operation
ccundo redo --yes # Skip confirmation prompts
Cascading Redo: When you select an operation to redo, ccundo will also redo ALL undone operations that came before it. This maintains the same consistency guarantees as undo operations.
Work with multiple Claude Code sessions:
ccundo sessions # List all sessions across projects
ccundo session <session-id> # Switch to specific session
ccundo supports multiple languages with persistent preferences:
ccundo language # Show current language and options
ccundo language en # Switch to English
ccundo language ja # Switch to Japanese (日本語)
Supported Languages:
en) - Defaultja) - 日本語フルサポートccundo automatically integrates with Claude Code by:
.jsonl files in ~/.claude/projects/~/.ccundo/backups/~/.ccundo/| Operation Type | Description | Undo Action | Redo Action |
|---|---|---|---|
| File Create | Files created by Claude | Delete file (with backup) | Recreate file with original content |
| File Edit | File content modifications | Revert to original content | Re-apply the edit changes |
| File Delete | Files deleted by Claude | Restore file content | Delete file again (with backup) |
| File Rename | File/directory renames | Rename back to original | Apply rename again |
| Directory Create | Directory creation | Remove directory | Recreate directory |
| Directory Delete | Directory removal | Recreate directory | Remove directory again |
| Bash Command | Shell commands | Manual intervention required | Manual intervention required |
$ ccundo list
Operations from Claude Code session:
1. [ACTIVE] file_edit - 30s ago
ID: toolu_01XYZ123
File: /project/src/app.js
$ ccundo preview
📋 Preview: Would undo 1 operation(s):
1. file_edit - 30s ago
Will revert file: /project/src/app.js
- const newFeature = true;
+ const newFeature = false;
console.log('App started');
$ ccundo undo --yes
✓ File reverted: /project/src/app.js
Backup saved to: ~/.ccundo/backups/toolu_01XYZ123-current
Completed: 1 successful, 0 failed
$ ccundo preview
⚠️ Cascading undo: Selecting an operation will undo it and ALL operations that came after it.
? Select operation to preview:
❯ file_create - 1m ago (+ 2 more would be undone)
file_edit - 2m ago (+ 1 more would be undone)
bash_command - 5m ago
📋 Preview: Would undo 3 operation(s):
1. file_create - 1m ago
Will delete file: /project/new-feature.js
2. file_edit - 2m ago
Will revert file: /project/app.js
3. bash_command - 5m ago
Cannot auto-undo bash command: npm install new-package
Manual intervention required
$ ccundo undo
# ... undo some operations ...
$ ccundo redo
⚠️ Cascading redo: Selecting an operation will redo it and ALL undone operations that came before it.
? Select operation to redo:
❯ file_edit - 2m ago (+ 1 more will be redone)
file_create - 5m ago
$ ccundo redo --yes
✓ File edit redone: /project/src/app.js
Backup saved to: ~/.ccundo/backups/toolu_01XYZ123-redo
✓ File recreated: /project/new-feature.js
Completed: 2 successful, 0 failed
ccundo stores its configuration in ~/.ccundo/:
~/.ccundo/
├── config.json # Language preferences
├── undone-operations.json # Undo/redo state tracking
├── sessions/ # Local session tracking (if used)
└── backups/ # Operation backups
Config format:
{
"language": "en"
}
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/RonitSachdev/ccundo.git
cd ccundo
npm install
npm link
src/i18n/languages.jsnpm run testMIT © Ronit Sachdev
FAQs
Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews
The npm package ccundo receives a total of 112 weekly downloads. As such, ccundo popularity was classified as not popular.
We found that ccundo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.