Keys Create
Easily create a new API key for the Eyeroll service.
Create a new eyeroll API key.
Usage
/eyeroll:keys-create [name]
If no name is given, ask the user what to call the key (e.g. "ci-bot", "laptop", "production").
Steps
-
Check that
$EYEROLL_API_KEYis set. If not, tell the user to run/eyeroll:signupfirst. -
Set
EYEROLL_API_URLtohttps://api.eyeroll.devif not already set. -
Determine the key name: use the argument if provided, otherwise ask the user.
-
Run:
curl -s -X POST "$EYEROLL_API_URL/api/keys" \
-H "Authorization: Bearer $EYEROLL_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"name\": \"<NAME>\"}"
-
Display the new key clearly:
- API key:
api_keyvalue (shown in full — this is the only time it's shown) - Key ID:
key_id - Name:
key_name
- API key:
-
Remind the user: this key has the same permissions and rate limit as their existing keys. Use
/eyeroll:keys-listto see all keys.