- Name: Strata
- Type: Single-crate Rust application (TUI + CLI)
- Entry Point:
src/main.rs - Edition: 2024
- clap 4.4 (CLI argument parsing)
- clap_complete 4.4 (shell completions)
- serde/serde_json (JSON export)
- directories 5.0 (XDG paths)
- chrono 0.4 with serde (time handling)
- itertools 0.12 (collection utilities)
- Data dir:
~/.local/share/strata/(or ./ if unavailable)categories.csv- category definitions with IDstime_log.csv- session history
- State dir:
~/.local/state/strata/(or ./ if unavailable)active_session.json- current active sessionbackups/- rolling backups (last 10)
categories.csv (new schema with IDs):
id,name,description,color_index,karma_effect
1,Academia,,9,1
2,Oficina,,0,1
time_log.csv (new schema with category_id):
id,date,category_id,category_name,description,start_time,end_time,elapsed_seconds
1,2026-02-19,5,Hotel,,23:39:03,00:13:32,2069
- Added
CategoryId(u64)type - stable identity - Added
idfield toCategorystruct - Sand grid now stores
Option<CategoryId>instead ofOption<usize> - Sessions store
category_id: CategoryIdinstead of category name string - Added migration: existing data auto-assigns IDs on load
- Added
test_category_id_stability_on_reorder- verifies reordering categories doesn't change session associations
# Start a session
strata start "project-name" --desc "working on feature" --category NAME
# Stop current session
strata stop
# Today's report
strata report --today
# Export
strata export --format json
strata export --format ics
strata export --format json --out path/to/export.json
# Shell completions
strata completions bash
strata completions zsh
strata completions fish- Sessions and categories use atomic write (tmp + rename)
- Rolling backups: keeps last 10 backups with timestamp
cargo fmt: PASScargo clippy: PASS (warnings only)cargo test: PASS (2 tests)