Giter VIP home page Giter VIP logo

jwt-cli's Introduction

jwt-cli

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

Build Status Build status 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 extremely portable (windows, macOS, and linux supported right now).

Installation

As of right now, the only package manager supported is homebrew. For all other systems (or if you don't like homebrew), you'll need to install the binary. You can do that from the release page. Eventually I might publish to other OS package managers if I can figure them out.

For those with homebrew, you'll need to tap the homebrew-jwt-cli repo in order 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

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.

As to where you should install it, it should optimally go somewhere in your PATH. For Linux and macOS, a good place is generally /usr/local/bin. For Windows, there really isn't a good place by default :(.

Usage

For usage info, use the help command.

# top level help
jwt help

# command specific help
jwt help encode

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 successfully, you should be able to run the command via cargo.

cargo run -- help

jwt-cli's People

Contributors

mike-engel avatar shousper avatar kyleburton avatar

Watchers

Rico Moorman avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.