A local cache layer for editing remote documents.
- Problem: APIs that don't support partial updates (Confluence, Notion, etc.)
- Solution: Edit locally with partial modifications, then update with a single API call
Storage Structure
~/.redit/<key-hash>/
├── meta.json # {"key": "...", "created_at": "..."}
├── origin # Original (immutable)
└── working # Working copy (Edit target)
Tips
- Use
service:idkey format (e.g.,confluence:12345,notion:page-abc) - Use
service:id:versionwhen version distinction is needed - Review
redit diffand ask whether more changes are needed before pushing back - If more edits are requested soon, keep using the same key
- Check
redit statusbefore pushing back — skip update ifclean - Only
redit dropafter final confirmation and the remote update
curl -fsSL https://raw.githubusercontent.com/bang9/ai-tools/main/redit/install.sh | bashecho "$content" | redit init "confluence:12345" # Store locally
# Edit the working file...
redit diff "confluence:12345" # Review and confirm
redit read "confluence:12345" # Get final content after final approval
redit drop "confluence:12345" # Clean up after remote update| Command | Description |
|---|---|
redit init <key> |
Read stdin, create local cache, return working file path |
redit get <key> |
Return working file path |
redit read <key> |
Output working file content to stdout |
redit status <key> |
Check if modified (dirty / clean) |
redit diff <key> |
Show unified diff between origin and working |
redit reset <key> |
Restore working file to original |
redit drop <key> |
Remove all cached files for key |
redit list |
List all managed keys with status |
redit upgrade |
Upgrade to the latest version |
redit version |
Show the current version |
Installs the redit CLI automatically in Claude Code sessions:
/plugin marketplace add bang9/ai-tools
/plugin install redit1. content = <fetch command for page 12345>
2. path = $(echo "$content" | redit init "confluence:12345")
3. Edit <path> with partial modifications
4. redit diff "confluence:12345" and ask whether more changes are needed
5. If follow-up edits arrive soon, keep using the same key
6. After final confirmation, final = $(redit read "confluence:12345")
7. <update command>(id="12345", content=final)
8. redit drop "confluence:12345"