Skip to content

meta: fetcher roadmap - Coding & Build #64

Open

Description

@unhappychoice

CI, deploy, coding activity, dev community fetchers. Part of the widget catalog index in #41.

ci_* / deploy_* — build & release

  • ci_status — pairs with badge renderer
  • ci_build_time_trend
  • ci_test_pass_rate
  • deploy_status
  • deploy_prod_version
  • deploy_diff — staging vs prod
  • deploy_error_budget — SLO remaining
  • deploy_vercel / deploy_netlify / deploy_fly — vendor-specific rollups

Competitive programming / profile rating

  • leetcode_daily_problem
  • leetcode_streak
  • leetcode_rating
  • codeforces_rating
  • codeforces_next_contest
  • atcoder_rating
  • atcoder_next_contest
  • advent_of_code — personal stars + private-leaderboard standing during AoC season (Text / Bars / Badge)
  • codecov_coverage — coverage % from the Codecov service for a repo (Ratio / Badge); service-side counterpart to local code_loc / code_comments (meta: fetcher roadmap - Local / System #62)

stackoverflow_*

  • stackoverflow_reputation_delta
  • stackoverflow_inbox_unread

Blog / content platforms

  • devto_own_stats — views / reactions / followers
  • hashnode_own_stats

Research / reading

  • arxiv_new — new papers in configured category (Timeline)
  • semantic_scholar_alerts
  • tech_conferences — upcoming tech conferences + CFP deadlines via confs.tech open data (fixed-host → Safe); filter_topics. Timeline / Entries / Text (next conf)

oss_* — open-source community stats (Network)

  • oss_followers_delta
  • oss_pr_merge_streak
  • oss_issue_close_velocity
  • oss_stars_history — feeds sparkline

Package registry downloads

  • npm_downloads
  • crates_downloads
  • pypi_downloads
  • crates_owned / npm_owned — publisher rollup: total downloads across all packages you own, ranked
  • package_size — published artifact size for a configured package (bundlephobia for npm, crates.io for Rust); Text / Bars
  • package_release — subscribe to new versions of configured packages (source via option)

Trending feeds

  • github_trending — daily / weekly trending repos
  • gitlab_trending
  • google_trends — today's trending searches via the public Google Trends daily-trends feed (fixed-host → Safe); geo option. TextBlock / Timeline / Bars
  • huggingface_trending — Shipped in feat(fetcher): add *_trending batch — reddit / wikipedia / crypto / huggingface #242. HF Hub /api/{models|datasets|spaces}?sort=trendingScore&direction=-1 (no auth). 7 shapes (LinkedTextBlock default + ImageLinkedList / TextBlock / Text / MarkdownTextBlock / Entries / Bars). kind = "models" | "datasets" | "spaces", count 1..=30. ImageLinkedList resolves the author avatar per-row via /api/users/{author} then /api/organizations/{author} fallback (HF puts both in the same namespace but separate paths); repeat authors dedup in-loop. Bars carry raw likes count.

AI / LLM — API spend & token usage (Safe, fixed vendor host)

"Am I about to blow this month's budget?" — answer changes hour to hour, dashboard saves a trip to a billing console. Token-auth against a hardcoded vendor host stays Safe per the trust model.

  • openai_usage — Admin API GET /v1/organization/usage/completions + /v1/organization/costs. Auth: org-scoped admin key (not regular). Unix timestamps for date range. Gotcha: cache tokens not separated in response — must infer or skip. Cursor pagination via next_page. Reference: OpenAI cookbook. Text / Ratio / NumberSeries / Bars / Entries / Badge
  • openrouter_credits — GET /api/v1/credits (balance + total_usage), /api/v1/auth/key (daily_spend / weekly_spend / monthly_spend), /api/v1/generation/{id} (per-request native tokens + cost). Auth: management key, distinct from inference key. No pagination, simplest of the bunch. Text / Ratio / NumberSeries / Bars
  • gemini_usage — Deferred: Google AI Studio has no usage API; the only path is Vertex AI → Cloud Billing export to BigQuery, which is overkill for a dashboard widget. No OSS tracker found. Wait for an official endpoint.
  • replicate_usage — Deferred / Hard: Replicate's /v1/predictions/{id} returns metrics.predict_time (seconds) but not cost and not hardware tier. Cost requires a static model → hardware_tier → $/sec lookup table maintained by hand. Bars / Text only if attempted.

AI / LLM — subscription seat / rate-limit headroom (Safe, fixed vendor host)

Seat-based products with monthly request caps or rolling rate-limit windows. Same "pace yourself" use case as the API-spend group.

  • claude_subscription — Shipped in feat(fetcher): claude_* family — claude_code_usage + claude_subscription #251. Undocumented endpoint is GET (not POST as originally drafted — POSTing returns 405). Walks the response generically and surfaces every non-null window — five_hour, seven_day, seven_day_sonnet, seven_day_opus, seven_day_omelette (= "Claude Design" in the claude.ai UI), and any internal codenames the server returns. Utilization arrives 0..100 percent, normalised to 0..1 internally with a 1.5 ceiling for over-quota states. window option accepts friendly aliases (5h / 7d / claude_design) plus any raw response key. extra_usage (different schema) is skipped. 8 shapes: Ratio (default) / Text / TextBlock / MarkdownTextBlock / Entries / Bars / Badge / Timeline. Status tone bucketed at <60% Ok / <85% Warn / ≥85% Error. Refresh 15 min.
    • Alt path: parse anthropic-ratelimit-unified-5h-utilization / unified-7d-utilization response headers from any real /v1/messages call (also undocumented but reportedly returned). Costs a request.
  • codex_subscription — Shipped in feat(fetcher): add codex_usage + codex_subscription, unify llm pricing via Actions sync #252. No HTTP — every token_count event Codex CLI writes to the session JSONL carries the rate-limit payload (primary = 5h, secondary = 7d, plan_type), so the fetcher just walks the newest ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl and reads the last such event. Re-fetching this would mean making a billable inference call, so we deliberately don't. Freshness bounded by "when did the user last run Codex"; format_reset renders now for a window that's already rolled over (surfaces staleness honestly). window option accepts 5h / 7d / primary / secondary aliases. 8 shapes: Ratio (default) / Text / TextBlock / MarkdownTextBlock / Entries / Bars / Badge / Timeline. Same status-tone thresholds as claude_subscription.
  • cursor_usage (personal plan) — Reverse-engineered POST https://cursor.com/api/dashboard/{get-monthly-invoice,get-hard-limit,get-usage-based-premium-requests}. Auth: WorkosCursorSessionToken cookie extracted from Cursor's local sqlite db. Reference: Dwtexe/cursor-stats. Brittle (tied to Cursor app internals). Text / Ratio / Bars / Badge
  • cursor_usage_team (enterprise / team plan) — Official https://api.cursor.com/teams/{members,spend,daily-usage-data,filtered-usage-events} + /analytics/team/*. Auth: HTTP Basic with CURSOR_ADMIN_API_KEY. Rate limit 20 req/min, pagination via totalPages. Reference: ofershap/cursor-usage-tracker. Same shapes as cursor_usage
  • copilot_usage — Official GET /users/{username}/settings/billing/premium_request/usage?year=&month=&day=. Auth: GitHub OAuth user scope; simplest impl spawns gh api (reuses existing auth, like kevingosse/copilot-usage Rust impl). Stable, documented. Text / Ratio / Badge
  • windsurf_usage — Deferred: no OSS tracker found, no public API; Windsurf's own dashboard is the only surface. Revisit when community reverse-engineers it.

AI / LLM — local agent activity (Safe, reads local files only)

Counterpart to the network usage groups: aggregates what this machine has done with its AI tooling. No network, no token, no trust gate — same class as git_* / code_loc. Useful even on flat-rate plans where API-side stats don't apply.

  • claude_code_usage — Shipped in feat(fetcher): claude_* family — claude_code_usage + claude_subscription #251. Walks <root>/projects/<encoded-cwd>/<uuid>.jsonl under every root in discover_jsonl_dirs (default ~/.claude + ~/.config/claude, override via CLAUDE_CONFIG_DIR comma-separated). Pricing is hardcoded in src/fetcher/claude/common.rs (Opus / Sonnet / Haiku + claude-3-* legacy aliases) rather than vendoring LiteLLM — keeps the fetcher offline-safe; future PR can wire LiteLLM if richer coverage is needed. Dedup by (message.id, requestId); records with either ID empty pass through unmodified rather than collapsing into a single bucket. since (today / 7d / 30d / all) uses calendar-day comparison so totals match the per-day NumberSeries bucket window exactly. Dropped the substring pre-filter — parse_event's kind == "assistant" check is authoritative. 7 shapes: Text (default — "Today: 17.0M tokens / $52.70") / TextBlock / MarkdownTextBlock / Entries / Bars (value=tokens, value_label=cost) / NumberSeries (daily totals) / Badge (cost tier <$10 Ok / <$50 Warn / ≥$50 Error). group_by = project / model / day, limit 1..=50. Refresh 5 min. Timeline / Ratio / Calendar / Heatmap shapes from the original spec were deferred — open if anyone needs them.
  • codex_usage — Shipped in feat(fetcher): add codex_usage + codex_subscription, unify llm pricing via Actions sync #252. Walks ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (or $CODEX_HOME/sessions/...). Streams each session line-by-line, threading turn_context.model + cwd forward so each event_msg of type token_count gets the right attribution; info.last_token_usage carries the per-turn deltas. Sessions before Codex's 2025-09-06 0269096 commit lack token_count events and degrade silently to zero — the schema-validating parser just skips them. Filename-prefix filter (rollout-YYYY-MM-DD…) drops files outside the since window before opening, taking cold-cache first paint over 1.4k files / 527 MB from seconds to milliseconds. Pricing comes from the shared llm_pricing snapshot (LiteLLM-derived, daily Actions sync — see issue meta: widget catalog & roadmap #41 architecture notes). 7 shapes: Text (default — "Today: 1.8M tokens / $7.42") / TextBlock / MarkdownTextBlock / Entries / Bars (value=tokens, value_label=cost) / NumberSeries (daily totals) / Badge (cost tier <$10 Ok / <$50 Warn / ≥$50 Error). group_by = project / model / day, limit 1..=50, since = today / 7d / 30d / all. Refresh 5 min. The ~/.codex/history.jsonl cross-session prompt log was deferred — separate fetcher candidate if anyone needs it.
  • aider_usage — Dropped: aider stores chat history as Markdown (.aider.chat.history.md) with no structured token log; /tokens is computed in-memory and never persisted. Re-evaluate if upstream adds a JSONL session log.
  • gemini_usage_local — Dropped: Gemini CLI emits OpenTelemetry/Jaeger traces, not a simple JSONL — implementing an OTLP receiver is wildly out of proportion. Re-evaluate if they add a simpler session log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    widget

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions