:notes: Control iTunes via CLI

Overview

npm version Coverage Status devDependency Status Dependency Status Unicorn approved Mentioned in Awesome Node.js

itunes-remote

Control iTunes via your terminal 🎶

Using JXA via osascript via Node.js.

Requirements

  • Node.js (v0.12.7 or greater)
  • Mac OS X (Yosemite 10.10.0 or greater)
  • Some tracks in your iTunes library

Demo

demo

Install

$ npm install --global itunes-remote

Usage

It’s interactive and offering an own prompt.

$ itunes
iTunes: help

  Commands:

    help [command...]              Provides help for a given command.
    exit                           Exit itunes-remote.
    play                           Start playing the current selection
    play artist                    Plays songs by an artist.
    play album                     Plays an album.
    stop                           Stop playing the current selection
    pause                          Pause playing the current selection
    next                           Advance to the next track in the current playlist.
    previous                       Return to the previous track in the current playlist.
    back                           Reposition to beginning of current track or go to previous track if already at
                                   start of current track.
    search [options] <searchterm>  Fuzzy search album, artists and songs.

iTunes: 

Note:
You can also pass commands and options from the outside.

$ itunes stop --exit
iTunes:
✔ Stopped playing ♪♬
$

Thanks

Special shoutout to @dthree for his nice way to offer support for vorpal 😊

This tiny little module wouldn‘t be possible without the work of all these amazing humans. Thanks.

License

MIT © Michael Kühnel

