Pure Rust journald reader with trace geometry navigation and grammar-based log folding.
spacejn reads systemd journal files directly (no journalctl dependency), with ripgrep-level performance optimizations: jemalloc, SIMD field lookup via memchr, memory-mapped file access, and O(k) reverse iteration for "last N" queries.
spacejn babel 50 # Last 50 lines of babel service
spacejn babel 30m # Last 30 minutes
spacejn babel 5..15 # Lines 5-15 (range-addressable)
spacejn babel 14:30..15:00 # Time range (today)
spacejn babel -f # Follow mode
spacejn ls # List available services
spacejn --errors # Errors only- Direct journal parsing — reads
.journalfiles via mmap, no subprocess overhead - Range addressing — line ranges, duration ranges, time ranges
- Follow mode — live tail with inotify-based file watching
- Grammar-based folding — Sequitur-derived algorithm detects repeated log patterns and collapses them into named rules, showing structure instead of noise
- VTR collapse — optional integration with vtr for vertical time-wise record visualization
- Multi-file directory reading — handles rotated journal files transparently
- Colorized output — field-aware colorization with configurable palette
cargo install --git https://github.com/holo-q/spacejngit clone https://github.com/holo-q/spacejn
cd spacejn
cargo build --releaseThe vtr feature (enabled by default) expects the vtr crate cloned alongside:
git clone https://github.com/holo-q/vtr ../vtrTo build without VTR: cargo build --release --no-default-features
src/
cli/ Command-line interface, argument parsing, rendering pipeline
format/ Journal binary format parser (header, entries, objects, compression)
reader/ Multi-file journal reader with filtering, cursors, and file watching
folding/ Grammar induction engine (Sequitur + clustering + periodicity detection)
render/ Output renderers (terminal, JSON, grammar visualization, manifold)
sample.rs Sampling abstraction for journal entries
events.rs Structured event extraction from journal fields
time.rs Timestamp utilities
MIT