Metadata-Version: 2.1
Name: spty
Version: 0.1.2
Summary: A simple spotify cli
Home-page: https://github.com/rgbongocan/spty
Author: Renzo Gabriel Bongocan
Author-email: gabrielbongocan@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: spotipy
Requires-Dist: click
Requires-Dist: click-aliases
Requires-Dist: ruamel.yaml


# spty
A simple Spotify CLI made with [Click](https://click.palletsprojects.com/en/7.x/) and [Spotipy](https://github.com/plamere/spotipy)

This was done as a personal exercise in making CLIs. It's inspired by [shpotify](https://github.com/hnarayanan/shpotify) which is available for MacOS.

## Setup
```
pip install spty
```

Alternatively, you can [fork the repo](https://github.com/rgbongocan/spty) if you wish to play around with it.

### Shell Completion
This is optional, but enabling [tab completion](https://en.wikipedia.org/wiki/Command-line_completion) will let you explore and issue commands faster without having to consult `--help`.

For `zsh`:
```
_SPTY_COMPLETE=source_zsh spty >> ~/.zshrc
```

For `bash`:
```
_SPTY_COMPLETE=source_bash spty >> ~/.bashrc
```

## Connecting with your Spotify
`spty` does not communicate with your local Spotify app directly but rather over API calls. It's a remote controller. As a prerequisite, you'll have to "create" a Spotify app at [Spotify for Developers](https://developer.spotify.com/dashboard/).

See their [App Settings guide](https://developer.spotify.com/documentation/general/guides/app-settings/) for more instructions. Note that your app's name and description doesn't matter as much for this CLI.

## Usage
```
spty                      Show all commands
spty config               (Re)configure your Spotify app values

spty play                 Play or resume playback
spty play TRACK           Find a track and play it
spty play album ALBUM     Find an album and play it
spty play artist ARTIST   Find an artist and play its discography
spty play list PLAYLIST   Find a playlist and play it

spty pause                Pause the playback
spty stop                 Stop the playback
spty replay               Replay the current song
spty next                 Skip to the next song
spty previous (prev)      Play the previous song

spty fast-forward (ffwd)  Fast-forward by SECONDS (10 by default)
spty rewind (rew)         Rewind by SECONDS (10 by default)
spty seek                 Play current song at TIMESTAMP (e.g. 1:30)

spty vol                  Show current volume
spty vol up               Increase volume by 10
spty vol down             Decrease volume by 10
spty vol PERC             Set volume to PERC (0-100)
spty repeat               Set repeat mode (track, context, or off)
spty shuffle              Toggle shuffle or explicitly turn it on/off

spty status               Show playback status, including the elapsed time
spty status track         Show track title
spty status title         Show album title
spty status artist        Show artist/s

spty share                Show the current song's url and uri
stpy share url            Show the current song's url
stpy share uri            Show the current song's uri
```

