feat(terra): Claude subscription limits panel on the rail
CLD panel next to luna showing the 5-hour and weekly usage windows (plus any per-model weekly caps), polled every 5 min via a new `claude-usage` script that reuses Claude Code's OAuth login and refreshes it when expired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{ writeShellApplication, coreutils, curl, jq, util-linux }:
|
||||
|
||||
# Prints the Claude subscription's rate-limit windows as one JSON line, for the
|
||||
# rail's CLD panel. Reuses Claude Code's OAuth login rather than a key of its
|
||||
# own, so there is nothing to provision; always exits 0 with `{"error": ...}`
|
||||
# so the panel can show why instead of going blank.
|
||||
writeShellApplication {
|
||||
name = "claude-usage";
|
||||
runtimeInputs = [ coreutils curl jq util-linux ];
|
||||
text = builtins.readFile ./claude-usage.sh;
|
||||
}
|
||||
Reference in New Issue
Block a user