tokx-cli
v0.1.2
Published
JWT decode, encode, verify from your terminal
Maintainers
Readme
tokx
JWT decode, encode, verify from your terminal.
Install
npm install -g tokx-cliCommands
Decode
tokx decode <token>
tokx decode <token> --jsonPretty-prints header + payload with color-coded JWT parts, claim status icons, and relative expiry time.
Encode
tokx encode --secret <secret> --payload '{"sub":"123"}'
tokx encode --secret <secret> --payload '{"sub":"123"}' --algorithm HS512 --expires 3600
tokx encode --secret <secret> --payload '{"sub":"123"}' --jsonVerify
tokx verify <token> --secret <secret>
tokx verify <token> --secret <secret> --jsonAuto-detects algorithm from token header. Shows a verification badge.
Libraries
tokx libs
tokx libs --language Python
tokx libs --algorithm EdDSA
tokx libs --jsonExit Codes
| Code | Meaning | |------|---------| | 0 | Success | | 1 | Invalid input | | 2 | Verification failed | | 3 | Internal error |
Features
- Color-coded JWT parts (header=red, payload=purple, signature=cyan)
- Box-framed output for decoded header/payload
- Spinner for async operations
--jsonflag on all commands for machine-readable output- Respects
NO_COLORenvironment variable
License
MIT
