LiteLLM spend indicator for Waybar.
Displays today's and month-to-date spend against configurable budgets. The Waybar tooltip includes the totals and percentage used.
Clone the repository, then install it from the project directory:
uv tool install .This installs the litellm-cost command.
Set your LiteLLM base URL and budgets. --key opens a hidden prompt for your
API key:
litellm-cost config \
--url https://litellm.example.com \
--key \
--daily-limit 10 \
--monthly-limit 200Configuration is stored in ~/.config/litellm-cost/config.yaml with file
permissions set to 0600. The API key is sent as a Bearer token, and is only
sent to HTTPS URLs.
To show an optional estimate of the amount available per remaining weekday,
enable --remaining-budget:
litellm-cost config --remaining-budgetUse --no-remaining-budget to turn it off. Weekends are excluded from the
estimate.
Add the module to your Waybar config and include it in modules-right (or
another module list):
The module reports a status class based on the higher of the daily and monthly
budget percentages: normal below 80%, warning from 80%, and critical at
100% or more. Request or configuration errors use the error class.
Optional colors are provided in waybar.css. Copy the rules into your Waybar stylesheet to style each status class.

{ "modules-right": ["custom/litellm-cost"], "custom/litellm-cost": { "exec": "litellm-cost waybar", "return-type": "json", "interval": 60, "tooltip": true } }