{"id":15517380,"url":"https://github.com/flipez/spotilocal","last_synced_at":"2025-03-28T19:48:05.906Z","repository":{"id":59156062,"uuid":"77254646","full_name":"Flipez/spotilocal","owner":"Flipez","description":"Control and query your local Spotify client.","archived":false,"fork":false,"pushed_at":"2016-12-27T12:00:09.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T11:41:45.667Z","etag":null,"topics":["cli","gem","ruby","spotify","spotify-cli","thor"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flipez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-23T22:52:44.000Z","updated_at":"2021-05-04T01:25:22.000Z","dependencies_parsed_at":"2022-09-13T20:11:40.002Z","dependency_job_id":null,"html_url":"https://github.com/Flipez/spotilocal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fspotilocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fspotilocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fspotilocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fspotilocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flipez","download_url":"https://codeload.github.com/Flipez/spotilocal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093105,"owners_count":20722395,"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","gem","ruby","spotify","spotify-cli","thor"],"created_at":"2024-10-02T10:13:00.826Z","updated_at":"2025-03-28T19:48:05.881Z","avatar_url":"https://github.com/Flipez.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotilocal\n[![Gem Version](https://badge.fury.io/rb/spotilocal.svg)](https://badge.fury.io/rb/spotilocal)\n[![Build Status](https://travis-ci.org/Flipez/spotilocal.svg?branch=master)](https://travis-ci.org/Flipez/spotilocal)\n[![Code Climate](https://codeclimate.com/github/Flipez/spotilocal/badges/gpa.svg)](https://codeclimate.com/github/Flipez/spotilocal)\n\nSpotilocal allows you to query the local spotify client and fetch informations about the current status and perform actions such as start/stop.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'spotilocal'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install spotilocal\n\n## Usage\n### Library\nYou can specify a port to create the instance faster. Otherwise spotilocal will try to discover the port.\n```ruby\n# Create a new spotify object\ns = Spotilocal::Client.new port: 4382\n```\n\nAfter that you can simply fetch some informations.\n```ruby\ns.status\ns.pause   # true if paused\ns.unpause # true if playing\n```\n\n### Cli\nSpotilocal comes with a thor cli. The cli is currently a bit slow due to port autodiscover. You can use it like this\n\n```bash\nspotilocal play URI # plays uri\nspotilocal pause    # guess what\nspotilocal unpause  # yup..\n```\n\nTo display or fetch information about the current status you can use `spotilocal current [RESOURCE]`\nAvailable resources are *album*, *track* and *artist*\n\n```bash\nspotilocal current album | jq\n# {\n#   \"name\": \"Die bekannteste unbekannte Band der Welt\",\n#   \"uri\": \"spotify:album:6EcMsNVKYMpA2Kqi1GSUAA\"\n# }\n\nspotilocal current artist | jq\n# {\n#   \"name\": \"SDP\",\n#   \"uri\": \"spotify:artist:1EfwyuCzDQpCslZc8C9gkG\"\n# }\n\nspotilocal current track | jq\n# {\n#   \"name\": \"Wenn ich groß bin\",\n#   \"uri\": \"spotify:track:5oEoQtl4qDwR7kstlTTBRu\",\n#   \"length\": 206,\n#   \"type\": \"normal\"\n# }\n```\n\nIf you only want one specific information you can use `--only` or `-o`\n\n```bash\nspotilocal current track -o name\n#\u003e Wenn ich groß bin\n```\n\nThor allows argument guessing. So commands like `spotilocal un` will work too.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Flipez/spotilocal.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipez%2Fspotilocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipez%2Fspotilocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipez%2Fspotilocal/lists"}