Giter Club home page Giter Club logo

bespoke-cli's Introduction

Setup

Note: On windows, use pwsh and not cmd as shell!

Part 1: Installation

  1. First and foremost install the build dependencies: Git and Go
  2. Clone this repo: git clone github.com/Delusoire/bespoke-cli
  3. Run go build, this will create a new bespoke executable in the working directory
  4. [optional] Add the bespoke executable to your PATH variable for ease of access.
    • On Windows, run the following in pwsh:
      $user = [EnvironmentVariableTarget]::User
      $path = [Environment]::GetEnvironmentVariable('PATH', $user)
      $path = "$path;$env:LOCALAPPDATA\bespoke\bin"
      [Environment]::SetEnvironmentVariable('PATH', $path, $user)
    • On a default macOS installation, run the following:
      echo "$HOME/Library/Application Support/bespoke/bin" >> /etc/paths
    • On other platforms you can perform a simple search on how to set the PATH environment variable
  5. Run ./bespoke init to initialize the bespoke setup, this only needs to be done once. If the command fails, try running it in an elevated shell (as Administrator)

Part 2: Patching

  1. Run bespoke sync to download and install the latest hooks
  2. Run bespoke apply to patch the Spotify desktop client, this needs only be done when using bespoke for the first time or when the Spotify client updates (and reverts all the patches).

You can always revert this by running bespoke fix.

Caveats

If your Spotify installation is somewhat unusual, then you have to specify the paths to the Spotify data and Spotify config folders manually. You can do that by creating a config.yaml file and adding a spotify-data: path/to/spotify/data/ (and optionally a spotify-config: path/to/spotify/config/ for more advanced dev workflows) Furthermore, if the Spotify folder is Frozen (like the Microsoft Store version of Spotify), you have must tell bespoke to use the mirror mode. For the Microsoft Store version of Spotify, this would be enough:

$configPath = "$env:LOCALAPPDATA\bespoke\config.yaml"
$spotifyPackage = Get-AppxPackage | Where-Object -Property Name -Eq "SpotifyAB.SpotifyMusic"
"mirror: true" >> $configPath
"spotify-data: $($spotifyPackage.InstallLocation)" >> $configPath
"spotify-config: $env:LOCALAPPDATA\Packages\$($spotifyPackage.PackageFamilyName)\LocalState\Spotify\" >> $configPath

License

GPLv3. See COPYING.

Todos

  • Create new cssmap.json [incremental]
  • Refactor stdlib (breakdown & modularize the S object)
  • Refine CLI output, add TUI

  • Add a "spotify.version" semver prop to Metadata.json that will be used to disable non-conforming modules

  • Improve spotify paths recognition on Linux
  • Add linux desktop entry (for custom url scheme)
  • Package the executable into a .app for MacOS

Advanced Usage

// TODO bespoke daemon bespoke daemon start bespoke daemon enable bespoke daemon disable

Dev Setup (hooks)

cd $env.LOCALAPPDATA/bespoke/
rm -r hooks/
git clone github.com/spicetify/hooks hooks/
cd hooks/
npm install -g typescript
tsc

bespoke-cli's People

Contributors

delusoire avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.