
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
sonos-simple-cli
Advanced tools
Control Sonos from CLI with pause|play mute toggle and more, with Alfred support for keyboard shortcuts
There are many better projects out there.
But this is one I am working on to play with Node CLI and to use personally for the control of my own Sonos speakers.
roomName
config file ~/.sonos.json
~/.sonos.json
to setup which roomName
you want to use~/bin/
symlinkroomName
A big thanks to the Sonos API implementation Lib I'm using:
https://github.com/bencevans/node-sonos
$ npm install sonos-simple-cli -g
If you want to use Alfred Workflow - it has path problems which I'm currently solving with an explicit symlink (something more elegant coming)
cd ~
mkdir bin
cd bin
ln -s $(which sonos-simple-cli) sonos-simple-cli
if for some reason, you want to develop on this and play with it, here's a guide which shuld get you setup and functional pretty easily.
cd ~
mkdir bin
git clone https://github.com/zeroasterisk/sonos-simple-cli.git sonos-simple-cli-repo
ln -s sonos-simple-cli-repo/sonos.js sonos-simple-cli
cd sonos-simple-cli-repo
npm install
$ node ~/bin/sonos.js help
-----------------------------
----- Sonos Simple CLI ------
-----------------------------
sonos-simple-cli playpause
sonos-simple-cli play
sonos-simple-cli pause
sonos-simple-cli next
sonos-simple-cli prev
sonos-simple-cli volup
sonos-simple-cli voldown
sonos-simple-cli mute
sonos-simple-cli unmute
sonos-simple-cli mutetoggle
sonos-simple-cli clearCache
-----------------------------
$ ~/bin/sonos-simple-cli playpause
> SONOS set to PAUSED
Beastie Boys "I Don't Know"
@ 58/180 sec
Install Alfred if not already installed.
To get the workflow, just double-click on sonos-simple-cli.alfredworkflow
and
install it.
You will recognise Alfred workflows by their .alfredworkflow file extension and their icon.
To install a workflow, simply double-click the workflow file on your Mac. Alfred will show you a preview of the name and description of the workflow as well as the details for the developer, if available. Click the "Import" button to add the workflow to the sidebar on the left.
http://support.alfredapp.com/workflows:installing/
here's how I created the Alfred Worflow
Alfred > Workflows
Click +
(bottom left) to add a new Workflow
Click +
(top right) to add an trigger > hotkey
Then choose your hotkey and save.
Click +
(top right) to add an action -> run script
select /bin/bash
at the top, then enter the following
source ~/.profile
/usr/local/bin/node ~/bin/sonos.js pauseplay
then click save.
Finally, drag a line between them.
Bonus Points, output when done
Add an output > notification
and setup as follows
then connect and you're all set
FAQs
Control Sonos from CLI with pause|play mute toggle and more, with Alfred support for keyboard shortcuts
We found that sonos-simple-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.