A macOS CLI tool that reconstructs a timeline of computer usage for a given day or month. It reads from several macOS system data sources, classifies each period as active work, a break, or transit, and reports whether the day was worked from the office (RTO — Return To Office).
- macOS (tested on macOS 26+)
- Terminal must have Full Disk Access granted in System Settings → Privacy & Security for data sources that require it (Powerlog, Biome streams, knowledgeC.db, WiFi log). The tool will display a clear error message if access is missing.
cargo install --path crates/activityOr build without installing:
cargo build --release
# Binary is at target/release/activityOn first run, a template config file is created at $XDG_CONFIG_HOME/io.github.jcayzac.activity/config.toml (or ~/.config/io.github.jcayzac.activity/config.toml if XDG_CONFIG_HOME is not set). Edit this file to set your office WiFi SSID:
[office]
ssid = "CorpWifi"The tool will not run until ssid is configured.
activity YYYY-MM-DD|YYYYMMDD # day report
activity YYYY-MM|YYYYMM # month report
Options:
--color=never|always|auto # default: auto
Day report: a table with Start, End, Duration, Type, and RTO columns. Active periods are highlighted; breaks and transit appear in a secondary color. The RTO column shows a check mark for the configured office and superscript symbols for other known office locations. Total active time appears at the bottom.
Month report: one row per active day showing first/last timestamps, total active time, RTO indicators, and break/transit markers.
Processed data is cached in SQLite databases under $XDG_CACHE_HOME/io.github.jcayzac.activity/ (or ~/.cache/io.github.jcayzac.activity/ if XDG_CACHE_HOME is not set) to speed up subsequent runs.
Some macOS data sources have a rolling retention window of around 10 days. Data outside that window is preserved only if it was previously cached.
