{"id":20368887,"url":"https://github.com/leomillon/jwtctl","last_synced_at":"2026-04-07T21:31:21.648Z","repository":{"id":70182787,"uuid":"121508750","full_name":"leomillon/jwtctl","owner":"leomillon","description":"JWT Generator/Reader CLI","archived":false,"fork":false,"pushed_at":"2018-03-25T16:11:17.000Z","size":115,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T19:46:57.106Z","etag":null,"topics":["cli","ctl","homebrew","jwt","kotlin","linux","macos","shell","unix","windows"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/leomillon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-02-14T12:33:18.000Z","updated_at":"2024-03-12T18:17:09.000Z","dependencies_parsed_at":"2023-02-21T19:30:28.851Z","dependency_job_id":null,"html_url":"https://github.com/leomillon/jwtctl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/leomillon/jwtctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomillon%2Fjwtctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomillon%2Fjwtctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomillon%2Fjwtctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomillon%2Fjwtctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leomillon","download_url":"https://codeload.github.com/leomillon/jwtctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomillon%2Fjwtctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31530641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","ctl","homebrew","jwt","kotlin","linux","macos","shell","unix","windows"],"created_at":"2024-11-15T00:43:34.120Z","updated_at":"2026-04-07T21:31:21.622Z","avatar_url":"https://github.com/leomillon.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwtctl\n\n[![Build Status](https://travis-ci.org/leomillon/jwtctl.svg?branch=master)](https://travis-ci.org/leomillon/jwtctl)\n[![GitHub (pre-)release](https://img.shields.io/github/release/leomillon/jwtctl/all.svg)](https://github.com/leomillon/jwtctl/releases)\n[![GitHub license](https://img.shields.io/github/license/leomillon/jwtctl.svg)](https://github.com/leomillon/jwtctl/blob/master/LICENSE.md)\n\nA command line tool to read or create [JWT](https://jwt.io/) tokens written in [Kotlin](https://kotlinlang.org/).\n\n## Overview\n\nYou can easily create a JWT token :\n\n```\n$ jwtctl create --claim username john.doe --duration PT2H\n\neyJhbGciOiJub25lIn0.eyJpYXQiOjE1MTk0ODc3NzYsImV4cCI6MTUxOTQ5NDk3NiwidXNlcm5hbWUiOiJqb2huLmRvZSJ9.\n```\n\nYou can read it :\n```\n$ jwtctl read eyJhbGciOiJub25lIn0.eyJpYXQiOjE1MTk0ODc3NzYsImV4cCI6MTUxOTQ5NDk3NiwidXNlcm5hbWUiOiJqb2huLmRvZSJ9.\n\n{iat=1519487776, exp=1519494976, username=john.doe}\n```\n\n## Installation\n\n### Via Homebrew\n\nYou can tap the dedicated repository [homebrew-jwtctl](https://github.com/leomillon/homebrew-jwtctl) to install jwtctl.\n\nJust use the following commands :\n```\nbrew tap leomillon/jwtctl\nbrew install jwtctl\n```\n\n\u003e :information_source: Bash / ZSH auto completion will be installed but may not be activated/loaded.\nPlease follow the instructions written during the homebrew installation or jump the the manual installation section.\n\n### Manual installation\n\nFirst step, you have to download the latest release (`jwtctl-VERSION.zip` or `jwtctl-VERSION.tar` files) on this [page](https://github.com/leomillon/jwtctl/releases/latest).\n\n#### Linux / Mac OS X\n\nOnce the archive has been uncompressed, you will find the `jwtctl` script in the `bin` directory.\n\nGo into the `bin` directory and try the following command to get the global help :\n```\n./jwtctl --help\n```\n\n#### Auto completion Bash / ZSH\n\nYou can source the script `jwtctl-completion.bash` in the `completion` directory :\n```\nsource completion/jwtctl-completion.bash\n```\n\nIf you want enable it permanently, you will have to load it with your profile. Add the following line to your `~/.bash_profile` or `~/.zshrc` and replace `PATH_TO_JWTCTL` with the location of the jwtctl uncompressed folder.\n```\n[ -f PATH_TO_JWTCTL/jwtctl-completion.bash ] \u0026\u0026 source PATH_TO_JWTCTL/bash_completion.d/jwtctl-completion.bash\n```\n\n:information_source: ZSH users : you may need to add these two lines before the previous one to enable the bash completion :\n```\nautoload -U compinit \u0026\u0026 compinit\nautoload -U bashcompinit \u0026\u0026 bashcompinit\n```\n\n#### Windows\n\nOnce the archive has been uncompressed, you will find the `jwtctl.bat` script in the `bin` directory.\n\nGo into the `bin` directory and try the following command to get the global help :\n```\njwtctl.bat --help\n```\n\n## Usage\n\n### Get help\n\nTo get the global help :\n```\n$ jwtctl --help\nusage: jwtctl [-h] [-v] [--debug] [--version] COMMAND [ARGS]...\n\ntool used to read or create JWT tokens. See more info at https://jwt.io/\n\noptional arguments:\n  -h, --help  show this help message and exit\n\n  -v,         enable verbose mode\n  --verbose\n\n  --debug     enable debug mode\n\n  --version   show program version and exit\n\n\npositional arguments:\n  COMMAND     the command to excecute : [create, read]\n\n  ARGS        the command args\n\n\n'jwtctl COMMAND --help' to read about a specific command\n```\n\n### Commands\n\nTo get a specific command help, use the following pattern : `jwtctl COMMAND --help`\n\nThere are two commands :\n\n- create : `jwtctl create --help`\n- read : `jwtctl read --help`\n\nYou can always add the `--verbose` argument to display headers/body.\n\n#### Create use-cases\n\n##### JWT with expiration date\n\nCreates a token containing a claim named `username` with `john.doe` as value. It will be expired in 2 hours from now.\n```\njwtctl create --claim username john.doe --duration PT2H --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=none}\nINFO  | Body    : {iat=1519491614, exp=1519498814, username=john.doe}\nINFO  | Generated token until : 2018-02-24T19:00:14Z\neyJhbGciOiJub25lIn0.eyJpYXQiOjE1MTk0OTE2MTQsImV4cCI6MTUxOTQ5ODgxNCwidXNlcm5hbWUiOiJqb2huLmRvZSJ9.\n```\n\n##### JWT from JSON file\n\nCreates a token from a JSON file and add the claim named `username` with `john.doe` as value.\n```\njwtctl create --claims-file ./claims.json --claim username john.doe --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=none}\nINFO  | Body    : {iat=1519493118, fileClaimsName=fileClaimsValue, username=john.doe}\nINFO  | Generated token until : no expiration date\neyJhbGciOiJub25lIn0.eyJpYXQiOjE1MTk0OTMxMTgsImZpbGVDbGFpbXNOYW1lIjoiZmlsZUNsYWltc1ZhbHVlIiwidXNlcm5hbWUiOiJqb2huLmRvZSJ9.\n```\n\n##### JWS with HMAC (signed JWT)\n\nCreates a token containing a claim named `username` with `john.doe` as value. It will be signed with an HMAC algorithm and a base 64 encoded secret.\n```\njwtctl create --claim username john.doe --hmac-sign HS512 mysecret --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=HS512}\nINFO  | Body    : {iat=1519491764, username=john.doe}\nINFO  | Generated token until : no expiration date\neyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MTk0OTE3NjQsInVzZXJuYW1lIjoiam9obi5kb2UifQ.vM9WT8v3Ou0Tb_mVWkYBnf8yH5f8PAajttLpm5ucdANmY-ao_WS3KWDQzng9N8ykORgkYDtIOYauli5mTKxKLw\n```\n\n##### JWS with RSA (signed JWT)\n\nCreates a token containing a claim named `username` with `john.doe` as value. It will be signed with an RSA algorithm and a private key (`PEM` file).\n```\njwtctl create --claim username john.doe --rsa-sign RS512 ./private_key_1.pem --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nEnter password (./private_key_1.pem) :\nINFO  | Header  : {alg=RS512}\nINFO  | Body    : {iat=1519492016, username=john.doe}\nINFO  | Generated token until : no expiration date\neyJhbGciOiJSUzUxMiJ9.eyJpYXQiOjE1MTk0OTIwMTYsInVzZXJuYW1lIjoiam9obi5kb2UifQ.m-Ujo-2xK2xr8wC2R865kxlgU4UwL5tzha8yg8Eg-AdGGMti_ImsEe3MB19q7snPEYQkmcz6tRqdgN8oc-dIWyaGeTp7pnEIS2q4BoG_1ucFqqr5Ps7cwyZP-uFbYg_4tn6rtLmQrPLbf3oWoZTvOFu8BBAwkI6rH-9GI_vOQ9879UdA7FCV7l9B0J1KaQEXxkao0jFRywm_GFGWlIRVAa-yMWqQfUeP8V5H68TYw8L0pAhKK94SKV5wZ-UWPuVsCjaYamX1KCl5ECtfrlZfsuco87LrtXj9x-RBadAHbADgQFTChTEj-uN4q5a00IwZkiTHCdT9issnZWTxJIKjeg\n```\n\nIf your private key is encrypted, you will be asked interactively to provide the password. If you want to give it as a command argument, just use `--password PRIVATE_KEY_PASSWORD`.\n\n#### Read use-cases\n\nYou can always add the `--json` argument to display the body result as valid json.\n\n##### JWT\n\nRead a simple JWT (no signature, no expiration date).\n```\njwtctl read eyJhbGciOiJub25lIn0.eyJpYXQiOjE1MTk0OTIzNDEsInVzZXJuYW1lIjoiam9obi5kb2UifQ. --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=none}\nINFO  | Body    : {iat=1519492341, username=john.doe}\nINFO  | Expired : false\n{iat=1519492341, username=john.doe}\n```\n\n##### JWS with secret\n\nRead a JWS providing the secret.\n```\njwtctl read eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MTk0OTE3NjQsInVzZXJuYW1lIjoiam9obi5kb2UifQ.vM9WT8v3Ou0Tb_mVWkYBnf8yH5f8PAajttLpm5ucdANmY-ao_WS3KWDQzng9N8ykORgkYDtIOYauli5mTKxKLw --secret mysecret --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=HS512}\nINFO  | Body    : {iat=1519491764, username=john.doe}\nINFO  | Expired : false\n{iat=1519491764, username=john.doe}\n```\n\n##### JWS with public key\n\nRead a JWS providing the public key `PEM` file.\n```\njwtctl read eyJhbGciOiJSUzUxMiJ9.eyJpYXQiOjE1MTk0OTIwMTYsInVzZXJuYW1lIjoiam9obi5kb2UifQ.m-Ujo-2xK2xr8wC2R865kxlgU4UwL5tzha8yg8Eg-AdGGMti_ImsEe3MB19q7snPEYQkmcz6tRqdgN8oc-dIWyaGeTp7pnEIS2q4BoG_1ucFqqr5Ps7cwyZP-uFbYg_4tn6rtLmQrPLbf3oWoZTvOFu8BBAwkI6rH-9GI_vOQ9879UdA7FCV7l9B0J1KaQEXxkao0jFRywm_GFGWlIRVAa-yMWqQfUeP8V5H68TYw8L0pAhKK94SKV5wZ-UWPuVsCjaYamX1KCl5ECtfrlZfsuco87LrtXj9x-RBadAHbADgQFTChTEj-uN4q5a00IwZkiTHCdT9issnZWTxJIKjeg --public-key-file ./public_key_1.pem --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=RS512}\nINFO  | Body    : {iat=1519492016, username=john.doe}\nINFO  | Expired : false\n{iat=1519492016, username=john.doe}\n```\n\n##### JWS ignoring signature and expiration \n\nRead a JWS ignoring signature and expiration.\n```\njwtctl read eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MTk0OTI4MzIsImV4cCI6MTUxOTQ5MjgzMywidXNlcm5hbWUiOiJqb2huLmRvZSJ9.K36uHGG7okpKVXOgI6V_m6nzvjFrUD47OUAtuNq_EcjNgNybTvhbtnaM6Sr2uf34b6cuLCN7fADF_CllZTp5XA --ignore-signature --ignore-expiration --verbose\n```\nResult :\n```\nINFO  | Verbose mode enabled\nINFO  | Header  : {alg=HS512}\nINFO  | Body    : {iat=1519492832, exp=1519492833, username=john.doe}\nINFO  | Expired : true\nWARN  | !!! Token signature has been ignored !!!\n{iat=1519492832, exp=1519492833, username=john.doe}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleomillon%2Fjwtctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleomillon%2Fjwtctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleomillon%2Fjwtctl/lists"}