# anybar

> Control the AnyBar app

Latest version **5.1.0** (published 2022-09-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2022-09-03 |
| First published | 2015-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 102 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | anybar, app, macos, mac, udp, status, color, dot, indicator |

## Links

- npm: https://www.npmjs.com/package/anybar
- Repository: https://github.com/sindresorhus/anybar
- Homepage: https://github.com/sindresorhus/anybar#readme
- Issues: https://github.com/sindresorhus/anybar/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/anybar

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 5.1.0 (latest) — 2022-09-03
- 5.0.0 — 2021-05-03
- 4.0.0 — 2019-04-06
- 3.0.0 — 2017-03-26
- 2.0.1 — 2016-03-23
- 2.0.0 — 2016-03-23
- 1.0.0 — 2015-04-09

## README

# anybar

> Control the [AnyBar app](https://github.com/tonsky/AnyBar)

[![](https://cloud.githubusercontent.com/assets/170270/24325650/cdde4f9e-11cf-11e7-8e1d-5dee07e3c77d.png)](https://github.com/tonsky/AnyBar)

## Install

```
$ npm install anybar
```

## Usage

```js
import anybar from 'anybar';

anybar('purple');
// The Anybar app menu bar icon turned purple
```

## API

### anybar(status, options?)

Returns a promise, but the AnyBar app doesn't send back a reply, so really the only point of waiting for the promise to resolve is in case of an obscure DNS error.

#### status

Type: `string`

The [name](https://github.com/tonsky/AnyBar#usage) of the color dot you want the AnyBar app to display.

#### options

Type: `Object`

##### port

Type: `number`\
Default: `1738`

The port to communicate with the AnyBar app.

## Related

- [anybar-cli](https://github.com/sindresorhus/anybar-cli) - CLI for this module

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