r/commandline 20h ago

Command Line Interface ytm: YouTube Music from the terminal, with background playback

Enable HLS to view with audio, or disable this notification

18 Upvotes

Hello r/commandline, I’ve been working on ytm, a small CLI/TUI for using YouTube Music without keeping a browser open.

It has search, queue management, playlists, lyrics, radio/autoplay and a full terminal UI. Playback is handled by mpv running in the background, so you can close the TUI and the music keeps playing. The CLI talks to the same player, so things like ytm play, ytm next, ytm pause and ytm queue work without opening the interface again.

Under the hood it uses ytmusicapi for YouTube Music, yt-dlp for resolving streams and mpv for playback.

There’s also offline caching, media key support and JSON output if you want to use it in scripts.

It’s still something I’m actively working on, so feedback from people who actually live in the terminal would be really useful.

Repo: https://github.com/MaheshBhushan/yt-music-cli


r/commandline 21h ago

Command Line Interface Live Git updates in a shell prompt

Enable HLS to view with audio, or disable this notification

4 Upvotes

Recently, I started refining my shell tools, scripts, and terminal workflows. One of my goals was to update the shell prompt, making it less prominent and leaving more room for commands and their output. As a result, Cobalt Spark emerged - a compact Zsh prompt with understated colors and other visual refinements.

While using IDEs and coding agents, at some point it became obvious that seeing stale Git state in the prompt when something changes in the repository is quite annoying. I would often get tripped up by the shell showing something unexpected and waste a moment figuring out why. So the prompt gained Live Git support: its Git state can now update automatically when something changes.

It works efficiently: when the shell enters a Git repository, the prompt starts a background process that monitors the repository using platform-specific APIs such as inotify on Linux or FSEvents on macOS and signals the parent shell to update its prompt when meaningful changes occur. This means you instantly see the updated Git state whenever something changes. It sounds almost dumb-simple, but it's quite convenient in practice, and I haven't seen anything like it in other prompts or themes (let me know in the comments if you have).

If you're interested, you can find more details in the project's README.


r/commandline 2h ago

Command Line Interface Shellroute: a CLI that gives each shell its own proxy route

Enable HLS to view with audio, or disable this notification

0 Upvotes

Shellroute is an open-source CLI for giving one shell or command its own proxy route.

The video shows three independent terminals. The top stays on my normal connection in Lithuania. The two lower sessions connect to the US and Germany at the same time. Commands inside those sessions use their selected routes while the other terminal stays direct.

Quick start:

npm install -g shellroute
shellroute login
/connect US
curl https://ipinfo.io/ip

On first use, shellroute login creates the account and enters interactive mode. Run commands there normally. Scripts and agents can also route a single command without opening an interactive shell:

shellroute run DE -- curl https://ipinfo.io/ip

Related tools cover different jobs. Globalping is useful for public probes from many locations. Proxychains wraps a process when you already have a proxy. A VPN routes the whole device, while raw proxy credentials give you manual control. The difference here is scope: one shellroute session manages the route for one shell or command while other traffic stays unchanged.

Source: https://github.com/shellroute/shellroute-cli

Quickstart: shellroute.com/docs/quickstart

Disclosure: I built shellroute and run the service it connects to. The CLI code is partially AI-generated.

I am mainly looking for feedback on the proxied shell idea and where the CLI feels confusing.