{"id":13587010,"url":"https://github.com/mike-engel/jwt-cli","last_synced_at":"2025-05-15T00:06:31.268Z","repository":{"id":38681383,"uuid":"84038847","full_name":"mike-engel/jwt-cli","owner":"mike-engel","description":"A super fast CLI tool to decode and encode JWTs built in Rust","archived":false,"fork":false,"pushed_at":"2025-05-05T13:35:45.000Z","size":607,"stargazers_count":1294,"open_issues_count":22,"forks_count":68,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-05T14:48:08.152Z","etag":null,"topics":["cli","command-line-tool","json","json-web-token","jsonwebtoken","jwt","jwt-cli","jwt-token","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/mike-engel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"code_of_conduct.md","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,"zenodo":null}},"created_at":"2017-03-06T06:38:12.000Z","updated_at":"2025-05-05T13:35:48.000Z","dependencies_parsed_at":"2023-02-17T03:01:13.118Z","dependency_job_id":"71844b72-f4b0-48db-b6da-4f8ca909d37e","html_url":"https://github.com/mike-engel/jwt-cli","commit_stats":{"total_commits":265,"total_committers":29,"mean_commits":9.137931034482758,"dds":0.5962264150943396,"last_synced_commit":"6b69a5d1ed06dd9368bb57463750d375f60502c5"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-engel%2Fjwt-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-engel%2Fjwt-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-engel%2Fjwt-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-engel%2Fjwt-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike-engel","download_url":"https://codeload.github.com/mike-engel/jwt-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252521280,"owners_count":21761680,"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":["cli","command-line-tool","json","json-web-token","jsonwebtoken","jwt","jwt-cli","jwt-token","rust"],"created_at":"2024-08-01T15:05:57.815Z","updated_at":"2025-05-15T00:06:31.205Z","avatar_url":"https://github.com/mike-engel.png","language":"Rust","readme":"# jwt-cli\n\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=mike-engel/jwt-cli)](https://dependabot.com)\n\nA super fast CLI tool to decode and encode JWTs built in [Rust](https://rust-lang.org).\n\n![Continuous Integration](https://github.com/mike-engel/jwt-cli/workflows/Continuous%20Integration/badge.svg)\n[![GitHub release](https://img.shields.io/github/tag/mike-engel/jwt-cli.svg)]()\n\n`jwt-cli` is a command line tool to help you work with JSON Web Tokens (JWTs). Like most JWT command line tools out there, you can decode almost any JWT header and claims body. Unlike any that I've found, however, `jwt-cli` allows you to encode a new JWT with nearly any piece of data you can think of. Custom header values (some), custom claim bodies (as long as it's JSON, it's game), and using any secret you need.\n\nOn top of all that, it's written in Rust so it's fast and portable (windows, macOS, and linux supported right now).\n\n# Installation\n\nInstall `jwt-cli` via [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org) (macOS), [Cargo](https://www.rust-lang.org/tools/install) (cross-platform), and [FreshPorts](https://www.freshports.org/www/jwt-cli) (FreeBSD). If you intend to use one of these methods, [skip ahead](#homebrew).\n\nYou may also install the binary from the [release](https://github.com/mike-engel/jwt-cli/releases) page, if you're unable to use Homebrew or Cargo install methods below.\n\nOnly 64bit linux, macOS, and Windows targets are pre-built. Sorry if you're not on one of those! You'll need to build it from the source. See the [contributing](#contributing) section on how to install and build the project.\n\nYou should install it somewhere in your `$PATH`. For Linux and macOS, a good place is generally `/usr/local/bin`. For Windows, there isn't a good place by default :(.\n\n## Homebrew\n\n```sh\n# Install jwt-cli\nbrew install mike-engel/jwt-cli/jwt-cli\n\n# Ensure it worked ok by running the help command\njwt help\n```\n\n## MacPorts\n\n```sh\nsudo port install jwt-cli\n```\n\nMore info [here](https://ports.macports.org/port/jwt-cli/).\n\n## Cargo\n\nIf your system [supports](https://forge.rust-lang.org/platform-support.html) it, you can install via Cargo. Make sure you have Rust and Cargo installed, following [these instructions](https://www.rust-lang.org/tools/install) before proceeding.\n\n```sh\ncargo install jwt-cli\n```\n\nThe binary installs to your Cargo bin path (`~/.cargo/bin`). Make sure your `$PATH` environment variable includes this path.\n\n## FreshPorts\n\nIf you're on FreeBSD, you can use the `pkg` tool to install `jwt-cli` on your system.\n\n```sh\npkg install jwt-cli\n```\n\nBig thanks to Sergey Osokin, the FreeBSD contributor who added `jwt-cli` to the FreeBSD ports tree!\n\n## Scoop\n\n`jwt-cli` is available on the Scoop main [repository](https://github.com/ScoopInstaller/Main/blob/master/bucket/jwt-cli.json) for Windows.\n\n```sh\nscoop install jwt-cli\n```\n\n## Arch Linux\n\n`jwt-cli` is available in the Arch Linux [community repository](https://archlinux.org/packages/community/x86_64/jwt-cli/) and can be installed via [pacman](https://wiki.archlinux.org/title/Pacman):\n\n```sh\npacman -S jwt-cli\n```\n\n# Usage\n\nFor usage info, use the `help` command.\n\n```sh\n# top level help\njwt help\n\n# command specific help\njwt help encode\n```\n\n## Usage as a pipe\n\nThe `-` argument tells `jwt-cli` to read from standard input:\n\n```sh\njwt encode --secret=fake '{\"hello\":\"world\"}' | jwt decode -\n```\n\nIt's useful when you're dealing with a chain of shell commands that produce a JWT. Pipe the result through `jwt decode -` to decode it.\n\n```sh\ncurl \u003cauth API\u003e | jq -r .access_token | jwt decode -\n```\n\n## Using elliptic curve keys\n\nCurrently the underlying token encoding and decoding library, [`jsonwebtoken`](https://github.com/Keats/jsonwebtoken), doesn't support the SEC1 private key format and requires a conversion to the PKCS8 type. You can read more from [their own README](https://github.com/Keats/jsonwebtoken/blob/8fba79b25459eacc33a80e1ee37ff8eba64079ca/README.md#convert-sec1-private-key-to-pkcs8).\n\n## Shell completion\n\n`jwt-cli` supports shell completion for `bash`, `elvish`, `fish`, `powershell`, and `zsh`. To enable it, run the following command:\n\n```sh\nsource \u003c(jwt completion bash)\n```\n\nYou may want to add this to your shell profile to have it available every time you open a new shell:\n\n```sh\nif hash jwt \u003e /dev/null; then\n  source \u003c(jwt completion bash)\nfi\n```\n\n# Contributing\n\nI welcome all issues and pull requests! This is my first project in rust, so this project almost certainly could be better written. All I ask is that you follow the [code of conduct](code_of_conduct.md) and use [rustfmt](https://github.com/rust-lang-nursery/rustfmt) to have a consistent project code style.\n\nTo get started you'll need `rustc` and `cargo` on your system. If they aren't already installed, I recommend [rustup](https://rustup.rs) to get both!\n\n## Building and running the project\n\nOnce you have both installed, I recommend running the tests to make sure all is well from the start.\n\n```sh\n# run the tests\ncargo test\n```\n\nIf it built without any errors, you should be able to run the command via `cargo`.\n\n```sh\ncargo run -- help\n```\n\nOr, if you prefer a release build:\n\n```sh\ncargo run --release -- help\n```\n\n# [Code of conduct](code_of_conduct.md)\n\n# [Changelog](CHANGELOG.md)\n\n# [License](LICENSE.md)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.mike-engel.com\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/464447?v=4\" width=\"100px;\" alt=\"Mike Engel\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMike Engel\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=mike-engel\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#question-mike-engel\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=mike-engel\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-mike-engel\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-mike-engel\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#review-mike-engel\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=mike-engel\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/issues?q=author%3Amike-engel\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://asymmetrical-view.com/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/69799?v=4\" width=\"100px;\" alt=\"Kyle Burton\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKyle Burton\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=kyleburton\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/atschaef\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/6707250?v=4\" width=\"100px;\" alt=\"Aaron Schaef\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAaron Schaef\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=atschaef\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/hughsimpson\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/2494489?v=4\" width=\"100px;\" alt=\"hughsimpson\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ehughsimpson\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=hughsimpson\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=hughsimpson\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://matkelly.com\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/2514780?v=4\" width=\"100px;\" alt=\"Mat Kelly\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMat Kelly\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=machawk1\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/issues?q=author%3Amachawk1\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://www.jasonmfry.com\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/166681?v=4\" width=\"100px;\" alt=\"Jason\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJason\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/issues?q=author%3AJasonMFry\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://crosscomm.com/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/6886697?v=4\" width=\"100px;\" alt=\"Ben Berry\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBen Berry\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/issues?q=author%3Absberry\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://medium.com/@therealklanni\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/626347?v=4\" width=\"100px;\" alt=\"Kevin Lanni\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKevin Lanni\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=therealklanni\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/kkrauth\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/680123?v=4\" width=\"100px;\" alt=\"Kosta Krauth\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKosta Krauth\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=kkrauth\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=kkrauth\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=kkrauth\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/codedust\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/7175914?v=4\" width=\"100px;\" alt=\"codedust\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ecodedust\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=codedust\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-codedust\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=codedust\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/lizfeed\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/61433510?v=4\" width=\"100px;\" alt=\"Liz Frost\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLiz Frost\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=lizfeed\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/ceharris\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3943178?v=4\" width=\"100px;\" alt=\"Carl Harris\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCarl Harris\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=ceharris\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=ceharris\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://komi.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/27967726?v=4\" width=\"100px;\" alt=\"Yusuke Kominami\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYusuke Kominami\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=komi1230\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mike-engel/jwt-cli/commits?author=komi1230\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["Rust","Other","Tool"],"sub_categories":["JWT"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-engel%2Fjwt-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike-engel%2Fjwt-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-engel%2Fjwt-cli/lists"}