# cli-style

> A simple tool allows you to set styles to command line output more easier.

Latest version **0.1.1** (published 2020-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install cli-style
pnpm add cli-style
yarn add cli-style
bun add cli-style
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2020-10-24 |
| First published | 2018-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | LvChengbin |
| Maintainers | lvchengbin |
| Keywords | chalk, ansi, style, cli, command, console, color, output |

## Links

- npm: https://www.npmjs.com/package/cli-style
- Repository: https://github.com/LvChengbin/cli-style
- Homepage: https://github.com/LvChengbin/cli-style#readme
- Issues: https://github.com/LvChengbin/cli-style/issues
- npm.io page: https://npm.io/package/cli-style

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2020-10-24
- 0.1.0 — 2020-10-24
- 0.0.6 — 2020-09-10
- 0.0.5 — 2020-08-07
- 0.0.4 — 2020-08-07
- 0.0.3 — 2018-09-06
- 0.0.2 — 2018-09-06
- 0.0.1 — 2018-09-06
- 0.0.0 — 2018-09-06

## README

# cli-style

A simple tool allows you to set styles to command line output more easier.

# Installation

```bash
$ npm i cli-style --save
```

# Usage

This gadget is based on [chalk](https://github.com/chalk/chalk), and `color`, `bgcolor|bg`, `underline`, `bold`, `italic`, `strikethrough`, `dim` can be used as options in `cli-style`, but only `HEX` and `Keyword` color modes can be used.

```js
const style = require( 'cli-style' );

const styles = [ {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true
}, {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : '#FF0000',
    bg : '#FFFFFF',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'rgb( 123, 24, 64 )',
    bg : 'hsl( 32, 100, 50 )',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'hsv(32, 100, 100)',
    bg : 'hwb(32, 0, 50)',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
} ];

for( const item of styles ) {
    console.log( style( JSON.stringify( item ), item ) );
}
```

<img src="https://raw.githubusercontent.com/LvChengbin/cli-style/master/screenshot.png" />

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