Comments
  • Error When Attempting to Run Search

    Error When Attempting to Run Search

    When attempting to run a search with the itunes-remote system I get the following error.

    iTunes: search symphony
    Hold on ………
    undefined:1
    undefined
    ^
    
    SyntaxError: Unexpected token u
        at Object.parse (native)
        at /usr/local/lib/node_modules/itunes-remote/index.js:125:15
        at Child_Process.<anonymous> (/usr/local/lib/node_modules/itunes-remote/node_modules/osascript/index.js:68:12)
        at emitOne (events.js:90:13)
        at Child_Process.emit (events.js:182:7)
        at ChildProcess.onExit (/usr/local/lib/node_modules/itunes-remote/node_modules/duplex-child-process/index.js:120:12)
        at ChildProcess.g (events.js:273:16)
        at emitTwo (events.js:100:13)
        at ChildProcess.emit (events.js:185:7)
        at maybeClose (internal/child_process.js:821:16)
    
    feedback needed can’t replicate 
    opened by thomas-williams 8
  • Feature: Add flag to run one command and exit right away

    Feature: Add flag to run one command and exit right away

    It would be nice to have a flag when running itunes-remote to tell it to just perform the specified command and exit, say if you just want to quickly pause or stop playback.

    enhancement 
    opened by ratberryjam 8
  • module is crashing.

    module is crashing.

    itunes-remote
    
    /Users/odedpriva/.nvm/versions/node/v8.1.2/lib/node_modules/itunes-remote/node_modules/require-dir/index.js:97
               if (!require.extensions.hasOwnProperty(ext)) {
    
    TypeError: require.extensions.hasOwnProperty is not a function
    
    

    Node version - 8.1.2 Mac Sierra - 10.12.5

    when switched to node 4.3.2 it worked.

    bug 
    opened by odedpriva 3
  • Add multiword search

    Add multiword search

    I've added the ability to be able to now do a search for a multi word term, such as "twenty one pilots"... would be search twenty one pilots

    opened by dechamp 0
  • Set volume and choose AirPlay output via cli

    Set volume and choose AirPlay output via cli

    A few simple changes to add support for setting volume and switching outputs via CLI. I've included a few test cases as well

    Let me know if you think this is appropriate to merge in. Thanks!

    opened by chbota 0
  • Feature Request: List songs that have been added to temporary playlist

    Feature Request: List songs that have been added to temporary playlist

    When searching for an album or artist I'd like to see the name of the songs that have been added. Right now I have to either trust the fuzzy search or go into iTunes to verify that the correct Songs have been added, which defeats the purpose of using iTunes-remote. Also a list command to list the upcoming songs (or just the content of the temporary playlist)

    opened by julianveerkamp 0
  • Feature: Search in Apple Music

    Feature: Search in Apple Music

    Thanks for this nice piece of software, It would be awesome if search included results from Apple Music, and not only tracks that are in user's library

    Would it be possible ?

    enhancement not possible 
    opened by nicolasbd 2
Releases(2.3.0)
  • 2.3.0(Jul 20, 2017)

    Bug Fixes

    • dont-play option of search command (c35865e)
    • Improve loading indicators (8f1fcb6)

    Features

    • Add exit flag (65dc2ea), closes #9 Implemented for the following commands: play, stop, pause, next, previous and back.

      Example usage from the interactive mode:

      $ itunes
      iTunes: start --exit
      $
      

      Example usage from outside:

      $ itunes stop --exit
      iTunes:
      ✔ Stopped playing ♪♬
      $
      
    • setup history to remember commands after exit (a616bf5)


    See all changes between 2.2.0 and 2.3.0

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Jul 19, 2017)

    🔥 Notable changes 🔥

    • add itunes as command alias
      • This way you can start the CLI with itunes instead of itunes-remote.
    • Works with Node 8
    • Fix crashes on Sierra with play artist and play album commands

    Changes

    • 81a2669 style: Change formatting in package.json
    • bde6e53 fix: clean up package.json
    • ab17b63 chore: Fix linting errors
    • 89b7ff3 chore: Reflect lates changes in README
    • 0891c57 fix: crashes on Sierra with play artist and play album
    • 9a06b70 refactor: Group play commands for listing in help
    • 5c1eb89 feat: add itunes as command alias
    • 1d32010 fix: Update dependencies to make the CLI work with Node 8
    • 5921bc9 Update requirements
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jan 19, 2016)

    Enhancements

    • #4 Flattening the artists list by getting rid of »partial« duplicates
    • #6 Pluralize word »song(s)« (thanks @Haroenv)

    Changelog

    • 82e1ead4 Add sublime settings to .gitignore
    • eb4bbf00 Pin dependencies
    • 93033a86 Fix linting error
    • 837f2e8b Update depencies
    • 378e72f7 Implemented plural of song
    • 53b5e16f Add preferGlobal key to package.json
    • 3520b456 Switch to the VM using xcode7
    • 675ebc6e Use OS X 10.11 for travis build
    • ce5b3076 Fix broken test :sunglasses:
    • a77dfd0a Get rid of partial duplicates in artist list
    • 7be94bcf Update coveralls on preparepublish
    • 12fd2fae Add .coveralls.yml to .gitignore
    • fe4156c8 Update node-osascript to the latest version
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jan 19, 2016)

    Changelog

    • 283e17c2 Exclude lib from coverage
    • b100fd77 Add a few more tests
    • daee4413 Remove travis badge as long as they use OS X 10.9.5 : disappointed_relieved:
    • 4e64c085 Fix link to npm
    • 20d4d745 Drop the path to .bin
    • f0cd138b Add a few test for the API
    • 130a16bd Use local binaries in npm scripts
    • d59c9483 Coverage setup through npm scripts
    • 1dc337f9 Remove and add to .gitignore → coverage.html
    • ee6f0dbe Update travis config
    • 82664969 Add coverage badge
    • c88981fa Configure travis for coverall
    • 9595d6c8 Add coveralls
    • afcf1d65 Update and link to thanks.md
    • 5e508c8d Remove Node 0.10 from travis config
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Nov 6, 2015)

    Interactive Version

    Changelog

    3c26764d Release 2.0.0 bdc69773 Update coverage 05b2b5d6 Too much emotion :smile: d898ce90 Add info about how to pass command line arguments d882eca4 Add play album command 1fefcc22 Upate readme 4e24eded Update osascript options 94fc14e8 Temporary use my fork of node-osascript 4f529842 Fix linting errors 495df475 Refactor waiting indicators ba371975 Add play artist command 2a1c995f Add search options to limit search areas 01773c07 Add back command f02d6ad8 Add previous command 3ba61ffe Require lib dir instead of single files 6665fd7d Add next command 0a8bbaec Limit build status badge to master branch 6a8373c2 Fix linting errors 01415225 Add waiting indicator 8f6030c8 Use shields.io for npm version badge b293c6d1 Add coverage with blanket 53128cc3 Fix link to :unicorn: video bf6b467d Pass command line arguments to vorpal f13c8b7b Fix linting errors f611d575 Refactor existing features to make use of Vorpal :sparkles: b1088472 Add credits. Thanks to @stefanjudis

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Nov 6, 2015)

