Skip to content

superbytess/superbytes-cli

Repository files navigation

Superbytes-cli

This is CLI version of superbytes library


npm npm NPM GitHub Workflow Status (with event) GitHub contributors

Description

Superbytes-cli is a command line version of superbytes package. Just convert bytes in command line to a human readable values!

Installation

Latest version:

npm i -g superbytes-cli@latest

Usage

$ superbytes <bytes-number>
$ sb <bytes-number>

Positionals:
  bytes  input bytes number                                [number] [default: 0]

Options:
      --help       Show help                                           [boolean]
      --version    Show version number                                 [boolean]
  -p, --precision  Set number precision (max 10)           [number] [default: 2]
  -m, --metric     Set metric standard (iec | si)      [string] [default: "iec"]

Example

$ sb 
// returns 0 B
$ sb 812341
// returns 793.30 KiB
$ sb 91231812341 -m si -p 0
// returns 91 GB

See

Main superbytes package which is used here:

https://github.com/superbytess/superbytes https://www.npmjs.com/package/superbytes

License

MIT © Damian Polak