Stop fighting with Undo/Redo. Start performing surgery on your code.
CapState is a high-precision version history tool that understands your code's structure. Unlike standard history tools that track entire files, CapState uses Tree-sitter to track individual functions, classes, imports, and variables.
It provides a "Time Machine" for every component in your codebase, allowing you to revert specific functions to their past states without losing the work you've done elsewhere in the same file.
🔒 No telemetry
📡 No cloud APIs
💻 Fully local processing
✈️ Offline-capable
🚀 Features
🧠 Semantic Awareness
CapState tracks logical code blocks, not just lines:
CapState uses WebAssembly-based Tree-sitter parsers to build a syntax tree of your code. Each component gets a stable semantic identity, so moving code within a file does not break its history.
📝 Usage
Open a supported file
Click inside a function to access actions
Use the sidebar to browse history
Right-click savepoints for more options
⚠️ Requirements
Visual Studio Code 1.100.0 or higher
🐞 Known Issues
Large files may have slight indexing delay
Some edge-case syntax may not parse correctly
Privacy
Capstate is fully local-first and offline-capable.