common-codec-cli

0.1.2 • Public • Published

CoCo, the Common Codec

Getting started

Download and install the CoCo CLI from npm.

npm install common-codec-cli

Use

CoCo is a command line interface that requires 3 inputs as arguments - action, codec, and input.

Action can be encode or decode Codec is one of jwt, base64, hex, uri, binary, or ascii Input is the string of text that you want to convert.

coco <action> <codec> <input> <option>

Eg

coco encode base64 myclientid:myclientsecret
bXljbGllbnRpZDpteWNsaWVudHNlY3JldA==

coco decode jwt eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
{
  "sub": "1234567890",
  "name": "John Doe",
  "admin": true
}

coco decode hex 0011aa
4522

coco decode hex 0011aa rgb
0 17 170

coco-cli

Package Sidebar

Install

npm i common-codec-cli

Weekly Downloads

14

Version

0.1.2

License

MIT

Last publish

Collaborators

  • neilw