mirror-log is a local-first event log for capturing notes, commands, snippets, and other context you do not want to lose. Persisted events live in SQLite. Staged events live as JSON files in staging/ until you review or process them.
Version 0.1.9 reflects the current shipped behavior: a lean SQLite core, staging helpers for review-oriented workflows, an attention/decay layer, and optional embedding or inference integrations behind Cargo features.
What It Does
- Persists events to SQLite with UUIDs, timestamps, hashes, and chunk records
- Stages reviewable JSON events in
staging/ - Searches full events and chunked content
- Tracks duplicates by
content_hash - Exposes attention and decay views over persisted events
- Supports optional embeddings, inference backends, iteration tables, and clipboard ingestion
Current Workflow
# Stage a single event as JSON in ./staging
# Stage a file as JSON in ./staging
# Persist stdin events to SQLite in batches, then also write staged copies
|
# Review staged events
# Detect simple patterns from staged events
# Render staged events back out
# Query persisted events
# Database and integrity views
# Attention layer
Installation
# Optional feature paths
# Or install locally
The binary is written to target/release/mirror-log.
Storage Model
Persisted log data lives in mirror.db by default.
eventsstores the canonical persisted event logchunksstores chunked slices for large content and chunk searchdecayandshadow_statesupport attention/visibility behaviorevent_embeddings,event_tags,event_links, and iteration tables support enrichment-oriented workflows
Staged data is separate from the persisted log.
addandadd-filewriteStagedEventJSON files tostaging/stdincurrently persists events to SQLite first and then emits staged copies for review- Persisted events are append-only; staged files are a working set
Features
The default build is intentionally lean.
embedding: tokenizers-backed embedding generation and similarity searchinference: HTTP inference backend supportiteration: iteration query and type exportsclipboard: clipboard watcher support
Attention and staging are part of the current default build, not separate feature flags.
Documentation
- USER_GUIDE.md: usage, storage, and workflow details
- src/lib.rs: public module and re-export surface
- CHANGELOG.md: release history
Direct SQLite Access
SELECT datetime(timestamp, 'unixepoch'), source, content
FROM events
ORDER BY timestamp DESC
LIMIT 10;
SELECT source, COUNT(*)
FROM events
GROUP BY source
ORDER BY COUNT(*) DESC;
SELECT COUNT(*) AS total,
COUNT(DISTINCT content_hash) AS unique_events
FROM events;
Development
Dependency audit helpers:
License
AGPL-3.0-or-later. See LICENSE.