harness-analyzer
v0.4.0
Published
Local AI harness usage analytics and secure aggregate profile sync
Readme
Harness Analyzer CLI
Collect Claude Code, Codex and other local AI harness usage without uploading raw sessions, prompts, files or project paths.
Install
npm install -g harness-analyzerSync the hosted profile
- Open
https://harness-analyzer.marketmaker.cc/profile. - In "CLI sync", create and copy a token.
- Connect this computer and upload an aggregate snapshot:
harness-analyzer login
harness-analyzer syncThe token is stored in ~/.config/harness-analyzer/credentials.json with mode 0600. For automation, provide it through HARNESS_ANALYZER_TOKEN instead. harness-analyzer logout removes the local token; revoke the server token from Profile.
Each installation also keeps a random device ID and label in ~/.config/harness-analyzer/device.json with mode 0600. The ID survives logout so repeated uploads replace that device's latest snapshot instead of creating duplicates. By default the private label is the local hostname. Set a persistent alias with --device-name:
harness-analyzer login --device-name build-worker-01
# or update it during the next upload
harness-analyzer sync --device-name build-worker-01HARNESS_ANALYZER_DEVICE_NAME overrides the saved label for one process without changing device.json. When both are present, the explicit --device-name value wins and is saved. Device labels, platform and architecture are sent only to the private owner analytics used for the device breakdown; they are never included in the public profile.
Sync a server fleet
Connect every server to the same account token. Each installation retains its own ID, and the service aggregates the latest snapshot from every device:
# Run on worker-01 through worker-10 with the matching number.
export HARNESS_ANALYZER_TOKEN='ha_sync_...'
harness-analyzer sync --device-name worker-01For scheduled jobs that should not persist an infrastructure hostname, use a temporary alias instead:
HARNESS_ANALYZER_DEVICE_NAME=worker-01 harness-analyzer sync --quietUse harness-analyzer sync --dry-run to inspect totals without making a network request. Existing offline commands remain available: summary, today, week, month, projects, and sessions.
