{"id":13621189,"url":"https://github.com/aditya-K2/gspt","last_synced_at":"2025-04-15T01:31:34.608Z","repository":{"id":153086689,"uuid":"591433518","full_name":"aditya-K2/gspt","owner":"aditya-K2","description":"Spotify for the terminal written in Go ","archived":false,"fork":false,"pushed_at":"2024-07-02T07:24:55.000Z","size":2405,"stargazers_count":238,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-01T21:47:02.157Z","etag":null,"topics":["golang","spotify","spotify-api","spotify-client","spotify-clone","spotify-tui","terminal","terminal-based","tui","tui-app"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aditya-K2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T18:43:49.000Z","updated_at":"2024-07-31T12:50:49.000Z","dependencies_parsed_at":"2024-06-12T00:00:55.941Z","dependency_job_id":"e444b3a4-817d-4297-a5d5-1b6a03a2ff49","html_url":"https://github.com/aditya-K2/gspt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya-K2%2Fgspt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya-K2%2Fgspt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya-K2%2Fgspt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya-K2%2Fgspt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aditya-K2","download_url":"https://codeload.github.com/aditya-K2/gspt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223654514,"owners_count":17180523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","spotify","spotify-api","spotify-client","spotify-clone","spotify-tui","terminal","terminal-based","tui","tui-app"],"created_at":"2024-08-01T21:01:03.455Z","updated_at":"2024-11-08T08:30:19.916Z","avatar_url":"https://github.com/aditya-K2.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gspt\n\n\u003cdiv class=\"info\" align=\"center\"\u003e\n    \u003cbr\u003e\u003cimg src=\"./extras/mascot-res.png\" alt=\"mascot\" width=\"200\" class=\"mascot\"/\u003e\u003cbr\u003e\n    Spotify for terminal written in Go.\u003cbr\u003e\n    with builtin \u003cb\u003ecover-art view\u003c/b\u003e and \u003cb\u003emuch more.\u003c/b\u003e \u003cbr\u003e\n    \u003c!-- \u003ca href=\"https://aditya-K2.github.io/gspt/\"\u003e Documentation \u003c/a\u003e | --\u003e\n    \u003ca href=\"https://github.com/aditya-K2/gspt/discussions\"\u003eDiscussion\u003c/a\u003e\n\u003c/div\u003e\n\n---\n\n![](./extras/screenshot.png)\n\n---\n\n***In a very experimental stage.***\n\n### Please Note\n\n- You will need Spotify Premium.\n- `gspt` uses the [Web API](https://developer.spotify.com/documentation/web-api)\n  from Spotify, which doesn't handle streaming itself. So you'll need either\n  an official Spotify client open or a lighter weight alternative such as\n  [spotifyd](https://github.com/Spotifyd/spotifyd).\n- Images are rendered using the X child windows. Currently there is ***no support*** for Wayland.\n- Everything except **Image Rendering** works on Windows and Mac\n\n## Table of Contents\n  * [Setup](#setup)\n    + [Installing](#installing)\n    + [Afer Installation Steps](#afer-installation-steps)\n    + [Default Key Mappings](#default-key-mappings)\n  * [Command-line Parameters](#command-line-parameters)\n  * [Configuration](#configuration)\n  * [Calibrating Image Placement](#calibrating-image-placement)\n\n## Setup\n\n### Installing\n\n##### AUR [\u003cimg src=\"https://img.shields.io/aur/version/gspt-git\"\u003e](https://aur.archlinux.org/packages/gspt-git/)\n\n```bash\n$ yay -S gspt-git\n```\n\n###### Pre-built Binaries are available [here](https://github.com/aditya-K2/gspt/releases/tag/pre-release)\n\n##### Manually\n\n```bash\n# Install go, git, make before this.\n$ git clone https://github.com/aditya-K2/gspt.git # Cloning\n$ cd gspt\n$ sudo make install\n```\n\n### Afer Installation Steps\n\n#### Generate an API Key from Spotify Dashboard\n\n\nIf you want to use Spotify's API to create applications that interact with\ntheir music streaming service, you will need an API key. Here's how you can\ngenerate one from the Spotify Dashboard:\n\n1. Go to the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/)\nand log in with your Spotify account credentials.\n\n2. Click on the \"Create an App\" button to create a new application.\n\n   ![Create an App](./extras/create.png)\n\n3. Give your application a name and description, and agree to the terms of\n   service. In the `Redirect URI` section add `http://localhost:8080/callback`\n   as a callback URL. This is necessary for the OAuth 2.0 authentication flow\n   to work. Click on \"Create\" to proceed. ![Create an App Form](./extras/create_form.png)\n\n4. On the next page, you'll see the details of your newly created application.\n   In the Settings Look for the section labeled \"Client ID\" and click on the\n   \"Show Client Secret\" button. You will now see your Client ID and Client\n   Secret. You will need both of these to use the Spotify API in \"gspt\"\n\n#### Using the Generated Credentials\n\n1. Set the following environment variables from the credentials you generated.\n\n```bash\n# Add this to ~/.bashrc (or your $SHELL equivalent)\nexport SPOTIFY_ID= # client id\nexport SPOTIFY_SECRET= # client secret\n```\n\n2. After this you can just run `gspt`. And follow the link that it generates, and Login.\n\n```bash\n$ gspt\n```\n---\n\n### Default Key Mappings\n\n1. `d` Open the device menu to choose a device from\n1. `1`, `2`, `3` Switch between the views\n1. `enter` - Select an entry\n1. `?` Search\n1. `v` Toggle Visual Mode (Only works in some views)\n1. `a` Add to Playlist (Only works in some views)\n1. `q` Queue Songs or Contexts (Only works in some views)\n1. `ctrl-p` Start playing the entry under the cursor in some views (PlaylistNavigator, Albums, etc.)\n1. ` ` Toggle Playback (Space)\n1. `o` Open the Current Track's Album\n1. `O` Open the Current Track's Artist\n1. `ctrl-o` Open the Current Context (Album/Artist/Playlist)\n1. `n` Play Next Song in Queue\n1. `p` Play Previous Song in Queue\n\n## Command-line Parameters\n\n```\nNOTE: Command-line flags take priority over config values.\n\nUsage of ./gspt:\n  -c string\n        Specify The Directory to check for config.yml file. (default \"$XDG_CONFIG_HOME/gspt\")\n  -corners string\n        Enable or disable Rounded Corners ( 'rounded' | 'default' )\n  -icons\n        Use Icons\n  -image string\n        Show or Hide Image ( 'show' | 'hidden' )\n  -v    Output version information and exit\n  -version\n        Output version information and exit\n```\n\n## Configuration\n\nThe configuration is done through `$XDG_CONFIG_HOME/gspt/config.yml`\nor the path to the folder provided by the `-c` flag before starting the app.\nSee [Command-line Parameters](#command-line-parameters)\n\nAlso, Configuration is live updated when you make a change except for some parts\n*(Key Mappings, Border Colors)*.\n\n#### Config Parameters\n\n```yml\n# Parameter followed by default values\n# For the default configuration used by gspt please see:\n# https://github.com/aditya-K2/gspt/blob/master/extras/CONFIG.md\n\n# Path to where the cached images should be stored.\ncache_dir: $XDG_CACHE_HOME\n\n# The amount of milliseconds after which the cover art should be redrawn if there is a event.\nredraw_interval: 500\n\n# Do not display the cover art image.\nhide_image: false\n\n# Enable Rounded Corners\nrounded_corners: false\n\n# Use Special Characters to display information\nuse_icons: false\n\n# Image Drawing related parameters. You aren't supposed to define them manually.\n# See the next section to see how you can calibrate the Image placement.\nadditional_padding_x : 0\nadditional_padding_y : 0\nimage_width_extra_x  : 0\nimage_width_extra_y  : 0\n\n---\n\n# Color configuration has the following api\ncolors:\n    entity:\n        fg: # foreground (Can be Hex value or a color name)\n        bg: # background (Can be Hex value or a color name)\n        bold: # true/false (boolean)\n        italic: # true/false (boolean)\n\n# for e.g\ncolors:\n    artist:\n        fg: \"#ff0000\"\n        bg: black # Background will be ignored in most cases. (Terminals default background color is used)\n        bold: false\n        italic: true\n\n# For the default colors used for the \"entities\" please see:\n# https://github.com/aditya-K2/gspt/blob/master/extras/CONFIG.md\n# Available color names (i.e. pink, green, etc.) can be seen here:\n# https://github.com/gdamore/tcell/blob/main/color.go#L845\n\n---\n\n# Key mappings has the following API\nmappings:\n    view:\n        mode: # normal/visual\n            function: key_mapping\n\n# for e.g\nmappings:\n    recently_played_view:\n        normal:\n            play_entry: \"ctrl-p\"\n        visual:\n            add_to_playlist: \"a\"\n\n# \"global\" mappings are special mappings that are not view specific\n# ( \"toggle_playback\", \"next\", \"previous\", etc.)\n# These mappings can be changed for different views.\n# for e.g\n\nmappings:\n    global:\n        normal:\n            previous: \"N\"\n    recently_played_view:\n        normal:\n            previous: \"P\"\n\n# As you can assume, here \"N\" will be globally mapped to the \"previous\" function,\n# and then \"P\" will too be mapped to \"previous\" in the recently_played_view (keep\n# in mind that \"N\" will still be mapped to the \"previous\" function i.e \"N\" and\n# \"P\" will both be mapped to the same function in recently_played_view)\n\n# Visual Mode is similar to vim. Only some views support it.\n# (viz. playlist_view, recently_played_view, liked_songs_view, album_view)\n\n# For the default mappings for each view please see:\n# https://github.com/aditya-K2/gspt/blob/master/extras/CONFIG.md\n\n---\n\n# Icons have the following API\nicons:\n    icon_name: \"icon_string\"\n\n# for e.g\nicons:\n    computer: \"🖥️\"\n\n# Note: icons are used only if `use_icons` is true\n# For the default icons used and all available icon names please see:\n# https://github.com/aditya-K2/gspt/blob/master/extras/CONFIG.md\n\n```\n\n## Calibrating Image Placement\n\n1. To make it easier for users to adjust the position and size of the image\npreview box, we have added key mappings to the application. These mappings\nallow you to move the image up, down, left, or right, as well as adjust its\nheight and width. The mappings are as follows:\n\n    - \u003ckbd\u003ectrl+h\u003c/kbd\u003e Move the image left\n    - \u003ckbd\u003ectrl+j\u003c/kbd\u003e Move the image down\n    - \u003ckbd\u003ectrl+k\u003c/kbd\u003e Move the image up\n    - \u003ckbd\u003ectrl+l\u003c/kbd\u003e Move the image right\n    - \u003ckbd\u003eH\u003c/kbd\u003e Decrease the width of the image (from the right)\n    - \u003ckbd\u003eJ\u003c/kbd\u003e Increase the height of the image (from the bottom)\n    - \u003ckbd\u003eK\u003c/kbd\u003e Decrease the height of the image (from the bottom)\n    - \u003ckbd\u003eL\u003c/kbd\u003e Increase the width of the image (from the right)\n\nNote that when you increase or decrease the image height, it only affects the\nbottom of the image. Similarly, when you increase or decrease the image width,\nit only affects the right side of the image.\n\n2. After you have made the changes according to your needs you can save the config\nby pressing \u003ckbd\u003ectrl-s\u003c/kbd\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        Video Example\n    \u003c/summary\u003e\n    \u003cvideo src=\"https://github.com/aditya-K2/gspt/assets/51816057/1904a0f7-c0e6-4ba3-b13e-5f09119fc71a\"\u003e\n\u003c/details\u003e\n\n---\n\n##### Inspired from [spotify-tui](https://github.com/Rigellute/spotify-tui)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faditya-K2%2Fgspt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faditya-K2%2Fgspt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faditya-K2%2Fgspt/lists"}