Opt-in Cribble bridge for usage leaderboard sync

Open
#3,574 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
swift
Domain
api, backend

Research direction

Start with VISION.md and the existing codexbar hooks enable|disable flow, then inspect the codexbar dashboard and GET /dashboard/v1/snapshot surfaces. Decide whether the official contract is a documented adapter, hook sink, or macOS settings integration. Done means the chosen path is explicitly opt-in, metadata-only, fail-closed, and keeps credentials local.

Written by the indexing model from the issue text.

Description

clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:needs-security-review clawsweeper:no-new-fix-pr impact:security issue-rating: 🌊 off-meta tidepool P3

Summary

Please add an opt-in Cribble bridge so CodexBar users who want a public usage leaderboard can push local token/cost totals to Cribble without changing the default privacy-first behavior.

Asked in public here: https://x.com/_kvnloo/status/2098612716994719891 (reply to Cribble's leaderboard post, cc @steipete).

Why

CodexBar already has the local picture (per-provider windows, cost scans, codexbar dashboard / codexbar serve). Cribble is a public AI-usage leaderboard; cribble-agent is the existing opt-in CLI that syncs metadata-only usage to POST /api/agent/usage.

Today those two worlds do not meet. People who already live in CodexBar have to run a second collector, or they never show up on Cribble at all.

Constraints (non-negotiable)

  • Off by default. No network call to Cribble until the user explicitly enables the bridge.
  • Metadata only. Tokens, timestamps, provider/model, and billed/estimated cost. No prompts, responses, cookies, session files, or emails.
  • Fail closed. Missing key, refused consent, or Cribble downtime must not break the menu bar / CLI usage views.
  • Identity stays local unless the user also opts into Cribble's own account. Prefer a Cribble agent key in Keychain/Secret Service, same pattern as cribble-agent, rather than uploading CodexBar account emails.

This matches CodexBar's privacy-first default and the existing hooks opt-in switch (codexbar hooks enable|disable).

Possible shapes (product call)

Any of these would work; listed from smallest CodexBar surface to most first-party:

  1. Documented adapter — a Cribble/community consumer of codexbar dashboard / GET /dashboard/v1/snapshot (VISION.md already points community integrations at serve/JSON rather than absorbing them).
  2. Hook sink — an official hook target that posts a redacted usage/cost event when the user enables it (codexbar hooks … already has an explicit top-level opt-in).
  3. Settings toggle — Settings → Integrations → Cribble, with a stored agent key and a last-sync receipt. Only if you want this in the macOS app.

I am fine with (1) or (2) if a first-party Cribble client is too much maintenance. The important part is an official, opt-in contract so Cribble is not scraping undocumented payloads.

Cribble side (for context, not blocking)

Happy to help on a mapping from the dashboard-v1 snapshot → Cribble events if this is accepted.

Dominant language
Swift
Stars
21.6k
Forks
2k
Avg merge
1d 9h
Merged PRs (30d)
385

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from steipete/CodexBar

All issues in steipete/CodexBar

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.