Owner
Michael Kühnel
👨‍👩‍👧‍👦 Father of two ✨ Loves Open Source ✨ Team @bullgit ✨ @yeoman core team member ✨ Creator of @relaxed-theme ✨
Michael Kühnel
LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI.

LinkFree CLI LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI. Demo Using the CLI (Commands) Note First

Pradumna Saraf 32 Dec 26, 2022
Control the macOS dark mode from the command-line

dark-mode Control the macOS dark mode from the command-line Requires macOS 10.10 or later. macOS 10.13 or earlier needs to download the Swift runtime

Sindre Sorhus 630 Dec 30, 2022
Control the Plash app from the command-line

plash-cli Control the Plash app from the command-line Install $ npm install --global plash Requires Node.js 14 or later. Requires Plash 2.3.0 or late

Sindre Sorhus 33 Dec 30, 2022
SFDX Plugin to set Email Deliverability Access Level for an org easily and quickly via command line interface

SFDX Plugin to set Email Deliverability Access Level for an org easily and quickly via command line interface

Max Goldfarb 11 Dec 16, 2022
Uma opção rápida para gerenciar seus aplicativos no Discloud via terminal.

Discloud CLI Discloud CLI is a quick option to control your apps in Discloud See more of the docs. Installation npm i -g discloud-cli To get started u

DisCloud 8 Nov 17, 2022
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Infinite Red, Inc. 14.7k Dec 29, 2022
CLI tool for running Yeoman generators

yo What's Yeoman? Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. To do so, we provide a

Yeoman 3.6k Dec 30, 2022
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
Distributed, realtime CLI for live Node apps.

Vantage = CLI + SSH + REPL for your live node app. In one line: require("vantage")().listen(4000); What just happened? That's voodoo magic: show me th

dc 3.5k Dec 30, 2022
download torrents with node from the CLI

torrent Download torrents from the command line usage torrent <magnet link OR path to .torrent file> Download a torrent from a magnet link to torre

Max Ogden 619 Dec 26, 2022
:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

Whatspup Use Whatsapp from commandline/console/cli using GoogleChrome puppeteer! ?? Features ✅ Send and receive messages ✅ Read Receipts ✅ Switch betw

Sarfraz Ahmed 343 Dec 1, 2022
Add stdin support to any CLI app that accepts file input

tmpin Add stdin support to any CLI app that accepts file input It pipes stdin to a temp file and spawns the chosen app with the temp file path as the

Sindre Sorhus 121 Oct 3, 2022
A CLI for peer-to-peer file sharing using the Hypercore Protocol.

A CLI for peer-to-peer file sharing (and more) using the Hypercore Protocol.

Hypercore Protocol 207 Dec 30, 2022
Node.js Open CLI Framework. Built with 💜 by Heroku.

oclif: Node.JS Open CLI Framework ?? Description ?? Getting Started Tutorial ✨ Features ?? Requirements ?? CLI Types ?? Usage ?? Examples ?? Commands

oclif 8k Jan 4, 2023
Git commit CLI

commitme Based on this gist by @gustavopch Installation You can install this on your package using npm i -D commitme or run it once using npx commitme

Roz 7 Jun 6, 2021
An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

ViewPlaylistsWithSong An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Idea

null 21 Dec 13, 2022
HMSC (How Much Stuffs CLI) analyst for your files and folders

HMSC ?? About HMSC (How Much Stuffs CLI) analyst for your files and folders ?? Screenshot ?? Requirements Node.js NPM ?? Installation $ npm i -g hmsc

Abdullah Veliyev 26 Jan 10, 2022
A C++ based command-line (CLI) program that lets you manage your tasks

COMMAND LINE INTERFACE TODO APP a command-line (CLI) program that lets you manage your tasks. The specification for this project is written down as te

Rahul Prabhakar 1 Dec 25, 2021