{ 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; }