Encode a JSON string to a JWT

jwt

  • A command-line tool to work with JSON Web Tokens (JWTs).
    Encryption algorithms available are HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384.
    More information: <https://github.com/mike-engel/jwt-cli>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

jwt encode --alg {{HS256}} --secret {{1234567890}} '{{json_string}}'

click the source code to copy install jwt on any operating system with command-not-found.com