All Projects → mike-engel → Jwt Cli

mike-engel / Jwt Cli

Licence: mit
A super fast CLI tool to decode and encode JWTs built in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Jwt Cli

Jose Jwt
Ultimate Javascript Object Signing and Encryption (JOSE) and JSON Web Token (JWT) Implementation for .NET and .NET Core
Stars: ✭ 692 (+105.95%)
Mutual labels:  json, jwt, jwt-token
Jwt
Kotlin JWT 🔑 implementation (Json Web Token) as required by APNs 🔔 (Apple Push Notifications) or Sign in with Apple 🍏
Stars: ✭ 31 (-90.77%)
Mutual labels:  jwt, jwt-token, json-web-token
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+25.3%)
Mutual labels:  command-line-tool, cli, json
Reallysimplejwt
A really simple library to generate JSON Web Tokens in PHP.
Stars: ✭ 218 (-35.12%)
Mutual labels:  jwt, jwt-token, json-web-token
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (-55.36%)
Mutual labels:  json, jwt, jwt-token
F License
Open Source License Key Generation and Verification Tool written in Go
Stars: ✭ 535 (+59.23%)
Mutual labels:  cli, jwt, jwt-token
Jsonwatch
Track changes in JSON data from the command line
Stars: ✭ 130 (-61.31%)
Mutual labels:  command-line-tool, cli, json
Colorpedia
Command-line tool for looking up colors and palettes.
Stars: ✭ 255 (-24.11%)
Mutual labels:  command-line-tool, cli
Json Jwt
JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
Stars: ✭ 262 (-22.02%)
Mutual labels:  jwt, json-web-token
Sqawk
Like Awk but with SQL and table joins
Stars: ✭ 263 (-21.73%)
Mutual labels:  cli, json
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (-19.94%)
Mutual labels:  command-line-tool, cli
Ff
Find files (ff) by name, fast!
Stars: ✭ 257 (-23.51%)
Mutual labels:  command-line-tool, cli
Gcal Cli
Google Calendar command line tool for Node.js
Stars: ✭ 255 (-24.11%)
Mutual labels:  command-line-tool, cli
Dockly
Immersive terminal interface for managing docker containers and services
Stars: ✭ 3,034 (+802.98%)
Mutual labels:  command-line-tool, cli
JwtAuthDemo
ASP.NET Core + Angular JWT auth demo; integration tests; login, logout, refresh token, impersonation, authentication, authorization; run on Docker Compose.
Stars: ✭ 278 (-17.26%)
Mutual labels:  jwt-token, json-web-token
Jwt Cpp
A header only library for creating and validating json web tokens in c++
Stars: ✭ 269 (-19.94%)
Mutual labels:  jwt, json-web-token
jwt
A fast and simple JWT implementation for Go
Stars: ✭ 144 (-57.14%)
Mutual labels:  jsonwebtoken, json-web-token
Github cli
GitHub on your command line. Use your terminal, not the browser.
Stars: ✭ 263 (-21.73%)
Mutual labels:  command-line-tool, cli
Tmuxp
💻 tmux session manager. built on libtmux
Stars: ✭ 3,269 (+872.92%)
Mutual labels:  cli, json
Define
A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.
Stars: ✭ 298 (-11.31%)
Mutual labels:  command-line-tool, cli

jwt-cli

Dependabot Status

A super fast CLI tool to decode and encode JWTs built in Rust.

Continuous Integration GitHub release

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.

On top of all that, it's written in Rust so it's fast and portable (windows, macOS, and linux supported right now).

Installation

Install jwt-cli via Homebrew (macOS), Cargo (cross-platform), and FreshPorts (FreeBSD). If you intend to use one of these methods, skip ahead.

You may also install the binary from the release page, if you're unable to use Homebrew or Cargo install methods below.

Only 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 section on how to install and build the project.

You 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 :(.

Homebrew

For those with Homebrew, you'll need to brew tap mike-engel/jwt-cli repo to install it.

# Tap and install jwt-cli
brew tap mike-engel/jwt-cli
brew install jwt-cli

# Ensure it worked ok by running the help command
jwt help

Cargo

If your system supports it, you can install via Cargo. Make sure you have Rust and Cargo installed, following these instructions before proceeding.

cargo install jwt-cli

The binary installs to your Cargo bin path (~/.cargo/bin). Make sure your $PATH environment variable includes this path.

FreshPorts

If you're on FreeBSD, you can use the pkg tool to install jwt-cli on your system.

pkg install jwt-cli

Big thanks to Sergey Osokin, the FreeBSD contributor who added jwt-cli to the FreeBSD ports tree!

GoFish

jwt-cli is also available on Windows, macOS, and Linux using GoFish. See gofi.sh for instructions for getting GoFish.

After installing GoFish, run jwt-cli with:

gofish install jwt-cli

Usage

For usage info, use the help command.

# top level help
jwt help

# command specific help
jwt help encode

Usage as a pipe

The - argument tells jwt-cli to read from standard input:

jwt encode --secret=fake '{"hello":"world"}' | jwt decode -

It'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.

curl <auth API> | jq -r .access_token | jwt decode -

Contributing

I 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 and use rustfmt to have a consistent project code style.

To get started you'll need rustc and cargo on your system. If they aren't already installed, I recommend rustup to get both!

Running and building the project

Once you have both installed you'll want to install the dependencies.

# install dependencies via cargo
cargo update

After that, I recommend running the tests and doing a debug build to make sure all is well from the start.

# run the tests
cargo test

# run a debug build
cargo build

# or, if you want, a release build
cargo build --release

If it built without any errors, you should be able to run the command via cargo.

cargo run -- help

Code of conduct

Changelog

License

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Mike Engel
Mike Engel

💻 💬 📖 🤔 🚧 👀 ⚠️ 🐛
Kyle Burton
Kyle Burton

💻
Aaron Schaef
Aaron Schaef

💻
hughsimpson
hughsimpson

💻 ⚠️
Mat Kelly
Mat Kelly

💻 🐛
Jason
Jason

🐛
Ben Berry
Ben Berry

🐛
Kevin Lanni
Kevin Lanni

📖
Kosta Krauth
Kosta Krauth

💻 ⚠️ 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].