Skip to main content

A simple spotify cli

Project description

spty

A simple Spotify CLI made with Click and Spotipy

This was made for personal use and as an exercise in making CLIs. However it should work fairly well, behaving similar to macOS shpotify. Tested on Ubuntu/Elementary and Zsh for now!

This does not communicate with your Spotify app directly but rather over API calls. It's a remote controller. As such, users need to have a Spotify premium account and create a Spotify app at Spotify for Developers. See App Settings guide for more instructions.

I'm working to make this available via pip. After cloning or installing, user will have to append the following to their .zshrc file to enable autocomplete:

"$(_SPTY_COMPLETE=source_zsh spty)"

Usage

spty                      
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spty-0.1.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file spty-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spty-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for spty-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 158a82aded91012c82a07609410b18e10aa69ed6f47439e49e3d157a48067ca7
MD5 ddeb6a624d6838b148eeb4be01591586
BLAKE2b-256 eec5bad8b08588ee245b24498fb3f19aa27505cabd64352d02f704c9748d1523

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page