Spotify App Is An Elcetron App

To get started with Electron, check out the resources below. Learn how to wrap your web app with Electron, access all the APIs, and generate installers.

Explore the Electron APIs

The Electron API Demos app interactively demonstrates the most important features of the Electron API. See what's possible with Electron with sample code and helpful tips for building your app.

Debugtron Debug in-production Electron based app. Latest Release 2020-01-13T11:26:01Z Cashcash The accounting app to avoid surprises. Added 2019-11-19.

Try more powerful experiments with Electron Fiddle

Electron Fiddle lets you create and play with small Electron experiments. It greets you with a quick-start template after opening – change a few things, choose the version of Electron you want to run it with, and play around. Then, save your Fiddle either as a GitHub Gist or to a local folder. Once pushed to GitHub, anyone can quickly try your Fiddle out by just entering it in the address bar.

Spin up the Quick Start app to see Electron in action:

A minimal Electron app with helpful notations.

Or dive deeper and read the documentation.

Need Help?

Ask questions in the Discuss forum. Follow @electronjs on Twitter for important announcements. Need to privately reach out? Email info@electronjs.org.

Electron apps are a plague. If you’ve ever wondered why:

  • your computer chugs to a halt once more than two of {Slack, Discord, Skype, Messenger, WhatsApp, Signal, GitHub Desktop, Steam, VS Code} are open on the same machine
  • scrolling, or playing a GIF or whatever in those apps, is incredibly laggy
  • every app download is now 100MB+
  • the typing shortcuts you’re used to in macOS Just Don’t Work

then it’s likely that Electron is to blame. I’m writing this blog post on a maxed-out 2016 13” MacBook Pro, and it can barely keep up with all these Electron apps I need to keep running. We can only speculate why all these large companies with enormous engineering resources cannot use the money that I pay them for their services to make software that doesn’t suck, but that’s for another blog post.

Electron Android App

Lately I’ve gotten especially annoyed at all of the Electron-based junk running on my machine, since I have to work from home, which means needing to use Docker to run or test out various Linux things, which is another 2 gigs of my laptop’s precious memory eaten away. I decided to look for non-Electron alternative clients for all of those. Enter spotifyd and spotify-tui. After switching software, I have an extra half-gig of memory that isn’t being wasted running yet another instance of Chromium.

In this blog post, I’ll show you how to set up these on your macOS machine. I assume basic familiarity with managing your machine via Terminal. You’ll also need a Spotify Premium account for any of this to work. The wood chipper that is modern society can’t operate without sacrificing a few limbs!

Installing and configuring spotifyd

This is an always-on service (hence the d in its name, for daemon) that will wait in the background and play music requested by whatever Spotify client we choose; in this case, spotify-tui.

First, get spotifyd installed. I’ve added it to Homebrew already, so if you need to get that set up first, go ahead.

You’ll need to create a configuration file named ~/.config/spotifyd/spotifyd.conf that specifies your login information and other details. You can read the full instructions, but I’ve annotated my own configuration here:

Create and edit this file with vim, or whatever text editor you prefer:

Next you’ll need to add your password to the system password manager. You can do this via the Keychain Access app, or just right in the Terminal:

Be sure to use your Spotify username here, not your macOS username. You can confirm that it was added correctly by opening up Keychain Access and searching for spotifyd.

App

This should be all the configuring you need to do. To test if it worked, first run spotifyd as just a plain app. After you run the following command, grant spotifyd access to the macOS Keychain and Firewall in the pop up that appears:

If everything worked correctly, you should similar output to what I have above. Open the official Spotify client on your phone or laptop, and confirm that there’s a new device in Spotify Connect:

Press CTRL-C to stop spotifyd. Now we’ll use brew services to to run spotifyd in the background:

If you still see spotifyd show up in Spotify Connect, it worked!

Is Spotify An Electron App

Installing and configuring spotify-tui

The Terminal app spotify-tui is how you’ll actually control spotifyd by showing you playlists and giving you playback controls and so on. There’s not that much involved, as the app itself will give you instructions that you can follow quite easily.

You’ll have to click through the Spotify Developer agreement and copy and paste some stuff, but it’s nothing too onerous. Just remember to say you’re making a non-commercial app, and set the “Redirect URI” in the Spotify Developer dashboard and everything should be peachy.

If you’ve set everything up correctly you should see the text interface pop up like so:

To be honest, I used it for a bit, and then decided that I didn’t really like text-mode interfaces all that much. Instead, I just control Spotify from my phone via Spotify Connect, so this hasn’t gotten that much use. Maybe one day I’ll teach myself Swift and write a native macOS Spotify Connect player…

But I’m on Linux!

I dunno, on Linux you’re generally expected to figure things out on your own, so maybe try apt install spotifyd spotify-tui followed by sudo systemctl start spotifyd and see if that works ¯_(ツ)_/¯

Spotify App Is An Electron Appointment

Is this all legal?

Probably not. While it would be pretty weird for Spotify to sue or ask to imprison their own paying customers, I can’t predict how Spotify’s CEO might aim to Maximize Shareholder Value in the future.

If you found this post useful, please consider supporting my work with a glass of wine 🍷.

Related Posts

  • Maintain your own Homebrew repository, with binary bottles
  • Painless (almost) multiple-choice exams in LaTeX
  • Updating Homebrew formulae when your software gets a new version