https://github.com/insomnimus/libman
A spotify shell client in go.
https://github.com/insomnimus/libman
cli go golang shell spotify terminal
Last synced: about 1 year ago
JSON representation
A spotify shell client in go.
- Host: GitHub
- URL: https://github.com/insomnimus/libman
- Owner: insomnimus
- License: mit
- Created: 2021-07-17T15:57:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T20:22:33.000Z (almost 4 years ago)
- Last Synced: 2025-03-30T22:41:46.259Z (about 1 year ago)
- Topics: cli, go, golang, shell, spotify, terminal
- Language: Go
- Size: 121 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: history/history.go
- License: LICENSE
Awesome Lists containing this project
README
# libman
Libman is an interactive spotify shell.
# Features
- Control your spotify playback.
- Edit playlists.
- Fully complies to the spotify web api terms of usage.
- Set aliases for commands.
- Execute commands from a file during startup.
- No need for premium.
- Simple to get started, comfortable to use.
- Has context aware in-application tab completions!
- Import and export your playlists as json.
## Authors Note
Libman is still in development stages, the usage won't change but a lot of new features are on their way, so if you can't do `X` yet, just wait for it.
# Installation
Libman is written in `go`, and will work only with go1.16 and above so get an up to date go compiler.
You can either clone the repo or install directly with the go command:
```sh
# recommended:
git clone https://github.com/insomnimus/libman
cd libman
git checkout main
go install
# you can also do this:
# go install github.com/insomnimus/libman@latest
```
# Getting Started
You don't need a premium account, but you need to get an app token; visit [this link](https://developer.spotify.com/documentation/web-api/).
After registering an application, note down your client id, secret and redirect uri (you configure your own redirect uri).
The redirect URI should be a loopback (localhost); for example:
`http://localhost:8080/callback`
Now you can either launch libman to generate a config file and save your credentials there, or you can
set some env variables:
- `LIBMAN_ID`: Set it to your spotify client ID.
- `LIBMAN_SECRET`: Set it to your spotify client secret.
- `LIBMAN_REDIRECT_URI`: Set it to the redirect URI you configured from the spotify developer portal.
- `LIBMAN_CACHE_PATH`: This is not necessary but helpful, set it to a file where your session token will be saved so you won't have to authorize each time you launch libman.
These can be accomplished from the command line as well:
```sh
libman config id
libman config secret
libman config redirect-uri
# there are more configuration options
# run the command below to see them all:
# libman config --list
```
That's it! Just launch libman and enjoy some music.
# Tips & Tricks
- Create a `~/.libmanrc` file and write any valid libman command to be ran at startup (define your aliases here).
- You can change the prompt! run `libman config prompt "my new prompt>"`.
- The config file is located at `~/.config/libman.toml` on unix, and `C:\Users\username\AppData\Roaming` on windows.
- Configure a history file either from the config file or with `$LIBMAN_HIST_FILE` env var for search history auto completions.
- Want to view every album of an artist? Simple, run: `salb *::michael jackson`.