GithubHelp home page GithubHelp logo

rafenden / nowplaying-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kirtan-shah/nowplaying-cli

1.0 0.0 1.0 1.49 MB

macOS command-line utility for retrieving currently playing media

License: GNU General Public License v3.0

C 19.50% Objective-C 3.46% Objective-C++ 74.47% Makefile 2.58%

nowplaying-cli's Introduction

nowplaying-cli

nowplaying-cli is a macOS command-line utility for retrieving currently playing media, and simulating media actions.

Use nowplaying-cli to get song information and play/pause your media through an easy to use CLI!

Disclaimer: nowplaying-cli uses private frameworks, which may cause it to break with future macOS software updates.

Tested and working on:

  • Ventura 13.1, 13.2, 13.3, 13.6
  • Sonoma 14.4

Installation

Homebrew

You can install nowplaying-cli using Homebrew.

brew install nowplaying-cli

Build from source

Clone the repository and run make to build the binary. You can then move the binary to your desired location.

make
mv nowplaying-cli ~/.local/bin

Usage

nowplaying-cli <cmd>

command description
get [propName1 propName2 ... ] get now playing media properties
get-raw get all non-nil now playing media properties in dictionary format
play play the currently playing media regardless of current state
pause pause the currently playing media regardless of current state
togglePlayPause toggle play/pause based on current state
seek seek to a specific time in the currently playing media
next skip to next track
previous go to previous track

Examples

screenshot of examples in terminal

Available properties

native nowplaying-cli
kMRMediaRemoteNowPlayingInfoTotalDiscCount totalDiscCount
kMRMediaRemoteNowPlayingInfoShuffleMode shuffleMode
kMRMediaRemoteNowPlayingInfoTrackNumber trackNumber
kMRMediaRemoteNowPlayingInfoDuration duration
kMRMediaRemoteNowPlayingInfoRepeatMode repeatMode
kMRMediaRemoteNowPlayingInfoTitle title
kMRMediaRemoteNowPlayingInfoPlaybackRate playbackRate
kMRMediaRemoteNowPlayingInfoArtworkData artworkData
kMRMediaRemoteNowPlayingInfoArtworkDataWidth artworkDataWidth
kMRMediaRemoteNowPlayingInfoArtworkDataHeight artworkDataHeight
kMRMediaRemoteNowPlayingInfoAlbum album
kMRMediaRemoteNowPlayingInfoTotalQueueCount totalQueueCount
kMRMediaRemoteNowPlayingInfoArtworkMIMEType artworkMIMEType
kMRMediaRemoteNowPlayingInfoMediaType mediaType
kMRMediaRemoteNowPlayingInfoDiscNumber discNumber
kMRMediaRemoteNowPlayingInfoTimestamp timestamp
kMRMediaRemoteNowPlayingInfoGenre genre
kMRMediaRemoteNowPlayingInfoQueueIndex queueIndex
kMRMediaRemoteNowPlayingInfoArtist artist
kMRMediaRemoteNowPlayingInfoDefaultPlaybackRate defaultPlaybackRate
kMRMediaRemoteNowPlayingInfoElapsedTime elapsedTime
kMRMediaRemoteNowPlayingInfoTotalTrackCount totalTrackCount
kMRMediaRemoteNowPlayingInfoIsMusicApp isMusicApp
kMRMediaRemoteNowPlayingInfoUniqueIdentifier uniqueIdentifier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.