jwtcli

command module
v0.0.0-...-2e30b3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 18 Imported by: 0

README ΒΆ

jwtcli πŸ”

A tiny CLI to pretty-print JSON Web Tokens (JWTs).

Decodes and formats header and payload. Additionally annotates standard time-based claims (iat, nbf, exp) with human-readable timestamps in your local timezone.

Installation πŸ“¦

Build from source πŸ—οΈ

Clone and build:

git clone https://github.com/floj/jwtcli.git
cd jwtcli
./build.sh

The resulting binary will be ./jwtcli (or ./jwtcli.exe on Windows).

Go install πŸš€
go install github.com/floj/jwtcli@latest

This places jwtcli in your GOBIN (usually ~/go/bin). Ensure it is on your PATH.

Usage 🧭

You can pass a JWT via arguments or pipe it via stdin.

From arguments πŸ’¬
jwtcli <jwt1> [<jwt2> ...]
From stdin πŸ“₯
echo "$JWT" | jwtcli
# or
cat tokens.txt | jwtcli

Examples πŸ§ͺ

jwtcli eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0IiwiaWF0IjoxNzAwMDAwMDB9.signature

Output:

{
  "alg": "HS256",
  "typ": "JWT"
}
{
  "iat": 170000000,
  "sub": "1234"
}
// iat: 1975-05-22 15:13:20 +0100 CET

Build script πŸ› οΈ

./build.sh builds a statically linked binary.

./build.sh

Development πŸ§‘β€πŸ’»

# Run directly
go run ./

# Build
go build ./

License πŸ“„

MIT, see LICENSE.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL