Privacy-safe, open-source Claude Code and OpenAI Codex usage collector for Worko HR. It reads token counters from local session logs and uploads hourly aggregates. Prompts, source code, project paths, Claude/Codex API keys, cookies, and provider login tokens are never uploaded.
Every release contains SHA-256 checksums, an SPDX 2.3 SBOM, and GitHub/Sigstore build provenance. The installers verify the selected binary archive against the published checksum before installation.
curl -fsSL https://github.com/revolution-uz/worko-ai-usage/releases/latest/download/install.sh | bashThe installer connects to https://hr-platform.uz by default. After installation,
either command starts the connection flow:
worko-ai-usage login
worko-ai-usage connectThe command automatically opens
https://hr-platform.uz/profile/integrations/ai-usage
in your default browser. Generate a one-time AI Usage token there, then paste it
into the hidden terminal prompt. Your account password is never requested by the
collector.
For a different Worko deployment, pass its HTTPS URL:
curl -fsSL https://github.com/revolution-uz/worko-ai-usage/releases/latest/download/install.sh | bash -s -- --url https://hr.example.comThe installer detects Intel/Apple Silicon or x86_64/ARM64, installs to
~/.local/bin, and configures an hourly launchd/systemd job. It does not start
login automatically; after installation, run worko-ai-usage login or
worko-ai-usage connect when you are ready to connect the computer.
Run PowerShell as the current user:
irm https://github.com/revolution-uz/worko-ai-usage/releases/latest/download/install.ps1 | iexThe installer detects x64/ARM64, installs under %LOCALAPPDATA%\WorkoAiUsage,
adds it to the user PATH, and configures a Task Scheduler job. It does not start
login automatically; run worko-ai-usage login or worko-ai-usage connect
after installation. Administrator access is not required.
worko-ai-usage login [--url URL] [--token ONE_TIME_TOKEN]
worko-ai-usage connect [--url URL] [--token ONE_TIME_TOKEN]
worko-ai-usage status
worko-ai-usage sync
worko-ai-usage logout
login(also available asconnect) openshttps://hr-platform.uz/profile/integrations/ai-usagein the default browser, then exchanges a single-use token for a scoped Worko HR access token. The single-use token and your account password are never stored.statusprints locally detected counters and does not contact Worko.syncuploads session-level snapshots from the latest 48 hours (up to 500 rows).logoutdeletes the local Worko token and does not affect Claude or Codex login.
| Field | Purpose |
|---|---|
Provider (claude/codex) |
Separate agent reporting |
| Anonymous machine hash | Avoid duplicate hourly snapshots |
| Anonymous session hash | Keep concurrent agent sessions separate without uploading paths |
| UTC hour | Hourly reporting |
| Input/cached/output token counts | Usage KPI |
| Usage event count | Activity indicator |
| Provider-reported 5-hour percentage | Included only when present in local provider logs |
Five-hour utilization is never inferred from token counts. It remains unknown when the provider log does not expose a limit signal. Session separation improves attribution, but a provider may report an account-wide window value rather than a session-specific quota; the HR dashboard shows signal coverage so this limitation stays visible.
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo run -- statusPushing a v* tag builds GitHub Actions release binaries for macOS, Linux, and Windows on x86_64 and ARM64. Installers always download the latest published release.
- Locked, reproducible Cargo dependency graph
- Formatting, Clippy with warnings denied, and tests on Linux, macOS, and Windows
- CodeQL Rust SAST with extended security queries
- RustSec advisory audit and
cargo-denylicense/source policy - Pull-request dependency review at moderate severity or higher
- OpenSSF Scorecard and SARIF upload
- Dependabot for Cargo and GitHub Actions
- External Actions pinned to immutable full commit SHAs
- Least-privilege workflow permissions
- SHA-256 manifests, SPDX SBOM, and build provenance attestations
Verify a release archive independently:
gh attestation verify worko-ai-usage-*.tar.gz -R revolution-uz/worko-ai-usage
sha256sum --check SHA256SUMSRepository administrators should additionally enable private vulnerability reporting, secret scanning with push protection, immutable releases, required signed commits, and branch protection requiring the CI and Security checks. These controls live in GitHub repository settings and cannot be enforced by workflow YAML alone.
MIT