# chromecast-cli

> Command line interface for Google Chromecast

Latest version **3.0.1** (published 2024-01-23) · 0 weekly downloads

## Install

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

Provides the command `chromecast`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2024-01-23 |
| First published | 2016-03-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 4 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 61 |
| Author | Erk Struwe |
| Maintainers | erkstruwe |
| Keywords | chromecast, cli, cast, stream, google |

## Links

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

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^3.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [commander](https://npm.io/package/commander.md) ^2.20.3
- [castv2-client](https://npm.io/package/castv2-client.md) ^1.2.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

- 3.0.1 (latest) — 2024-01-23
- 3.0.0 — 2024-01-18
- 2.0.1 — 2020-12-02
- 2.0.0 — 2020-12-02
- 1.0.4 — 2020-10-16
- 1.0.3 — 2020-10-11
- 1.0.2 — 2020-10-11
- 1.0.1 — 2020-02-04
- 1.0.0 — 2019-03-08
- 1.0.0-rc.4 — 2019-03-08
- 1.0.0-rc.1 — 2019-03-08
- 0.1.1 — 2018-02-02
- 0.1.0 — 2016-10-03
- 0.0.4 — 2016-10-03
- 0.0.3 — 2016-03-13
- … 1 more at https://npm.io/package/chromecast-cli/versions

## README

# chromecast-cli

Command line interface for Google Chromecast

## Installation

```
npm install -g chromecast-cli
```

## Usage

Type the following to get a list of all commands and options:

```
chromecast
```

```
Usage: chromecast-cli [options] [command]

Options:
  -V, --version                output the version number
  -H, --host <host>            IP address or hostname of Chromecast (required)
  -h, --help                   output usage information

Commands:
  play [options] <src...>      Play file(s) at <src>
  volume <volume>              Set the volume to <volume>
  volumeStepUp <volumeStep>    Set the volume <volumeStep> higher
  volumeStepDown <volumeStep>  Set the volume <volumeStep> lower
  mute                         Mute
  unmute                       Unmute
  stop                         Stop playback
  pause                        Pause playback
  unpause                      Unpause playback
  status                       Get Chromecast status
  sessions                     Get current playback sessions
  sessionDetails               Get current playback session details (e. g. title, application, image URLs, etc.) of first session
```

Please note that this tool does not discover Chromecast devices on your network for performance reasons. You have to specify an IP address via the `--host` option. Consider configuring your DHCP server to assign a fixed IP address to your Chromecast devices.

### Examples

The IP address 192.168.1.100 is just an example. Use the IP address of your Chromecast device instead.

Display the device status as JSON

```
chromecast --host 192.168.1.100 status
```

Play a song from a DLNA/UPnP source at IP address 192.168.1.1 (e. g. a router or a NAS)

```
chromecast --host 192.168.1.100 play http://192.168.1.1/media/song.mp3
```

Play a Youtube video (courtesy of [youtube-dl](https://www.npmjs.com/package/youtube-dl) package)

```
chromecast --host 192.168.1.100 play $(youtube-dl --format bestaudio --get-url "https://youtu.be/dQw4w9WgXcQ")
```

## Changelog

- Version 1 required a Node.js version of at least 5. Version 2 requires a Node.js version of at least 8. Version 3 requires a Node.js version of at least 18.

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