Temporal Daemon v0.1

Status: Experimental · Updated 2026-02-20

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

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:

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:

Future Development

Planned enhancements:

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.