# cli-output

> My take on simple output for Node.js command-line apps

Latest version **1.0.0** (published 2016-02-27) · MIT license · 0 weekly downloads

## Install

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

## 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 |
| Published | 2016-02-27 |
| First published | 2015-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | GochoMugo |
| Maintainers | gochomugo |
| Keywords | command-line, terminal, output |

## Links

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

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^1.1.0
- [prettyjson](https://npm.io/package/prettyjson.md) ^1.1.2
- [console.json](https://npm.io/package/console.json.md) ^0.2.1

## 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

- 1.0.0 (latest) — 2016-02-27
- 0.1.0 — 2015-08-05
- 0.0.0 — 2015-07-25

## README

# cli-output

> My take on simple output for Node.js command-line apps!

[![node](https://img.shields.io/node/v/cli-output.svg?style=flat-square)](https://www.npmjs.com/package/cli-output) [![npm](https://img.shields.io/npm/v/cli-output.svg?style=flat-square)](https://www.npmjs.com/package/cli-output) [![Travis](https://img.shields.io/travis/GochoMugo/cli-output.svg?style=flat-square)](https://travis-ci.org/GochoMugo/cli-output) [![Gemnasium](https://img.shields.io/gemnasium/GochoMugo/cli-output.svg?style=flat-square)](https://gemnasium.com/GochoMugo/cli-output) [![Coveralls](https://img.shields.io/coveralls/GochoMugo/cli-output.svg?style=flat-square)](https://coveralls.io/github/GochoMugo/cli-output?branch=master)


![ScreenShot](https://github.com/GochoMugo/cli-output/blob/master/screenshot.png)

## installation:

```bash
⇒ npm install cli-output
```


## API:

```js
var out = require("cli-output");
```

### out.debug()

For debugging purposes. Expects same arguments as `console.log()`.

This output is only shown if the environment variable `${DEBUG}` is set.


### out.error()

For error messages. Expects same arguments as `console.error()`.


### out.log()

For normal messages. Expects same arguments as `console.log()`.

Alias: `out.info()`


### out.success()

For success messages. Expects same arguments as `console.log()`.


### out.prettyJSON(json)

Outputs `json` in terminal-friendly manner, without the braces, double quotes, etc.

Alias: `out.pjson(json)`


### out.rawJSON(json)

Outputs `json` in its normal format but with indentations.

Alias: `out.rjson(json)`


### out.setPS1(ps1)

Sets the marker/PS1 used from `" >>> "` to `ps1`.

Also, the marker automatically defaults to the environment variable
`${CLI_OUTPUT_PS1}`, if it is a non-empty string.


## license:

**The MIT License (MIT)**

Copyright (c) 2015-2016 GochoMugo <mugo@forfuture.co.ke>

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