@whoworked/ai-reporter-cli
v0.1.8
Published
Guarded CLI reporter for WhoWorked AI attribution.
Downloads
1,326
Readme
WhoWorked AI Reporter CLI
Guarded CLI reporter for WhoWorked AI attribution. It captures local AI tool stop events and sends them to a WhoWorked workspace as reviewable AI attributions.
The reporter defaults to guarded content capture: it sends metadata such as tool name, event type, repo, branch, edited file count, and tool-call count, plus bounded, redacted prompt/response snippets when the local tool payload or transcript exposes them. It does not capture screen content or raw full-content logs by default.
Install
One-command setup uses the public npm package, installs the reporter globally, launches the OAuth flow, and configures Stop hooks for Claude Code and Codex when they are detected.
macOS, Linux, and Windows:
npm exec --yes --package @whoworked/ai-reporter-cli@latest -- whoworked-reporter-setupThe monorepo is private, so the installer does not depend on raw GitHub URLs. For convenience, the npm package also ships thin wrappers:
whoworked-reporter-setupOverride endpoints for non-production environments:
WHOWORKED_API_BASE_URL=http://localhost:3001 \
WHOWORKED_WEB_APP_URL=http://localhost:3000/app \
npm exec --yes --package @whoworked/ai-reporter-cli@latest -- whoworked-reporter-setupManual install:
npm install -g @whoworked/ai-reporter-cliConfirm the binary is available:
whoworked-reporter auth statusAuthenticate
Each user should authenticate with OAuth so reports are tied to their WhoWorked user. API keys are workspace-level and are not supported for personal Claude Code or Codex reporters.
whoworked-reporter auth login \
--api-base-url https://api.whoworked.com \
--web-app-url https://whoworked.com/appThe command opens the WhoWorked authorization flow. Pick the workspace where AI usage should be reported.
Claude Code
Merge templates/claude-code-hooks.json into your Claude Code hooks config.
The Stop hook captures the Claude Code stop payload and immediately flushes the
local queue:
whoworked-reporter capture claude-code stop && whoworked-reporter capture flushCodex
Configure Codex's stop command to run one of the provided wrappers:
templates/codex-stop-hook.shtemplates/codex-stop-hook.ps1
The wrappers accept an optional JSON payload on stdin, capture a guarded Codex stop event, and immediately flush the local queue.
Codex only executes the command once the Stop hook is trusted in the Codex hooks
UI (/hooks).
Direct command form:
whoworked-reporter capture codex stop && whoworked-reporter capture flushQueue
Capture commands write to a local queue first:
~/.whoworked/ai-reporter-queue.jsonlFlush manually when needed:
whoworked-reporter capture flushReporter config is stored at:
~/.whoworked/ai-reporter.jsonCommands
whoworked-reporter auth login
whoworked-reporter auth status
whoworked-reporter auth logout
whoworked-reporter capture claude-code session-start
whoworked-reporter capture claude-code stop
whoworked-reporter capture claude-code session-end
whoworked-reporter capture codex stop
whoworked-reporter capture flush