Skip to content

Feature request: widget to display extra usage used_credits #414

Closed

Description

@mhriemers

Summary

The usage API's extra_usage.used_credits is already fetched and cached by ccstatusline (extraUsageUsed in CachedUsageDataSchema), but no widget can display it. Please add an extra-usage-used widget — or have extra-usage-remaining fall back to showing the used amount when extraUsageLimit is absent.

Motivation

For accounts with extra usage enabled but no monthly limit configured (monthly_limit: null — pay-as-you-go with no cap), neither existing extra-usage widget can render anything:

Widget Shows Needs
extra-usage-remaining limit − used extraUsageLimit — absent
extra-usage-utilization used / limit % extraUsageUtilization — absent

used_credits is the only meaningful extra-usage number for such accounts, and arguably interesting for capped accounts too (a used/remaining toggle, similar in spirit to #391).

Current workaround

A custom-command widget reading ccstatusline's own cache:

jq -r '(.extraUsageUsed // 0) / 100' "$HOME/.cache/ccstatusline/usage.json" | LC_ALL=C xargs printf 'extra: €%.2f'

Related: #413 (these widgets currently show a permanent [Timeout] for limit-less accounts), #415 (currency formatting).

Activity

  1. added a commit that references this issue on Jun 4, 2026
    b42ea09
  2. added a commit that references this issue on Jun 14, 2026
    7db0914
  3. added a commit that references this issue on Oct 20, 2026
    8d69ddf
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions