Created
June 29, 2026 12:44
-
-
Save Chemaclass/d7cb723e2957a39aa3a307f9bbfdf207 to your computer and use it in GitHub Desktop.
A clawd function util for Clawdmeter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # util fn for https://github.com/HermannBjorgvin/Clawdmeter | |
| function clawd() { | |
| local plist="$HOME/Library/LaunchAgents/com.user.claude-usage-daemon.plist" | |
| case "$1" in | |
| start) | |
| launchctl unload "$plist" 2>/dev/null | |
| launchctl load -w "$plist" | |
| ;; | |
| stop) launchctl unload "$plist" ;; | |
| restart) launchctl unload "$plist" 2>/dev/null; launchctl load -w "$plist" ;; | |
| status) launchctl list | grep claude-usage || echo "Not loaded" ;; | |
| logs) tail -F "$HOME/Library/Logs/claude-usage-daemon.out.log" ;; | |
| errors) tail -F "$HOME/Library/Logs/claude-usage-daemon.err.log" ;; | |
| *) echo "Usage: clawd {start|stop|restart|status|logs|errors}" ;; | |
| esac | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or as fish function: