Skip to Content
Docs

Desktop tracker

Process model

struggletime daemon is a native background process. No screen capture, accessibility APIs for content, or third-party analytics SDKs.

every ~1s
  |- poll linked project folders
  |- watch saves and known build/test caches
  |- drain ~/.aitime/agent_events.jsonl (adapter counts)
  |- update active work window + idle clock
  |- seal time slices -> append local log -> offline queue -> sync
struggletime daemon --repo /path/to/project
# or via helper:
struggletime start --repo /path/to/project

Multi-project afternoons

Link multiple repos with the helper. The loop watches all linked roots. When you switch trees, credit follows the project that is actually changing.

What counts as “active”

Billable time is the active span: contiguous seconds where the tracker sees meaningful change (file saves, adapter/exec category events). Leaving the daemon running while you do nothing does not bill.

Quiet reading after real work (5–12 minutes)

After you fix something you often stare at a stack trace without typing. st-core applies a tapered weight instead of dropping to zero immediately.

Sealing time slices

  1. Aggregate events into a time bucket.
  2. Stamp FORMULA_VERSION and score.
  3. Append to .aitime-ledger.json with prev_hash.
  4. Enqueue for POST /v1/buckets/batch when online.

What the tracker never does

  • Capture screens, keystrokes, clipboards, or microphones
  • Read or upload file contents or raw prompts
  • Store command-line arguments
  • Send unhashed absolute paths

File IDs are sha256(salt:path) hex. See Privacy.

Optional adapters

Adapters append allowlisted lines to ~/.aitime/agent_events.jsonl. Setup: Integrations.

Debug mode

STRUGGLETIME_DEBUG=1 struggletime daemon --repo ~/my-project
struggletime daemon --debug --repo ~/my-project

Logs print labels only — never paths, prompts, or argv.

Verification

make check
cd rust && cargo test -p st-core

On this page