{"id":18185110,"url":"https://github.com/pete911/jwt","last_synced_at":"2025-04-01T23:31:17.832Z","repository":{"id":57628619,"uuid":"402486305","full_name":"pete911/jwt","owner":"pete911","description":"jwt cli","archived":false,"fork":false,"pushed_at":"2024-06-17T06:58:13.000Z","size":1849,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T10:19:54.646Z","etag":null,"topics":["go","golang","jwt","jwt-cli","jwt-token"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pete911.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-02T16:16:46.000Z","updated_at":"2024-06-17T06:58:14.000Z","dependencies_parsed_at":"2024-06-20T09:27:42.469Z","dependency_job_id":null,"html_url":"https://github.com/pete911/jwt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Fjwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Fjwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Fjwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Fjwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pete911","download_url":"https://codeload.github.com/pete911/jwt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222782294,"owners_count":17036931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","jwt","jwt-cli","jwt-token"],"created_at":"2024-11-02T22:22:26.649Z","updated_at":"2024-11-02T22:22:27.173Z","avatar_url":"https://github.com/pete911.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwt\n\n[![pipeline](https://github.com/pete911/jwt/actions/workflows/pipeline.yml/badge.svg)](https://github.com/pete911/jwt/actions/workflows/pipeline.yml)\n\njwt cli to decode and encode jwt tokens\n\n## download\n\n- [binary](https://github.com/pete911/jwt/releases)\n\n## build/install\n\n### brew\n\n- add tap `brew tap pete911/tap`\n- install `brew install jwt`\n\n### go\n\n- install [go](https://golang.org/doc/install)\n- build `make build`\n- install `make install`\n\n## release\n\nReleases are published when the new tag is created e.g.\n`git tag -m \"add super cool feature\" v1.0.0 \u0026\u0026 git push --follow-tags`\n\n## usage\n\n### decode\n```\nUsage:\n  jwt decode [flags] [token]\n\nFlags:\n      --alg string   algorithm for signature validation, if it is empty, no validation is done\n  -h, --help         help for decode\n      --indent       indent output\n      --key string   key to validate token\n\nGlobal Flags:\n      --silent   suppress logs (warn, debug, ...)\n```\n\nExample\n```shell\njwt decode --key hello --alg HS256 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.ElsKKULlzGtesThefMuj2_a6KIY9L5i2zDrBLHV-e0M\nvalid: true, header: {\"alg\":\"HS256\",\"typ\":\"JWT\"}, claims: {\"iat\":1516239022,\"name\":\"John Doe\",\"sub\":\"1234567890\"}\n```\n\n### encode\n```\nUsage:\n  jwt encode [flags] [claims]\n\nFlags:\n      --alg string   algorithm for signature validation, if it is empty, no validation is done\n  -h, --help         help for encode\n      --key string   key to validate token\n\nGlobal Flags:\n      --silent   suppress logs (warn, debug, ...)\n```\n\nExample\n```shell\njwt encode --key hello --alg HS256 '{\"hello\":\"ok\"}'\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJoZWxsbyI6Im9rIn0.ycJ6FlOpr9qbWVQsVqQr9Pls1F_QfoOE7fk9pUvYNm8\n```\n\n### encode/decode stdin\nInput can be read from stdin instead of passed as an argument as well.\n\n```shell\njwt encode --key hello --alg HS256 '{\"hello\":\"ok\"}' | jwt decode --key hello --alg HS256\nvalid: true, header: {\"alg\":\"HS256\",\"typ\":\"JWT\"}, claims: {\"hello\":\"ok\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpete911%2Fjwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpete911%2Fjwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpete911%2Fjwt/lists"}