{"id":21660270,"url":"https://github.com/Ratakor/zpotify","last_synced_at":"2025-07-17T23:31:08.860Z","repository":{"id":255765999,"uuid":"852940374","full_name":"Ratakor/zpotify","owner":"Ratakor","description":"A CLI for Spotify","archived":false,"fork":false,"pushed_at":"2024-10-22T20:37:12.000Z","size":363,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-25T09:45:36.434Z","etag":null,"topics":["cli","spotify","tui","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ratakor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T17:37:00.000Z","updated_at":"2024-11-04T20:08:55.000Z","dependencies_parsed_at":"2024-09-07T02:57:04.573Z","dependency_job_id":"a99c1328-a124-4045-9b5c-6704d2d7d848","html_url":"https://github.com/Ratakor/zpotify","commit_stats":null,"previous_names":["ratakor/zpotify"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Ratakor/zpotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratakor%2Fzpotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratakor%2Fzpotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratakor%2Fzpotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratakor%2Fzpotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ratakor","download_url":"https://codeload.github.com/Ratakor/zpotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratakor%2Fzpotify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678478,"owners_count":23810114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","spotify","tui","zig"],"created_at":"2024-11-25T09:32:36.740Z","updated_at":"2025-07-17T23:31:08.578Z","avatar_url":"https://github.com/Ratakor.png","language":"Zig","funding_links":[],"categories":["Zig"],"sub_categories":[],"readme":"# zpotify\nzpotify is a CLI for controlling Spotify playback and much more!\n\nhttps://github.com/user-attachments/assets/5a97453a-db8a-4689-b2d0-ab1f2009fcb0\n\n## Installation\n\n### [AUR](https://aur.archlinux.org/packages/zpotify)\n\nUsing your favorite AUR helper or manually:\n```\ngit clone https://aur.archlinux.org/zpotify\ncd zpotify\nmakepkg -si\n```\n\n### Building\n\nRequires zig 0.13.0, libjpeg and chafa.\n```\ngit clone https://github.com/ratakor/zpotify\ncd zpotify\nzig build -Doptimize=ReleaseFast\n```\nZsh completions are available [here](_zpotify)!\n\n## Usage\nRequires Spotify premium.\n```\nUsage: zpotify [command] [options]\n\nCommands:\n  print      | Display current track info in a specific format\n  search     | Search a track, playlist, album, or artist with a TUI\n  play       | Play a track, playlist, album, or artist from your library\n  pause      | Toggle pause state\n  prev       | Skip to previous track\n  next       | Skip to next track\n  repeat     | Get/Set repeat mode\n  shuffle    | Toggle shuffle mode\n  seek       | Get/Set the position of the current track\n  vol        | Get/Set volume or increase/decrease volume by 10%\n  like       | Add the current track to your liked songs\n  devices    | List all available devices\n  transfer   | Transfer playback to another device\n  waybar     | Display infos about the current playback for a waybar module\n  logout     | Remove the stored credentials from the config file\n  help       | Display information about a command\n  version    | Display program version\n```\n\n## Performance\n\nMore than 2x times faster than the only good alternative [baton](https://github.com/joshuathompson/baton)!\n```\n% cat run\n#!/bin/sh\n$1 play artist GPF\n$1 next\n$1 prev\n$1 pause\n$1 repeat\n$1 shuffle\n$1 vol down\n% poop \"./run baton\" \"./run zpotify\" --duration 60000\nBenchmark 1 (15 runs): ./run baton\n  measurement          mean ± σ            min … max           outliers         delta\n  wall_time          4.18s  ± 88.4ms    3.99s  … 4.32s           0 ( 0%)        0%\n  peak_rss           100.0MB ± 96.6KB   99.7MB …  100MB          1 ( 7%)        0%\n  cpu_cycles         14.5G  ±  285M     14.1G  … 15.2G           1 ( 7%)        0%\n  instructions       27.1G  ±  303M     26.5G  … 27.8G           0 ( 0%)        0%\n  cache_references    330M  ± 11.9M      310M  …  353M           0 ( 0%)        0%\n  cache_misses       75.2M  ± 4.46M     67.9M  … 84.4M           0 ( 0%)        0%\n  branch_misses      40.8M  ±  512K     40.0M  … 41.7M           0 ( 0%)        0%\nBenchmark 2 (43 runs): ./run zpotify\n  measurement          mean ± σ            min … max           outliers         delta\n  wall_time          1.40s  ± 87.3ms    1.21s  … 1.64s           0 ( 0%)        ⚡- 66.5% ±  1.3%\n  peak_rss           2.24MB ± 10.3KB    2.24MB … 2.28MB          9 (21%)        ⚡- 97.8% ±  0.0%\n  cpu_cycles         2.11G  ± 98.1M     2.03G  … 2.38G           4 ( 9%)        ⚡- 85.5% ±  0.7%\n  instructions       6.70G  ± 6.02K     6.70G  … 6.70G           1 ( 2%)        ⚡- 75.3% ±  0.3%\n  cache_references    713K  ± 23.2K      675K  …  779K           0 ( 0%)        ⚡- 99.8% ±  1.1%\n  cache_misses        193K  ± 31.6K      130K  …  275K           1 ( 2%)        ⚡- 99.7% ±  1.8%\n  branch_misses      5.97M  ± 1.93M     4.60M  … 11.4M           6 (14%)        ⚡- 85.4% ±  2.5%\n```\n\n## Credits\n- [baton](https://github.com/joshuathompson/baton)\n- [zig-spoon](https://git.sr.ht/~leon_plickat/zig-spoon)\n- [chafa](https://github.com/hpjansson/chafa)\n\n## TODO\n- add `zpotify play liked` cmd which play liked songs\n- add a way to save track / album to a playlist\n- embed [librespot](https://github.com/librespot-org/librespot)\n  - need to create bindings\n  - use [build.crab](https://github.com/akarpovskii/build.crab) for build integration\n  - use [ziggy](https://github.com/kristoff-it/ziggy) for config\n  - librespot alternative?: [cspot](https://github.com/feelfreelinux/cspot)\n- add man page with [zzdoc](https://github.com/rockorager/zzdoc)\n- redo the perf analysis\n- add test coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRatakor%2Fzpotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRatakor%2Fzpotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRatakor%2Fzpotify/lists"}