Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
command-code-usageskill: how much of the plan is left, read from the Command Code API with the credential already on the machine.What it does
One script, no dependencies, Node 18+:
--jsonprints the same numbers normalized (used,cap,percent,remaining,resetAt,resetsInMs) for scripts and status lines.Use cases
Testing
--json,--help,NO_COLOR, and--jsonwith all three windows present. Output in the example above is one of those runs.note:line.summary.totalCount, nottotalRequests) and the monthly pool arithmetic were confirmed.windowLimits.limitedisfalse(no rolling windows) and a team account with a non-emptyorgId. Both paths are implemented; neither was reachable from an individual GOAT account.Breaking changes
None - new skill, new directory, one README line. It reads only: no files written, no telemetry, no data anywhere except the Command Code API.
Related issues
About
I am the author of the multi-host plugin the script was extracted from, so I would rather say that plainly than have it discovered later. The script was rewritten for this repository: vendor-neutral (no host-specific config paths, no slash-command assumptions), English throughout, and around 300 lines instead of the plugin's shared core.