# The project is shpotify (hnarayanan/shpotify); the script it installs — and # therefore the name a consumer sees the user run — is `spotify`. The id is the # project's own name so it cannot be confused with the Spotify desktop app, # which this tool merely drives. id = "shpotify" name = "shpotify" homepage = "https://github.com/hnarayanan/shpotify" description = "A command-line interface to Spotify." executables = ["spotify"] # README: "a simple Bash/Apple script to control Spotify from the command line # on a Mac" — it drives the desktop app over AppleScript. platforms = ["macos"] [dotfiles] # No ordinary config: the only file shpotify reads from the home directory is # the API config below, and that file is nothing but the two credentials. paths = [] exclude = [] # README, "Connecting to Spotify's API": the Client ID and Client Secret of the # user's own Spotify application are entered "into your shpotify config file at # ${HOME}/.shpotify.cfg", shown there as the two lines CLIENT_ID="…" and # CLIENT_SECRET="…" and nothing else. secret = ["~/.shpotify.cfg"] [commands] format = 1 label = "Spotify from the terminal" description = "Play a song, album, artist or playlist by name in Spotify. Transport commands (next, pause, vol) are simple enough to type directly." quality = "ai-draft" base = "fig:spotify" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/spotify.ts" license = "MIT" [[commands.subcommand]] path = ["play"] label = "Play a song" description = "Search for a song by name and play it; leave blank to resume playback." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/spotify.ts" license = "MIT" [[commands.subcommand.field]] id = "song" label = "Song name" type = "string" position = 0 description = "The name of the song to start playing." multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "play" label = "Play a song" fields = ["song"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["song"] [[commands.subcommand]] path = ["play", "album"] label = "Play an album" description = "Find an album by name and play it." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/spotify.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Album name" type = "string" position = 0 description = "Album to search for." multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "album" label = "Play an album" fields = ["name"] required = ["name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name"] [[commands.subcommand]] path = ["play", "artist"] label = "Play an artist" description = "Find an artist by name and play it." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/spotify.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Artist name" type = "string" position = 0 description = "Artist to search for." multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "artist" label = "Play an artist" fields = ["name"] required = ["name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name"]