flightrecorder
A system-level service that preserves ephemeral text input, so that work doesn't disappear after critical failures
Like an airplane's black box, flightrecorder runs quietly in the background, capturing your text input across applications. When disaster strikesβapp crashes, network failures, accidental refreshes, or just plain bugsβyour work is safe and recoverable.
The Problem
Modern applications are shockingly bad at preserving your work:
- App crashes wipe out that detailed prompt you spent 10 minutes crafting
- Network errors swallow form submissions into the void
- Accidental refreshes obliterate unsaved text
- Session timeouts discard everything without warning
- Buggy apps throw errors and auto-refresh, taking your input with them
The psychological toll is real: the anxiety of potential data loss poisons the entire experience of using otherwise-good tools. You shouldn't need to defensively copy everything to a text editor "just in case."
The Solution
flightrecorder is your safety net:
- π Silent: Runs as a background daemon, zero interaction required
- π Private: All data stays local, no network access, fully auditable
- π― Selective: Captures text fields and clipboard, not raw keystrokes
- π‘οΈ Privacy-aware: Filters sensitive patterns, ignores password fields
- π Searchable: Find what you lost with powerful search
- π§Ή Self-maintaining: Automatic pruning keeps storage bounded
- π§π Cross-platform: Linux (X11 + Wayland) and macOS
Installation
# From source
# Start the daemon
Usage
# Check status
# Search your history
# Recover recent input
# Recover from a specific app
# Recover from a time range
# Interactive recovery (TUI)
How It Works
flightrecorder uses two complementary capture strategies:
1. Clipboard Monitoring
Every clipboard operation is captured with:
- Timestamp
- Source application (when detectable)
- Content hash (for deduplication)
This catches explicit copies and many form submissions that apps place on the clipboard.
2. Accessibility-Based Text Field Snapshots
Using platform accessibility APIs, flightrecorder periodically snapshots text from:
- Active text input fields
- Text areas and editors
- Form fields
This provides comprehensive coverage even when you forget to copy.
Privacy & Security
- No network access: The daemon has no ability to transmit data
- No raw keylogging: We capture text field contents, not individual keystrokes
- Sensitive data filtering: Configurable patterns for passwords, API keys, credit cards
- Password field detection: Automatically skips password input fields
- Local storage only: Everything stays in
~/.local/share/flightrecorder/ - Fully open source: Audit every line of code
Configuration
# ~/.config/flightrecorder/config.toml
[]
# Snapshot interval for text fields (seconds)
= 5
# Minimum text length to capture
= 10
# Applications to exclude
= ["1Password", "Bitwarden", "KeePassXC"]
[]
# Patterns to filter (regex)
= [
"(?i)password",
"(?i)api[_-]?key",
"(?i)secret",
"\\b\\d{4}[- ]?\\d{4}[- ]?\\d{4}[- ]?\\d{4}\\b", # Credit cards
]
[]
# Where to store captured data
= "~/.local/share/flightrecorder"
# Maximum storage size (MB)
= 500
# Retention period (days)
= 30
Architecture
flightrecorder/
βββ src/
β βββ main.rs # CLI entry point
β βββ daemon/
β β βββ mod.rs # Daemon orchestration
β β βββ clipboard.rs # Clipboard monitoring
β β βββ accessibility.rs # Text field snapshots
β βββ platform/
β β βββ mod.rs # Platform abstraction
β β βββ macos/ # macOS implementations
β β βββ linux/ # Linux (X11 + Wayland)
β βββ storage/
β β βββ mod.rs # Storage abstraction
β β βββ database.rs # SQLite storage
β β βββ pruning.rs # Automatic cleanup
β βββ privacy/
β β βββ mod.rs # Privacy filtering
β β βββ patterns.rs # Sensitive data detection
β βββ cli/
β βββ mod.rs # CLI commands
β βββ search.rs # Search functionality
β βββ recover.rs # Recovery interface
βββ config/
β βββ default.toml # Default configuration
βββ docs/
βββ ARCHITECTURE.md # Detailed design docs
βββ PRIVACY.md # Privacy deep-dive
βββ PLATFORM_SUPPORT.md # Platform-specific notes
Platform Support
| Platform | Clipboard | Text Field Capture | Status |
|---|---|---|---|
| macOS | β | β (Accessibility API) | Primary target |
| Linux (X11) | β | β (AT-SPI) | Primary target |
| Linux (Wayland) | β | β οΈ (Limited by protocol) | Best effort |
| Windows | β | β | Not planned |
Building
# Debug build
# Release build
# Run tests
# Run with logging
RUST_LOG=debug
Comparison to Alternatives
| Feature | flightrecorder | Keyloggers | Clipboard Managers |
|---|---|---|---|
| Open source | β | Usually β | Sometimes |
| Cross-platform | β | Varies | Varies |
| Privacy-focused | β | β | Partial |
| Captures text fields | β | Via keystrokes | β |
| Captures clipboard | β | Sometimes | β |
| Filters sensitive data | β | β | β |
| Searchable history | β | Sometimes | Sometimes |
| No raw keylogging | β | β | β |
Why "flightrecorder"?
Like an airplane's flight data recorder (black box):
- Runs silently in the background
- You forget it's there until you need it
- Invaluable for disaster recovery
- Captures just enough to reconstruct what happened
Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Areas where help is especially appreciated:
- Wayland text field capture improvements
- Additional platform support
- Privacy pattern suggestions
- UI/UX for the recovery interface
License
MIT License - See LICENSE for details.
Stop losing your work. Start recording what happens in-flight.
