JWT Decode - Token Inspector CLI
Decode and inspect JWT tokens from command line. Check expiration, extract claims, debug auth. No more jwt.io tabs. Free CLI tool.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- JWT Decode - Token Inspector CLI
- description
- Decode and inspect JWT tokens from command line. Check expiration, extract claims, debug auth. No more jwt.io tabs. Free CLI tool.
02 资源文件 1
- 参考文档_meta.json298 B
03 SKILL.md 正文
JWT Decode
Decode JWTs from the terminal. See what's inside, check if expired.
Installation
npm install -g @lxgicstudios/jwt-decode
Commands
Decode Token
npx @lxgicstudios/jwt-decode eyJhbGciOiJIUzI1NiIs...
# Works with Bearer prefix
npx @lxgicstudios/jwt-decode "Bearer eyJhbGci..."
From Environment Variable
echo $AUTH_TOKEN | npx @lxgicstudios/jwt-decode
From File
npx @lxgicstudios/jwt-decode -f token.txt
Check if Expired
npx @lxgicstudios/jwt-decode --check $TOKEN && echo "Valid" || echo "Expired"
Extract Specific Claim
npx @lxgicstudios/jwt-decode -c sub $TOKEN
npx @lxgicstudios/jwt-decode -c email $TOKEN
Example Output
Header
──────
alg: "HS256"
typ: "JWT"
Payload
───────
sub: "1234567890"
name: "John Doe"
email: "john@example.com"
iat: 1706547200 (2024-01-29T16:00:00.000Z)
exp: 1706633600 (2024-01-30T16:00:00.000Z)
Status
──────
Valid - expires in 23 hours
Options
| Option | Description |
|---|---|
-f, --file |
Read from file |
-c, --claim |
Extract specific claim |
--header |
Show only header |
--payload |
Show only payload |
--json |
JSON output |
--check |
Exit 1 if expired |
Common Use Cases
Debug auth token:
npx @lxgicstudios/jwt-decode $AUTH_TOKEN
Get user ID from token:
npx @lxgicstudios/jwt-decode -c sub $TOKEN
Use in scripts:
if npx @lxgicstudios/jwt-decode --check $TOKEN 2>/dev/null; then
echo "Token valid"
else
echo "Token expired, refreshing..."
fi
Features
- Colored, readable output
- Automatic Bearer prefix handling
- Human-readable expiration times
- Timestamp conversion
- Script-friendly exit codes
- JSON output mode
Built by LXGIC Studios
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.