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.
- 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
# Stage a single event as JSON in ./staging
mirror-log add "Overhead allocation needs review" --source journal
# Stage a file as JSON in ./staging
mirror-log add-file notes.md --source meetings
# Persist stdin events to SQLite in batches, then also write staged copies
cat ideas.txt | mirror-log stdin --source ideas
# Review staged events
mirror-log review
# Detect simple patterns from staged events
mirror-log infer
# Render staged events back out
mirror-log regenerate --output human.md
# Query persisted events
mirror-log show --last 10
mirror-log search "allocation"
mirror-log search "allocation" --chunks
mirror-log get <event-id>
# Database and integrity views
mirror-log stats
mirror-log info
mirror-log verify
# Attention layer
mirror-log attention
mirror-log attention --flagged
mirror-log attention --stats
mirror-log add-to-attention <event-id>git clone https://github.com/CromboJambo/mirror-log
cd mirror-log
cargo build --release
# Optional feature paths
cargo build --release --features embedding
cargo build --release --features inference
cargo build --release --features clipboard
# Or install locally
cargo install --path .The binary is written to target/release/mirror-log.
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
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.
- USER_GUIDE.md: usage, storage, and workflow details
- src/lib.rs: public module and re-export surface
- CHANGELOG.md: release history
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;cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo testDependency audit helpers:
scripts/dep-audit.sh
scripts/dep-audit.sh --features embedding
scripts/log-dep-audit.sh
scripts/log-dep-audit-matrix.shAGPL-3.0-or-later. See LICENSE.