{"_id":"ccundo","_rev":"5-047b439cde91db8803adf96bdd54497d","name":"ccundo","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"ccundo","version":"1.0.0","keywords":["claude","claude-code","undo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","_id":"ccundo@1.0.0","maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"homepage":"https://github.com/RonitSachdev/ccundo#readme","bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"bin":{"ccundo":"bin/ccundo.js"},"dist":{"shasum":"e954e14a05be98b6e66ef3f344b07315813eae1c","tarball":"https://registry.npmjs.org/ccundo/-/ccundo-1.0.0.tgz","fileCount":14,"integrity":"sha512-iu9q/FCjs0E6EzqqZjX8LpyhQEnRwW4Waa5W55NjFNEpySY9Mls1vSpQU27hYvfwMjJ7JelJH+0KTVimYnn+Mw==","signatures":[{"sig":"MEUCIQC44lGV/c/Y0oRpl/gnUWbexPLlY/oIvN8ZFzOP3PaargIgFyYKWY5dEqTQDdAnFFsYMQAcfyKWTMEeIYjF8DFFeTo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57499},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"5626d438ba2098f72e34481a4d30b082badf792b","scripts":{"demo":"./demo-language.sh","test":"jest","test:watch":"jest --watch"},"_npmUser":{"name":"ronitsachdev","actor":{"name":"ronitsachdev","type":"user","email":"ronitsachdev007@gmail.com"},"email":"ronitsachdev007@gmail.com"},"repository":{"url":"git+https://github.com/RonitSachdev/ccundo.git","type":"git"},"_npmVersion":"11.3.0","description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","directories":{},"_nodeVersion":"24.2.0","dependencies":{"chalk":"^5.3.0","inquirer":"^9.2.12","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/ccundo_1.0.0_1751693691110_0.46254816876180715","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"ccundo","version":"1.0.1","keywords":["claude","claude-code","undo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","_id":"ccundo@1.0.1","maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"homepage":"https://github.com/RonitSachdev/ccundo#readme","bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"bin":{"ccundo":"bin/ccundo.js"},"dist":{"shasum":"a7a68375ff23add0467f6a58adf86d63eedc68d5","tarball":"https://registry.npmjs.org/ccundo/-/ccundo-1.0.1.tgz","fileCount":15,"integrity":"sha512-RfH7lC+gaQQkVOCvzb1WGPZkLbJy5wJH86sFrjXT3E7bR5xLBSObYglq7N80Q1NVX/jHwLmteUz3jKskfkLB1Q==","signatures":[{"sig":"MEQCIGFK3IgPVV0LpodKrerbKdk6FpV8H/BUGwmrB6hEZSuPAiBBoKOsg+KxR0kTyCk1Hd5fq5Y9/9rrm87mKNDSympP6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59478},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"5626d438ba2098f72e34481a4d30b082badf792b","scripts":{"demo":"./demo-language.sh","test":"jest","test:watch":"jest --watch"},"_npmUser":{"name":"ronitsachdev","actor":{"name":"ronitsachdev","type":"user","email":"ronitsachdev007@gmail.com"},"email":"ronitsachdev007@gmail.com"},"repository":{"url":"git+https://github.com/RonitSachdev/ccundo.git","type":"git"},"_npmVersion":"11.3.0","description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","directories":{},"_nodeVersion":"24.2.0","dependencies":{"chalk":"^5.3.0","inquirer":"^9.2.12","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/ccundo_1.0.1_1751736252036_0.4229174147404129","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"ccundo","version":"1.0.2","keywords":["claude","claude-code","undo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","_id":"ccundo@1.0.2","maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"homepage":"https://github.com/RonitSachdev/ccundo#readme","bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"bin":{"ccundo":"bin/ccundo.js"},"dist":{"shasum":"3247770f02c29c6c854ecca07b40759782542317","tarball":"https://registry.npmjs.org/ccundo/-/ccundo-1.0.2.tgz","fileCount":15,"integrity":"sha512-n30slwmEp50rWle/fRWOx+Ffh8pIFpTbXWe73N2yBGs7h8qN2pvdsnNZ28PCb2cUIDIfwHKeK+LKoqKjqpjf7Q==","signatures":[{"sig":"MEYCIQCWlNWf+oh1TLMHhmArBLFbsgkNdzPW8+hCCAf7fb8F1AIhAOpROGFR3WzEZ0zXsM3+tQ1zUKVRcZwuEYhBXAW4WuGL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63245},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"a21e66f49ed8f5eea31766696701243e327301f8","scripts":{"demo":"./demo-language.sh","test":"jest","test:watch":"jest --watch"},"_npmUser":{"name":"ronitsachdev","actor":{"name":"ronitsachdev","type":"user","email":"ronitsachdev007@gmail.com"},"email":"ronitsachdev007@gmail.com"},"repository":{"url":"git+https://github.com/RonitSachdev/ccundo.git","type":"git"},"_npmVersion":"11.3.0","description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","directories":{},"_nodeVersion":"24.2.0","dependencies":{"chalk":"^5.3.0","inquirer":"^9.2.12","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/ccundo_1.0.2_1751736985222_0.8003282400545964","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"ccundo","version":"1.1.0","keywords":["claude","claude-code","undo","redo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","_id":"ccundo@1.1.0","maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"homepage":"https://github.com/RonitSachdev/ccundo#readme","bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"bin":{"ccundo":"bin/ccundo.js"},"dist":{"shasum":"2cdf9c9aaa28e3dac626f02caff5938030e7fa43","tarball":"https://registry.npmjs.org/ccundo/-/ccundo-1.1.0.tgz","fileCount":16,"integrity":"sha512-g+BSgUHmOuPUIZIzvVAaX3BR/Ct+qNcE+I6oJfFxcG86FAzivJcPj6j/TcvSY2WhHmKW31i6wTMZUqiVYb8Jeg==","signatures":[{"sig":"MEUCIQD2ngjd7tc0GqYobqWhEFuJanUlChceHMX99FsDQGtb1QIgVLD1UD5tnGSogS9Wdv6M1wyC+GIN6xrgPOTvGtwtkF8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79438},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"d590dcc21c432ba79ec2999047bd049e0b886dbf","scripts":{"demo":"./demo-language.sh","test":"jest","test:watch":"jest --watch"},"_npmUser":{"name":"ronitsachdev","actor":{"name":"ronitsachdev","type":"user","email":"ronitsachdev007@gmail.com"},"email":"ronitsachdev007@gmail.com"},"repository":{"url":"git+https://github.com/RonitSachdev/ccundo.git","type":"git"},"_npmVersion":"11.3.0","description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","directories":{},"_nodeVersion":"24.2.0","dependencies":{"chalk":"^5.3.0","inquirer":"^9.2.12","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/ccundo_1.1.0_1751877472611_0.9456140810037241","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"ccundo","version":"1.1.1","description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","main":"index.js","bin":{"ccundo":"bin/ccundo.js"},"scripts":{"test":"jest","test:watch":"jest --watch","demo":"./demo-language.sh"},"keywords":["claude","claude-code","undo","redo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","type":"module","engines":{"node":">=16.0.0"},"repository":{"type":"git","url":"git+https://github.com/RonitSachdev/ccundo.git"},"bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"homepage":"https://github.com/RonitSachdev/ccundo#readme","dependencies":{"chalk":"^5.3.0","commander":"^11.1.0","inquirer":"^9.2.12"},"devDependencies":{"jest":"^29.7.0"},"_id":"ccundo@1.1.1","gitHead":"60ac91f98f3d9f1a98cc6f41abe8a568ecf3ee9e","_nodeVersion":"24.2.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-jWH04j0TIBQizGOIHWHGhrvST0gGQ2PSbKQttTuLML4elZtb5LR+cZREUrf/rPljtAgvKurx21+mqIw4bCUFIQ==","shasum":"6e6596fb0272c2bd77c92795c58065bc38cff7a5","tarball":"https://registry.npmjs.org/ccundo/-/ccundo-1.1.1.tgz","fileCount":16,"unpackedSize":80932,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDdLo3d7eVcgxEYTs408wvpcrkWGYROk1w65qH1Eb3ImQIgLedA/fNZA/qLaHO765eczfeHMC8jzHLZT4onfYoq2+c="}]},"_npmUser":{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com","actor":{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ccundo_1.1.1_1752040442288_0.27478870553808976"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-05T05:34:51.109Z","modified":"2025-07-09T05:54:02.649Z","1.0.0":"2025-07-05T05:34:51.295Z","1.0.1":"2025-07-05T17:24:12.233Z","1.0.2":"2025-07-05T17:36:25.484Z","1.1.0":"2025-07-07T08:37:52.846Z","1.1.1":"2025-07-09T05:54:02.462Z"},"bugs":{"url":"https://github.com/RonitSachdev/ccundo/issues"},"author":{"name":"Ronit Sachdeva","email":"ronitsachdev007@gmail.com"},"license":"MIT","homepage":"https://github.com/RonitSachdev/ccundo#readme","keywords":["claude","claude-code","undo","redo","revert","cli","ai-development","session-management","file-operations","backup","preview","internationalization","japanese"],"repository":{"type":"git","url":"git+https://github.com/RonitSachdev/ccundo.git"},"description":"Intelligent undo for Claude Code sessions - Revert individual operations with cascading safety and detailed previews","maintainers":[{"name":"ronitsachdev","email":"ronitsachdev007@gmail.com"}],"readme":"# ccundo\n\n[![npm version](https://badge.fury.io/js/ccundo.svg)](https://badge.fury.io/js/ccundo)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n> **Intelligent undo for Claude Code sessions** - Revert individual operations with cascading safety and detailed previews.\n\nccundo 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.\n\n## ✨ Features\n\n- **Automatic Detection** - Reads directly from Claude Code session files\n- **Detailed Previews** - See exactly what will be changed before undoing/redoing\n- **Cascading Undo/Redo** - Maintains project consistency by undoing/redoing dependent operations\n- **Complete Redo System** - Reverse any undo operation with full cascading support\n- **Multi-language** - Supports English and Japanese (日本語)\n- **Smart Operation Tracking** - Tracks file edits, creations, deletions, renames, and bash commands\n- **Safe Backups** - Creates backups before making changes\n- **Zero Configuration** - Works out of the box with Claude Code\n\n## Installation\n\n```bash\nnpm install -g ccundo\n```\n\n## Quick Start\n\n1. Navigate to a directory where you've used Claude Code\n2. List recent operations:\n   ```bash\n   ccundo list\n   ```\n3. Preview what would be undone:\n   ```bash\n   ccundo preview\n   ```\n4. Undo operations with confirmation:\n   ```bash\n   ccundo undo\n   ```\n5. Redo previously undone operations:\n   ```bash\n   ccundo redo\n   ```\n\n## Usage\n\n### List Operations\n\nView all operations from your current Claude Code session:\n\n```bash\nccundo list                    # Show recent operations\nccundo list --all             # Include already undone operations\n```\n\n**Example output:**\n```\nOperations from Claude Code session:\n\n1. [ACTIVE] file_edit - 2m ago\n   ID: toolu_01XYZ...\n   File: /project/src/app.js\n\n2. [ACTIVE] file_create - 5m ago\n   ID: toolu_01ABC...\n   File: /project/src/utils.js\n\n3. [ACTIVE] bash_command - 7m ago\n   ID: toolu_01DEF...\n   Command: npm install express\n```\n\n### Preview Changes\n\nSee exactly what will be undone without making any changes:\n\n```bash\nccundo preview                 # Interactive selection\nccundo preview <operation-id>  # Preview specific operation\n```\n\n**Preview shows:**\n- File diffs for edits (- current content, + original content)\n- Content that will be restored for deleted files  \n- Files that will be deleted for created files\n- Bash commands that require manual intervention\n\n### Undo Operations\n\nSafely revert operations with detailed confirmation:\n\n```bash\nccundo undo                    # Interactive selection with preview\nccundo undo <operation-id>     # Undo specific operation\nccundo undo --yes             # Skip confirmation prompts\n```\n\n**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.\n\n### Redo Operations\n\nRestore previously undone operations with the same safety and preview features:\n\n```bash\nccundo redo                    # Interactive selection of undone operations\nccundo redo <operation-id>     # Redo specific operation\nccundo redo --yes             # Skip confirmation prompts\n```\n\n**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.\n\n### Session Management\n\nWork with multiple Claude Code sessions:\n\n```bash\nccundo sessions               # List all sessions across projects\nccundo session <session-id>  # Switch to specific session\n```\n\n### Language Support\n\nccundo supports multiple languages with persistent preferences:\n\n```bash\nccundo language               # Show current language and options\nccundo language en           # Switch to English\nccundo language ja           # Switch to Japanese (日本語)\n```\n\n**Supported Languages:**\n- 🇺🇸 English (`en`) - Default\n- 🇯🇵 Japanese (`ja`) - 日本語フルサポート\n\n## How It Works\n\nccundo automatically integrates with Claude Code by:\n\n1. **Reading Session Files** - Parses `.jsonl` files in `~/.claude/projects/`\n2. **Extracting Operations** - Identifies file operations and bash commands from tool usage\n3. **Tracking Dependencies** - Understands operation ordering for safe cascading undo\n4. **Creating Backups** - Saves current state before making changes to `~/.ccundo/backups/`\n5. **Maintaining State** - Stores undo history and language preferences in `~/.ccundo/`\n\n## Supported Operations\n\n| Operation Type | Description | Undo Action | Redo Action |\n|---|---|---|---|\n| **File Create** | Files created by Claude | Delete file (with backup) | Recreate file with original content |\n| **File Edit** | File content modifications | Revert to original content | Re-apply the edit changes |\n| **File Delete** | Files deleted by Claude | Restore file content | Delete file again (with backup) |\n| **File Rename** | File/directory renames | Rename back to original | Apply rename again |\n| **Directory Create** | Directory creation | Remove directory | Recreate directory |\n| **Directory Delete** | Directory removal | Recreate directory | Remove directory again |\n| **Bash Command** | Shell commands | Manual intervention required | Manual intervention required |\n\n## Examples\n\n### Undoing Recent File Changes\n\n```bash\n$ ccundo list\nOperations from Claude Code session:\n\n1. [ACTIVE] file_edit - 30s ago\n   ID: toolu_01XYZ123\n   File: /project/src/app.js\n\n$ ccundo preview\n📋 Preview: Would undo 1 operation(s):\n\n1. file_edit - 30s ago\n   Will revert file: /project/src/app.js\n   \n   - const newFeature = true;\n   + const newFeature = false;\n     console.log('App started');\n\n$ ccundo undo --yes\n✓ File reverted: /project/src/app.js\n  Backup saved to: ~/.ccundo/backups/toolu_01XYZ123-current\n\nCompleted: 1 successful, 0 failed\n```\n\n### Cascading Undo Example\n\n```bash\n$ ccundo preview\n⚠️  Cascading undo: Selecting an operation will undo it and ALL operations that came after it.\n\n? Select operation to preview:\n❯ file_create - 1m ago (+ 2 more would be undone)\n  file_edit - 2m ago (+ 1 more would be undone)  \n  bash_command - 5m ago\n\n📋 Preview: Would undo 3 operation(s):\n\n1. file_create - 1m ago\n   Will delete file: /project/new-feature.js\n\n2. file_edit - 2m ago  \n   Will revert file: /project/app.js\n\n3. bash_command - 5m ago\n   Cannot auto-undo bash command: npm install new-package\n   Manual intervention required\n```\n\n### Redoing Undone Operations\n\n```bash\n$ ccundo undo\n# ... undo some operations ...\n\n$ ccundo redo\n⚠️  Cascading redo: Selecting an operation will redo it and ALL undone operations that came before it.\n\n? Select operation to redo:\n❯ file_edit - 2m ago (+ 1 more will be redone)\n  file_create - 5m ago\n\n$ ccundo redo --yes\n✓ File edit redone: /project/src/app.js\n  Backup saved to: ~/.ccundo/backups/toolu_01XYZ123-redo\n✓ File recreated: /project/new-feature.js\n\nCompleted: 2 successful, 0 failed\n```\n\n## Configuration\n\nccundo stores its configuration in `~/.ccundo/`:\n\n```\n~/.ccundo/\n├── config.json              # Language preferences\n├── undone-operations.json   # Undo/redo state tracking\n├── sessions/                # Local session tracking (if used)\n└── backups/                # Operation backups\n```\n\n**Config format:**\n```json\n{\n  \"language\": \"en\"\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n### Development Setup\n\n```bash\ngit clone https://github.com/RonitSachdev/ccundo.git\ncd ccundo\nnpm install\nnpm link\n```\n\n### Adding Languages\n\n1. Add translations to `src/i18n/languages.js`\n2. Update language list in documentation\n3. Test with `npm run test`\n\n## License\n\nMIT © Ronit Sachdev\n","readmeFilename":"README.md"}