Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Noctorium

Noctorium CLI

YouTube Music, SoundCloud, Bandcamp, Spotify, VK, Apple Music, Deezer and Tidal, in a terminal — and in every browser in the house.

Noctorium in a terminal: the same library, queue, likes, playlists and lyrics as the desktop and the phone, played with mpv and driven from the keyboard (or the mouse). And noctorium web, which turns the computer it runs on into a music server for the house: open the link it prints on a phone, a tablet or another computer, and the whole of Noctorium is there in the browser, playing out of that device.

noctorium                       the player, in this terminal
noctorium play daft punk        the player, already playing the first match
noctorium search boards of canada
noctorium web                   the web player, for any browser on your network

What it does

  • Every service in one place. Home, search and your library from YouTube Music, SoundCloud, Bandcamp, Spotify, VK, Apple Music, Deezer and Tidal, one queue for all of it. Spotify's, Apple Music's, Deezer's and Tidal's songs play matched on YouTube Music, and Spotify's, with Premium, in your own Spotify app too.
  • Made yours. The speed, from half to double; a volume booster up to 1000%, always behind a limiter, so it gets loud rather than broken; carrying on with similar songs when the queue runs out, or from a song picked on Home; which services a search of all of them asks, or one service with a bang (!ytm, !sc, !sp, !bc, !vk, !am, !dz, !td, !all); a sleep timer that fades out, or stop after this song; and every key. Settings is in sections, with a search (/ there) that finds a setting by its name or another word for it — "dark mode", "louder".
  • A queue that keeps. What autoplay will carry on with is shown under the queue, from the last song's own service or YouTube Music's radio, to play, keep or drop. What is next can be shuffled or cleared, everything but the song playing cleared, the queue saved as a playlist, and it is still there, where it was left, the next time the player starts.
  • Your real accounts. Likes go to the service; playlists are made, renamed, reordered, made public or private and deleted there.
  • Synced lyrics from eight sources, lit up line by line as they are sung, with the source switched right on the lyrics ([ and ]).
  • Covers in the terminal, drawn in half blocks, and all of Noctorium's twenty-four themes — the Windows 98, Noctorium 98 and XP ones drawn as themselves, title bars, bevels, taskbar and all, and the four Glow ones in their blacks, their light left to the web player, which draws it — the seek bar in each of its twelve styles, and the accent taken from the cover if you like. The player bar is full, one compact row, a taskbar or a desktop music player's toolbar (add, previous, play, pause, stop, next, a slider, repeat, shuffle and the volume), or Toolbar 2, with play and pause as one and like, lyrics, the queue, the sleep timer, Devices and the speed beside them; Now playing is the cover beside the lyrics, a poster in big type, the cover alone, the lyrics large, or a playlist window — the cover in a panel, the queue as a table with the columns you choose and the lyrics in the tab beside it, a visualiser drawn from what mpv measures of the sound itself, and a status bar with the codec, the bitrate and how far into the queue. The symbols are the terminal's own, plain ASCII, or a Nerd Font's icons (Font Awesome's, as Nerd Fonts patch them in; Noctorium ships no font, it only names their code points).
  • Scrobbling to Last.fm, Libre.fm and ListenBrainz, Discord presence, downloads to keep, a sleep timer, Noctorium Connect to move the music to another device, switched on and off at the top of Devices.
  • The web player. noctorium web, or w inside the player, serves Noctorium to the browsers on your network. The music plays out of whichever device opened it — a phone in your pocket gets its lock-screen controls — or out of this computer's speakers, with the page as a remote. The same page, with nothing installed and no accounts, is at noctorium-music.vercel.app.

Getting it

One line does it, without admin rights. In PowerShell on Windows, and in a terminal on macOS or Linux:

& ([scriptblock]::Create((irm https://noctorium.vercel.app/install))) --product cli
curl -fsSL https://noctorium.vercel.app/install | sh -s -- --product cli

That fetches the terminal installer from the latest release, checks it against the release's checksums and runs it; irm https://noctorium.vercel.app/install | iex on its own asks which of Noctorium and the CLI you want. With the installer already there, it is noctorium-installer-cli --product cli. If the website is ever down, the scripts are also at https://raw.githubusercontent.com/Noctorium/Noctorium-Installer/main/scripts/install.ps1 and install.sh beside it — the same lines with that address in place of https://noctorium.vercel.app/install.

Or take the archive from the latest release — noctorium-cli-<version>-windows-x64.zip or noctorium-cli-<version>-linux-x64.tar.gz — and put its folder somewhere on your PATH. It carries its own Java runtime, so nothing else needs installing except, on Linux, mpv from your distribution (sudo apt install mpv, sudo dnf install mpv, sudo pacman -S mpv). On a Mac it uses the mpv inside Noctorium.app when that is installed, and fetches its own otherwise. yt-dlp is fetched by Noctorium itself and kept current.

Updates

The player and noctorium web look for a newer release once a day, and install it by themselves: the new copy is checked against the release's checksums, unpacked beside the old one, and takes over when you quit — never underneath a player that is running. noctorium update does the same on the spot, and noctorium update --check only says whether there is one. Settings → Update automatically turns the daily check off, and so does NOCTORIUM_NO_UPDATE=1 in the environment. A copy in a folder that is not yours to change — under Program Files, /usr or /opt, or a build of your own — is told about new releases and left for whatever put it there to update.

Signing in

A terminal cannot show Google's or SoundCloud's sign-in page, so the session comes from somewhere already signed in, and never passes through anything but your own computer:

From How
Noctorium on this computer noctorium login youtube --from-desktop — copies the desktop app's sign-in
Your phone noctorium login youtube --phone — scan the code with the Noctorium app
Any signed-in browser noctorium login soundcloud --cookies cookies.txt — an exported cookies.txt

All three are in the player too, under Settings (8). Spotify, Last.fm and Libre.fm are approved in a browser as they are on the desktop. Where no browser opens, as over ssh, Settings shows Last.fm's and Libre.fm's page to copy into one on any device, and allowing Noctorium there connects it here.

Bandcamp needs no sign-in at all, since a fan's collection is public: noctorium login bandcamp <name>, with the name from your bandcamp.com/<name> address, puts your collection and wishlist in the library, and noctorium logout bandcamp takes them out again. Its songs are streamed for listening; to keep one, buy it on its Bandcamp page (o opens it).

Spotify signs in on its own page, in a browser on this computer, which is where Spotify sends its answer: noctorium login spotify for any account — the library, likes, search and two rows of Home, its songs played matched on YouTube Music — or noctorium login spotify --premium, which also lets your Spotify app play them. Then noctorium spotify devices lists where Spotify is open, noctorium spotify device <name|any> picks one, and noctorium spotify play-on <spotify|youtube> switches between the two.

Spotify reads nothing through its sign-in unless the Spotify app's owner has Premium, so there are two ways in that need none. noctorium spotify follow <link> follows a public playlist by the link from Share › Copy link to playlist, and keeps it in step with Spotify — only public playlists, and only their first 100 songs, which is all Spotify's public page shows; the page is Spotify's to change, and when it does this stops working until Noctorium is updated. noctorium spotify import my_spotify_data.zip imports the file Spotify sends when you ask for your Account data under Privacy settings on spotify.com: every playlist you made and your Liked Songs, as playlists here, as they were when Spotify made the file. Both are in Settings too, and in the web player's, with what each leaves out; a public playlist opened from its link can be kept from there with Keep in library.

VK offers no music to other apps, so noctorium login vk uses your vk.ru session the way VK's own web player does: the p cookie from login.vk.ru and remixsid from vk.ru, copied from a browser signed in to VK, typed in when it asks or given with --cookies "p=…; remixsid=…". That is against VK's terms, and VK may ask you to confirm it is you, or freeze an account it thinks is automated; it says so before it asks. Many songs do not play outside Russia, and VK's songs cannot be downloaded.

Apple Music, Deezer and Tidal are searched, and their links opened, with nothing set up; what is set up adds your library and their rows on Home. Deezer is a public profile, as Bandcamp is a name: noctorium login deezer <profile>, with your profile's link or its number. Tidal signs in on its own page in a browser on this computer, through a Tidal app of your own until Noctorium has one — register it, free, at developer.tidal.com with http://127.0.0.1:8889/noctorium/tidal among its redirect URIs, then noctorium login tidal --client-id <id> (and --secret <secret> to search Tidal before signing in). A terminal cannot show Apple's sign-in page, so noctorium login applemusic takes the media-user-token cookie from a browser signed in at music.apple.com, and says where to find it first.

Every service but YouTube Music, YouTube and SoundCloud is in beta, and says so at its sign-in, in Settings and here: it may not work as it should, and there is a small chance it gets your account blocked. Use it at your own risk.

noctorium settings shows how it plays, and changes it: noctorium settings speed 1.25, autoplay off, autoplay-from youtube (or same, the song's own service), avoid-recent off, keep-queue off, fade 30, hybrid vk off, hybrid deezer on.

The keys

As they come; Settings › Keys changes any of them, and ? always lists them as they are.

1–8, Tab Home, Search, Library, Queue, Now playing, Downloads, Devices, Settings
/ Search every service (or paste a link)
↑ ↓ Enter Choose, and play from there
Space n p Play or pause, next, previous
v . Stop, back at the start of the song; stop after this song
← → Back or on five seconds (thirty with Shift)
+ - m Volume, mute
b The volume and the booster, up to 1000%
< > Slower, faster
s r Shuffle, repeat
a A P Add to the queue, play next, add to a playlist
S U N O On the Queue page: shuffle what is next, clear it, save the queue as a playlist, clear all but this song
a x R On autoplay's songs under the queue: keep one, drop one, look again
l d Like on the real account, download to keep
t The next theme
w Start the web player
z Sleep timer
? All of them

The arrows, Enter, Escape and Tab stay as they are. A key can only be given where it would not take one of its jobs from something else, and Delete on a changed key in Settings › Keys puts it back.

The web player

noctorium web starts a small server on this computer and prints its address, with a key in it, and a QR code for your phone. The key is what lets a browser in: anyone on your network can reach the page, only someone with the key can use it, so share it like a password. --here-only keeps it to this computer, --port picks another port than 7300.

There is no Noctorium server anywhere else involved. The page is this program's own, your sessions stay on this computer, and the audio comes through it — which is also why it works at all: YouTube refuses streams to the addresses of the big hosting companies, and serves yours. The page itself is noctorium-web-player.

Where things are kept

In the desktop's data folder, under cli/ — %LOCALAPPDATA%\Noctorium\cli on Windows, ~/Library/Application Support/Noctorium/cli on a Mac, ~/.local/share/noctorium/cli on Linux — with its own settings, so the two never write over each other. The queue is kept there between launches, in queue.json, by the player and noctorium web; the other commands leave it alone. mpv and yt-dlp the desktop already downloaded are used rather than fetched again. Secrets (Spotify, Last.fm, Libre.fm, VK's session, Apple Music's token, a Tidal app and its sign-in) go to DPAPI on Windows, the Keychain on a Mac and the desktop keyring through secret-tool on Linux; on a machine with no keyring they are kept for the session only, never written to a file.

Building

JDK 21 and Node. Noctorium-Base comes in as the base/ submodule (or a checkout beside this one), the web player as web/:

git clone --recursive https://github.com/Noctorium/Noctorium-cli.git
cd Noctorium-cli
./gradlew run --args="search hello"     # or installDist, and build/install/noctorium/bin/noctorium
./gradlew cliArchive                    # the release archive, with its own runtime

-PskipWeb builds without the web player's page.


Free software under the GPL-3.0. Noctorium is an independent client and not affiliated with Google, YouTube, SoundCloud, Bandcamp, Spotify, VK, Apple, Deezer, Tidal, Last.fm, Libre.fm, ListenBrainz or Discord.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages