@svrooij/sonos-docs
v1.3.0
Published
CLI tool to generate documentation for the undocumented sonos api
Downloads
81
Readme
Sonos client generator @svrooij/sonos-docs
CLI tool to generate documentation for the undocumented sonos api
🏗 Usage
$ npm install -g @svrooij/sonos-docs
$ sonos-docs COMMAND
running command...
$ sonos-docs (-v|--version|version)
@svrooij/sonos-docs/1.3.0 linux-x64 node-v20.8.1
$ sonos-docs --help [COMMAND]
USAGE
$ sonos-docs COMMAND
...
🔨 Commands
sonos-docs combine
sonos-docs generate TEMPLATE OUTPUT
sonos-docs help [COMMAND]
sonos-docs musicservices IP
sonos-docs services IP
sonos-docs combine
Generate combined.json file by combining the documentation file and the discovered services.
USAGE
$ sonos-docs combine
OPTIONS
-h, --help show CLI help
--discoveryUrl=discoveryUrl [default: https://github.com/svrooij/sonos-api-docs/raw/main/generator/sonos-docs/data/]
Base url to load the discovery files from
--docsFile=docsFile File location of documentation, instead of url.
--docsUrl=docsUrl [default:
https://raw.githubusercontent.com/svrooij/sonos-api-docs/main/docs/documentation.json]
The url of the documentation, this is just to override the documentation url
--folder=folder Load discovered services from this folder. Loaded from repository if empty
--models=models [default: S1-2,S3-2,S6-2,S9-2,S13-2,S14-2,S18-2,S21-2,S27-2,S33-2,S38-2,Sub-2] Models to
use, separated by comma. as {model}-{softwareGen}
--out=out [default: .cache/combined.json] Output filename
See code: src/commands/combine.ts
sonos-docs generate TEMPLATE OUTPUT
Generate files based on the intermediate file and a template.
USAGE
$ sonos-docs generate TEMPLATE OUTPUT
ARGUMENTS
TEMPLATE The template to use, either a folder relative to the current or a folder an included in the generator
OUTPUT The root directory where the files should be generated
OPTIONS
-h, --help show CLI help
-i, --combined=combined [default: .cache/combined.json] combined documentation file to use. generate with 'combine'
See code: src/commands/generate.ts
sonos-docs help [COMMAND]
display help for sonos-docs
USAGE
$ sonos-docs help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
sonos-docs musicservices IP
List music services available on a Sonos speaker
USAGE
$ sonos-docs musicservices IP
ARGUMENTS
IP The IP of the sonos speaker to load the music services
OPTIONS
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--docs Show a markdown table
--filter=filter filter property by partial string matching, ex: name=foo
--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
--saveJson=saveJson If set, save music services as json
--show Show the music services
--sort=sort property to sort by (prepend '-' for descending)
See code: src/commands/musicservices.ts
sonos-docs services IP
Fetch device discovery document and generate json file
USAGE
$ sonos-docs services IP
ARGUMENTS
IP The IP of the sonos to do service discovery for.
OPTIONS
-d, --dryRun
-f, --folder=folder [default: data] Folder to write discovered services.
-h, --help show CLI help
See code: src/commands/services.ts