CLICommands
jwt
snug jwt <COMMAND>JWT token generation and management.
Subcommands
| Command | What it does |
|---|---|
keygen | Generate an RSA keypair for signing/verifying SnugNut tokens (RS256) |
generate | Generate new JWT tokens |
decode | Decode and inspect JWT without validation |
verify | Validate JWT against secret and claims |
refresh | Generate new token from existing (if valid) |
config | Manage JWT configurations |
Run snug jwt <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug jwt keygen --out-dir ./secrets
snug jwt generate user -u admin -t org123 --platform-role admin
snug jwt generate service -s worker -t org123 --scope '*:read'
snug jwt decode $SNUG_API_TOKEN
snug jwt verify $SNUG_API_TOKEN
snug jwt refresh $SNUG_API_TOKEN --extend 7d
snug jwt config show
snug jwt config set issuer https://auth.example.comNext
- Related guide - the concepts behind these commands.
- CLI reference - global options, output modes, and exit codes.