@svrooij/sonos-cli
Control your sonos players from the console, for the console addicts like me. You can control basic stuff, and you can execute every command from the used sonos library at https://svrooij.github.io/node-sonos-ts/sonos-device. If you like this app be sur
Last updated 11 days ago by svrooij .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @svrooij/sonos-cli 
SYNC missed versions from official npm registry.

@svrooij/sonos-cli

Control your sonos players right from the console. This cli is started as an experiment, so it may contain bugs. If you found some bugs, please report.

Install npm i -g @svrooij/sonos-cli and start using, see below.

Support me on Github npm travis github issues Downloads/week oclif License

This sonos cli, is just a cli wrapper around the node-sonos-ts library. I could use some support in both :wink:. If you like this library please tell me on twitter, or start sponsoring me.

Usage

$ npm install -g @svrooij/sonos-cli
$ sonos COMMAND
running command...
$ sonos (-v|--version|version)
@svrooij/sonos-cli/0.0.8 linux-x64 node-v12.16.3
$ sonos --help [COMMAND]
USAGE
  $ sonos COMMAND
...

Commands

sonos alarm:list

List your alarms

USAGE
  $ sonos alarm:list

OPTIONS
  -h, --help              show CLI help
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --ip=ip                 Use IP instead of discovery
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/alarm/list.ts

sonos alarm:update ID

Update a single alarm by ID

USAGE
  $ sonos alarm:update ID

ARGUMENTS
  ID  Alarm ID you want to update

OPTIONS
  -h, --help                        show CLI help
  --disable                         Disable the alarm?
  --duration=duration               Duration as hh:mm:ss
  --enable                          Enable the alarm?
  --recurrence=DAILY|WEEKDAYS|ONCE  What is the recurrence of this alarm
  --start=start                     Starttime as hh:mm:ss
  --volume=volume                   New Volume

See code: src/commands/alarm/update.ts

sonos control DEVICE CONTROL

describe the command here

USAGE
  $ sonos control DEVICE CONTROL

ARGUMENTS
  DEVICE   Name or uuid of player
  CONTROL  (play|pause|next|previous|toggle|stop|volumeup|volumedown) What do you want to control

OPTIONS
  -h, --help  show CLI help

See code: src/commands/control.ts

sonos execute DEVICE COMMAND [INPUT]

Execute all available commands on the sonos library. See https://svrooij.github.io/node-sonos-ts/sonos-device for available commands

USAGE
  $ sonos execute DEVICE COMMAND [INPUT]

ARGUMENTS
  DEVICE   Name or uuid of player
  COMMAND  command to call, eg. AVTransportService.Next
  INPUT    Optional input for command

OPTIONS
  -h, --help  show CLI help

EXAMPLES
  sonos execute {device} AVTransportService.Next
  sonos execute {device} SwitchToLineIn
  sonos execute {device} SwitchToQueue
  sonos execute {device} SwitchToTV
  sonos execute Bedroom AVTransportService.ConfigureSleepTimer '{"InstanceID": 0, "NewSleepTimerDuration": "00:04:00"}'

See code: src/commands/execute.ts

sonos help [COMMAND]

display help for sonos

USAGE
  $ sonos help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

sonos info DEVICE KIND

Show device data

USAGE
  $ sonos info DEVICE KIND

ARGUMENTS
  DEVICE  Name or uuid of player
  KIND    (attributes|media|position|queue|volume) What do you want to load

OPTIONS
  -h, --help  show CLI help

See code: src/commands/info.ts

sonos play DEVICE URL

Add the supplied url to the queue

USAGE
  $ sonos play DEVICE URL

ARGUMENTS
  DEVICE  Name or uuid of player
  URL     The url to play

OPTIONS
  -h, --help    show CLI help
  --skip-queue

See code: src/commands/play.ts

sonos zones [FILE]

Do device discovery

USAGE
  $ sonos zones [FILE]

OPTIONS
  -h, --help              show CLI help
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --ip=ip                 Use IP instead of discovery
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --save
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/zones.ts

Development

This library is written in TypeScript, that means you'll need to compile it before using. This is done automatically when packaging, but you can also run npm run prepack. Starting this library from the repository is done by ./bin/run [command] ....

Tests aren't implemented everywhere, if you feel like it send me a pull request.

Oclif

oclif

Oclif is a cli framework created by the guys (and girls) from heroku. When starting this library it was the want that seems to have the most featured I wanted for a cli framework. This wasn't a thourogh research, I just picked the one I liked.

Current Tags

  • 0.0.8                                ...           latest (11 days ago)

8 Versions

  • 0.0.8                                ...           11 days ago
  • 0.0.7                                ...           12 days ago
  • 0.0.6                                ...           2 months ago
  • 0.0.5                                ...           4 months ago
  • 0.0.4                                ...           5 months ago
  • 0.0.3                                ...           5 months ago
  • 0.0.2                                ...           5 months ago
  • 0.0.1                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 17
Dependencies (7)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |