main
AI Credits Balance
Plasmoide (widget) per KDE Plasma 6 che mostra il credito residuo di DeepSeek e OpenRouter, leggendo le chiavi API da ~/.pi/agent/auth.json (i provider deepseek e openrouter del pi agent).
Dati mostrati
- DeepSeek — saldo totale (
total_balance), scomposto ingranted+top-up, con badge di disponibilità (is_available). Barra opzionale calcolata su un budget di riferimento configurabile. - OpenRouter — credito residuo (
total_credits - total_usage), usato / totale e percentuale residua con barra.
Sorgenti API
| Servizio | Endpoint | Autenticazione |
|---|---|---|
| DeepSeek | GET https://api.deepseek.com/user/balance |
Authorization: Bearer <key> |
| OpenRouter | GET https://openrouter.ai/api/v1/credits |
Authorization: Bearer <key> (management key) |
Nota OpenRouter: l'endpoint
/api/v1/creditsrichiede una management key. Una routing key normale può restituire un errore di autorizzazione.
Installazione
# copia in ~/.local/share/plasma/plasmoids/ (riavvio plasmashell)
cp -r org.enne2.ai-credits.balance ~/.local/share/plasmoids/
systemctl --user restart plasma-plasmashell.service
# poi "Aggiungi widget" → "Credito AI Residuo"
Oppure via kpackagetool6:
kpackagetool6 -t Plasma/Applet -i org.enne2.ai-credits.balance.tar.gz
Configurazione
Dal plasmoide → Impostazioni:
- Intervallo di aggiornamento (30–3600 s, default 300)
- Soglia gialla/rossa residuo (%) per le barre
- Budget di riferimento DeepSeek ($) per la barra (0 = nessuna barra)
- Mostra/nascondi DeepSeek, OpenRouter
Description
Plasmoide KDE Plasma 6: credito residuo DeepSeek e OpenRouter (chiavi da ~/.pi/agent/auth.json)
41 KiB
Languages
QML
84.4%
Shell
15.6%