Crates.io | spotify-quickauth |
lib.rs | spotify-quickauth |
version | 0.1.6 |
source | src |
created_at | 2024-10-05 18:08:42.190422 |
updated_at | 2024-10-07 19:51:19.050888 |
description | Quickly authenticate librespot-based applications with Spotify |
homepage | https://github.com/Xevion/spotify-quickauth |
repository | https://github.com/Xevion/spotify-quickauth |
max_upload_size | |
id | 1398344 |
size | 90,984 |
A simple CLI-based application for creating a credentials.json
file, used by librespot
derived applications, such as spotify-player, spotifyd, and raspotify.
You can run this application without installing anything by using the following commands.
curl -sSL https://xevion.github.io/spotify-quickauth/run.sh | sh -s --
The default invocation is likely fine for most users, it will try to understand the available paths for credentials.json
to be written to, and allow you to select them.
Automatic detection is dependent on the related software being installed and/or relevant configuration files being present.
For Windows, you can paste this command into PowerShell:
iex (irm "https://xevion.github.io/spotify-quickauth/run.ps1")
This application is dead simple to use. Just run the command, and it'll tell you to connect to a fake 'device' in your Spotify interface.
You must be connected to the same network running
spotify-quickauth
, as thezeroconf
technology does not work across networks nor proxies.
Once you connect, the credentials file will be created, and you'll be prompted to select which location(s) to place it in. Even if none of the relevant librespot
applications are detected or installed, you can specify manual locations, or the current working directory.
Installation is not necessary to use this application, but if you're having trouble, want to compile it yourself, or are using it frequently, you might want to install it.
The scripts above can be given the
-K
or--keep
flag to keep the downloaded binary. This will prevent repeated API calls to GitHub if you're using the script frequently within a short period.
Binaries are always available for download from the releases page, and they're the same ones used by the shell scripts above.
Currently, the following targets are available for download:
x86_64-unknown-linux-musl
aarch64-unknown-linux-musl
armv7-unknown-linux-musleabihf
x86_64-apple-darwin
aarch64-apple-darwin
x86_64-pc-windows-msvc
aarch64-pc-windows-msvc
Please file an issue if you are on a platform that is not supported, or if you encounter issues with the binaries.
cargo-binstall
If the package cannot be found for your target or fails to be downloaded for any reason,
cargo-binstall
will automatically fall back to building the package from source.
cargo-binstall
is a tool that allows you to install binaries from crates.io without needing to compile them yourself.
cargo binstall spotify-quickauth
If you're curious where the binary comes from, cargo-binstall
will likely pull the binary directly from the latest release by this repository, selecting the most appropriate target for your host.
If you'd like to use the shell script above to install the binary, you can use the -S/--stop
flag to prevent the script from running the binary after downloading it. It implicitly applies the --keep
flag too.
You'll need to move the binary yourself though:
curl -sSL https://xevion.github.io/spotify-quickauth/run.sh | sh -s -- -S
mv spotify-quickauth /usr/local/bin
Make sure your directory of choice is in your $PATH though!
Don't want to run my funky shell script? No problem! You can build the application from source easily.
cargo
, the Rust build system and package manager. It's included with the Rust toolchain, which you can install from rustup.rsgit clone https://github.com/Xevion/spotify-quickauth.git
cd spotify-quickauth
cargo install --path .
spotify-quickauth --help
If you have any troubles building the project