Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrono Maxi

Chrono Maxi is a cross-device activity and session-attribution system: a lightweight Rust tracker spools window/program/idle activity to a self-hosted Convex backend, and a Next.js dashboard visualizes per-device time, programs, categories, input activity, SSH sessions, timers, and drill-down state.

This repository is the public core of the project: the tracker, the Convex backend, the dashboard, and an optional native GUI shell. It is a standalone, self-hostable system on its own -- point it at your own Convex deployment and run the tracker on whatever machines you want data from. Fleet-wide deployment automation, host-specific overlays, and any private ops tooling for running Chrono Maxi across a personal device fleet are not part of this repo and live elsewhere.

Features

  • Captures active windows, program identity, idle state, and supported input counts.
  • Spools tracker data locally (durable SQLite spool) and flushes it to a central Convex ingest endpoint.
  • Separates activity by device, human actor, and named coding agent.
  • Correlates terminal title tags with SSH lifecycle sessions.
  • Applies a configurable privacy scrubber to titles/URLs before they ever leave the tracker.
  • Renders a NERV-styled dashboard with device filters, drill-down, and live rebuild tooling.

Layout

  • tracker/ -- Rust daemon that watches the active window, spools activity, and flushes it to Convex.
  • convex/ -- Convex backend: schema, ingest HTTP action, aggregation, and query functions.
  • frontend/ -- Next.js dashboard.
  • zig-frontend/ -- optional native Zig GUI shell.
  • scripts/ -- operational scripts that only need a Convex deployment (e.g. rebuild-aggregates.ts).

Prerequisites

  • Rust
  • Node.js and Bun
  • SQLite
  • Window detection:
    • Hyprland (Wayland): uses hyprctl, no extra install
    • X11: xdotool and xprop (sudo pacman -S xdotool xorg-xprop / sudo apt-get install xdotool x11-utils)

Note: on Wayland, keystroke and click counts are not captured (no global input access); window/program/category time tracking works fully.

Quick start

1. Run Convex (self-hosted)

See docs/self-host.md for a from-scratch localhost Convex self-host outline. Once it's up you'll have a deployment URL (e.g. http://127.0.0.1:3210) and an admin key.

From the repo root:

bun install
bunx convex dev   # or: bun run convex:deploy, once you're ready to deploy

2. Run the dashboard

cd frontend
cp .env.example .env   # fill in NEXT_PUBLIC_CONVEX_URL
bun install
bun run dev

3. Run the tracker

cd tracker
cargo run

The tracker reads its config from ~/.config/chronomaxi/ on first run (created with sane defaults if missing) -- set ingest_url to your Convex deployment's HTTP action URL and ingest_secret to match what Convex expects.

Optional: native GUI

cd zig-frontend
zig build
./zig-out/bin/chronomaxi-gui

Optional: run the tracker as a systemd user service

Chrono Maxi doesn't ship a service unit in this repo (paths are installation-specific). A minimal template:

[Unit]
Description=Chrono Maxi tracker

[Service]
ExecStart=/path/to/chronomaxi/tracker/target/release/chronomaxi-tracker
Restart=on-failure

[Install]
WantedBy=default.target

Save it as ~/.config/systemd/user/chronomaxi-tracker.service, then:

systemctl --user daemon-reload
systemctl --user enable --now chronomaxi-tracker.service
sudo loginctl enable-linger $USER   # keep it running after logout

Aggregate rebuilds

scripts/rebuild-aggregates.ts wipes and replays the materialized rollup tables (dayAgg, hourAgg, programAgg, categoryAgg, programDetailAgg) from spans, which is never modified. It's resumable and requires CONVEX_SELF_HOSTED_URL / CONVEX_SELF_HOSTED_ADMIN_KEY to be set; read the in-file preconditions banner before running it with --yes against anything you care about.

Contributing

Open a PR. If it's good, it'll get merged.

About

Personalized time tracking spyware written in Rust / Typescript interface for visualizing data

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages