Temporal Daemon v0.1
Overview
Temporal Daemon is a background service that enables instant context switching between git commits while preserving and restoring full development environment state.
Motivation
Switching git branches disrupts development flow. Open editors lose position, terminal sessions reset, build artifacts disappear, and running services terminate. Engineers manually reconstruct environment state after each checkout.
Temporal Daemon treats each commit as a complete environment snapshot. Switching commits becomes instant teleportation between development contexts.
Features
Environment Capture
- Open file paths and cursor positions
- Terminal working directories and command history
- Running process states and port bindings
- Build cache and dependency installation state
State Restoration
On commit checkout, daemon restores captured environment state. Editors reopen at saved positions, terminals resume in correct directories, services restart with preserved configuration.
Branch Isolation
Each branch maintains independent environment state. Feature branch has its own running services, test environment, and editor configuration. Switching branches switches entire development context.
Architecture
Daemon Process
Background service monitors git operations via filesystem hooks. On checkout, daemon snapshots current environment and restores target commit environment.
State Storage
Environment states stored in .temporal/ directory. Each commit hash maps to serialized environment snapshot. Storage uses content-addressable format with structural sharing between similar states.
Integration Points
Daemon integrates with common development tools:
- Vim/Neovim via session files
- VS Code via workspace state API
- Terminal multiplexers (tmux, screen)
- Docker containers and compose configurations
Installation
# Clone repository
git clone https://github.com/axis4/temporal-daemon.git
cd temporal-daemon
# Install daemon
./install.sh
# Initialize for repository
temporal-daemon init
Usage
# Daemon runs automatically after initialization
# Normal git operations trigger state management
# Manual snapshot
temporal-daemon snapshot
# List saved states
temporal-daemon list
# Restore specific state
temporal-daemon restore <commit-hash>
Limitations
Current version has several constraints:
- Linux and macOS only (no Windows support)
- Limited process state capture (cannot snapshot arbitrary processes)
- No distributed state synchronization
- Experimental filesystem hook mechanism
Future Development
Planned enhancements:
- Container-based process snapshot and restore
- Network state capture (proxy configurations, VPN status)
- Cloud development environment synchronization
- Integration with remote development workflows
Technical Details
State Format
Environment state stored as JSON with references to external binaries:
{
"commit": "abc123...",
"timestamp": "2026-02-20T15:30:00Z",
"editor_sessions": [...],
"terminal_sessions": [...],
"process_trees": [...],
"environment_vars": {...}
}
Performance
State capture: 50-200ms depending on complexity. State restoration: 200-500ms including process spawning. Overhead acceptable for development workflow.
License
MIT License. Experimental software provided as-is.