| Crates.io | spotify-quickauth |
| lib.rs | spotify-quickauth |
| version | 0.1.7 |
| created_at | 2024-10-05 18:08:42.190422+00 |
| updated_at | 2025-01-17 20:44:02.803128+00 |
| 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 | 98,857 |
[!IMPORTANT] This application is not 'real'; I mostly created it to learn about building a CLI application in Rust with high-end CI/CD pipelines and easy to execute multi-platform scripts. Interestingly enough, I never really developed the program itself, just the scripts and the CI/CD pipeline. And by the time I was ready to write it, the
spotify-playerproject had already solved the primary issue I was trying to address. Thus, I'm archiving this project, as it's no longer necessary.This project is still pretty cool though in it's own right, with multi-platform ephemeral binaries over
curlcommands, Windows support, Linux MUSL targets (smaller binaries), ARM64 MacOS support, binary deployment to GitHub pages, automatic GitHub release uploads, and a pretty decent README - this project has it all.
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.
[!NOTE] 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.
[!NOTE] You must be connected to the same network running
spotify-quickauth, as thezeroconftechnology 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.
[!NOTE] The scripts above can be given the
-Kor--keepflag 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-muslaarch64-unknown-linux-muslarmv7-unknown-linux-musleabihfx86_64-apple-darwinaarch64-apple-darwinx86_64-pc-windows-msvcaarch64-pc-windows-msvcPlease file an issue if you are on a platform that is not supported, or if you encounter issues with the binaries.
cargo-binstall[!NOTE] If the package cannot be found for your target or fails to be downloaded for any reason,
cargo-binstallwill 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