Skip to main content

prokodo credits

Show your current credit balance.

prokodo credits [global options]

Description

Connects to the prokodo API using the resolved API key and prints your current balance.

Requirements

An API key must be configured via one of the standard priority sources:

  1. --api-key global flag
  2. PROKODO_API_KEY environment variable
  3. ~/.config/prokodo/credentials.json

If none are found in non-interactive mode, the command exits 2.

Examples

prokodo credits
# ℹ Balance: 42 credits
prokodo credits --json
# → { "balance": 42, "unit": "credits", "stub": false }
# Use in a script to gate a workflow
BALANCE=$(prokodo credits --json | jq .balance)
if [[ "$BALANCE" -lt 5 ]]; then
echo "Credits too low to run verification"
exit 1
fi

JSON output schema

{
"balance": 42,
"unit": "credits",
"stub": false
}
FieldDescription
balanceCurrent numeric credit balance
unitUnit string (e.g. "credits")
stubtrue if the credits system is in preview mode

Exit codes

CodeCause
0Balance retrieved successfully
2No API key configured
1API request failed