CLICommands

throttle

snug throttle <COMMAND>

Rate limiting as a product: token-bucket plans and checks.

Subcommands

CommandWhat it does
create-planCreate a new throttle plan
list-plansList your throttle plans
get-planGet a single plan
update-planUpdate a plan
delete-planDelete a plan and all its buckets
checkCheck and consume capacity for a subject
peekPeek at a subject bucket without consuming
refundRefund a prior consume by its token
resetAdministratively reset a subject bucket to full capacity
statsShow plan-level counters

Run snug throttle <command> --help for that command's own options. The global options apply everywhere.

Examples

snug throttle create-plan --id daily-agent-calls --max 1000 --window 86400 --action invoke:1 --action invoke-tool-heavy:5 --namespace user --tag ai --tag billing --description "Daily agent call quota"
snug throttle list-plans
snug throttle list-plans --tag billing
snug throttle get-plan --id daily-agent-calls
snug throttle update-plan --id daily-agent-calls --max 2000 --window 86400
snug throttle delete-plan --id daily-agent-calls -f
snug throttle check --plan daily-agent-calls --subject user:42 --action invoke
snug throttle check --plan daily-agent-calls --subject user:42 --enforce hard
snug throttle check --plan daily-agent-calls --subject user:42 --repeat 100
snug throttle peek --plan daily-agent-calls --subject user:42
snug throttle refund --plan daily-agent-calls --subject user:42 --consume-token $TOKEN
snug throttle reset --plan daily-agent-calls --subject user:42 -f
snug throttle stats --plan daily-agent-calls

Next

On this page