# jwtcli

> cli wrapper around jsonwebtoken

Latest version **1.0.0-beta.1** (published 2017-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install jwtcli
pnpm add jwtcli
yarn add jwtcli
bun add jwtcli
```

Provides the command `jwt`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.1 |
| Published | 2017-07-09 |
| First published | 2017-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | chris ludden |
| Maintainers | cludden |
| Keywords | jsonwebtoken, auth0, cli, jwt |

## Links

- npm: https://www.npmjs.com/package/jwtcli
- Repository: https://github.com/cludden/node-starter-kit
- Homepage: https://github.com/cludden/node-starter-kit#readme
- Issues: https://github.com/cludden/node-starter-kit/issues
- npm.io page: https://npm.io/package/jwtcli

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^8.0.2
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^7.4.1

## Recent versions

- 1.0.0-beta.1 (latest) — 2017-07-09

## README

# jwtcli
a `node.js` based CLI wrapper around [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken)



## Installing
via npm:
```shell
$ npm install -g jwtcli
$ jwt --version
```



## Getting Started
### sign
###### Help
```shell
$ jwt sign --help
jwt sign [claims]

Options:
  --version         Show version number                                [boolean]
  -h                Show help                                          [boolean]
  -a, --algorithm   signing algorithm
        [string] [choices: "RS256", "RS384", "RS512", "ES256", "ES384", "ES512",
                           "HS256", "HS384", "HS512", "none"] [default: "HS256"]
  --audience        value of "aud" claim                                [string]
  -e, --expires-in  timestring used to calculate token ttl              [string]
  --header          custom header JSON                                  [string]
  -i, --issuer      value of "iss" claim                                [string]
  --jwtid           value of "jwtid" claim                              [string]
  --keyid           value of "keyid" claim                              [string]
  -n, --not-before  timestring used to calculate "nbf" claim            [string]
  --timestamp       include "iat" header, can be disabled with --no-timestamp
                                                       [boolean] [default: true]
  -s, --secret      JWT signing secret                       [string] [required]
  --subject         value of "sub" claim                                [string]
```
###### Example
```shell
$ jwt sign -s SECRET -e 30m -i abc '{"foo":"bar"}'
```



## Todo
- [x] sign
- [ ] decode
- [ ] verify



## Testing
run the test suite

```bash
npm test
```

run coverage

```bash
npm run coverage
```



## Contributing
1. [Fork it](https://github.com/cludden/jwtcli/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request



## License
Copyright (c) 2017 Chris Ludden.  
Licensed under the [MIT license](LICENSE.md).

---
_Source: https://npm.io/package/jwtcli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
