# eyeball

> Colorize terminal output based on elapsed time since the previous write

Latest version **0.3.4** (published 2014-06-01) · ISC license · 0 weekly downloads

## Install

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

Provides the command `eyeball`.

## 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.3.4 |
| Published | 2014-06-01 |
| First published | 2014-05-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Jason Frame |
| Maintainers | jaz303 |

## Links

- npm: https://www.npmjs.com/package/eyeball
- Repository: https://github.com/jaz303/eyeball
- Issues: https://github.com/jaz303/eyeball/issues
- npm.io page: https://npm.io/package/eyeball

## Dependencies (2)

- [lazy](https://npm.io/package/lazy.md) ~1.0.11
- [docopt](https://npm.io/package/docopt.md) ~0.4.0

## Recent versions

- 0.3.4 (latest) — 2014-06-01
- 0.3.3 — 2014-06-01
- 0.3.2 — 2014-06-01
- 0.3.1 — 2014-06-01
- 0.3.0 — 2014-06-01
- 0.2.6 — 2014-05-27
- 0.2.5 — 2014-05-25
- 0.2.4 — 2014-05-24
- 0.2.3 — 2014-05-24
- 0.2.2 — 2014-05-24
- 0.2.1 — 2014-05-24
- 0.2.0 — 2014-05-24
- 0.1.1 — 2014-05-24
- 0.1.0 — 2014-05-24
- 0.0.1 — 2014-05-24

## README

# eyeball

`eyeball` is a simple utility that color-cycles terminal output based on the elapsed time since the previous line was written. This is useful, for example, when you've got a noisy process that produces a lot of similar looking output, making it hard to determine when activity occurs.

Check out this screenshot of an example session; note that the colour changes whenever `dt` &ge; 1000:

![eyeball Screenshot](https://raw.githubusercontent.com/jaz303/eyeball/master/screenshot.png)

As of version 0.3.0, `eyeball` can also cycle colors every n lines or every n seconds by using the `-l` and `-t` options, respectively. See _Customisation_, below.

## Installation

	$ npm install -g eyeball

## Usage

Default behaviour; change colour whenever time between successive writes is &ge; 1s.

	$ my-process | eyeball

Change colour whenever output is delayed by 5s or more, cycling between red, green and blue:

 	$ my-process | eyeball -d 5 -c red,green,blue

## Customisation

```
Usage: eyeball [options]

Options:
  -d DELAY, --delay=DELAY     Delay mode: cycle color when delay between
                              lines is >= DELAY. This is the default mode;
                              DELAY defaults to 1.
  -l LINES, --lines=LINES     Line mode: cycle color every LINES lines
  -t TIME, --time=TIME        Time mode: cycle color every TIME seconds
  -c COLORS, --colors=COLORS  List of colors to cycle [default: cyan,magenta]
  --no-reset                  Do no reset the timer after each line.
                              (Applies to "Delay" mode only)
  -v, --version               Display program version and quit
  -h, --help                  Display this message and quit
```

### Modes

#### Delay

(This is the default mode)

In Delay mode, output color will cycle based on the time delay between writes; that is, a colour change is triggered whenever the time difference between any two successive lines is &ge; `DELAY`. The default value for `DELAY` is 1 second, overridable via the `-d`/`--delay=` option.

    # color cycle on delay >= 1s
    $ eyeball

    # color cycle on delay >= 5.5s
    $ my-process | eyeball -d 5.5
    $ my-process | eyeball --delay=5.5

When `--no-reset` is specifed, the point of reference is adjusted such that colour change is instead triggered whenever the time since _the previous colour change_ is &ge; DELAY.

#### Lines

In Lines mode, output color will cycle every n lines, as specified by the `-l`/`--lines=` option.

    # color cycle every 3 lines
    $ my-process | eyeball -l 3
    $ my-process | eyeball --lines=3

#### Time

In Time mode, output color will cycle ever n seconds, as specified by the `-t`/`--time=` option.

    # color cycle every 10 seconds
    $ my-process | eyeball -t 10
    $ my-process | eyeball --time=10

### Supported options

  * `-c COLORS`, `--colors=COLORS`: comma-separated list of colours through which to cycle.<br>Supported values: `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `reset`.

## Copyright &amp; License

&copy; 2014 Jason Frame [ [@jaz303](http://twitter.com/jaz303) / [jason@onehackoranother.com](mailto:jason@onehackoranother.com) ]

Released under the ISC license.

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