Repository navigation
Added
bin/statusline.sh: recordsrate_limitsusage and reset times from the Claude Code status line into~/.claude/usage-guard/usage.jsonand shows5h:xx% 7d:xx%in the status bar. Delegates to a previously configured status line command when one is saved aspassthrough.bin/guard-hook.sh:PreToolUse/UserPromptSubmithook that returnscontinue: falsewhen any monitored window has reached the threshold. Fails open on missing, stale or unreadable state.install.sh: idempotent installer that copies the scripts, backs upsettings.json, preserves an existing status line aspassthrough, and merges the status line and hook entries withjq.uninstall.sh: removes only the entries added by the installer, restores the previous status line, and deletes the install directory.- Configuration via
config.json(threshold,max_age_seconds,windows,passthrough) withCLAUDE_USAGE_GUARD_*environment variable overrides. - bats-core test suite and GitHub Actions CI (ShellCheck, Ubuntu, macOS).
Install
curl -fsSL https://raw.githubusercontent.com/codenote-net/cc-usage-guard/v0.1.0/install.sh | bashFull Changelog: https://github.com/codenote-net/cc-usage-guard/blob/v0.1.0/CHANGELOG.md