onlook-dev / onlook

The open source, local-first Figma for React. Design directly in your live React app and publish your changes to code.
https://onlook.dev
Apache License 2.0
3.13k stars 198 forks source link

[FEAT] Provide Homebrew cask #284

Open ivangreene opened 2 months ago

ivangreene commented 2 months ago

Providing a way to install Onlook with Homebrew (https://brew.sh) will likely help adoption! It's the option I always look for when installing a new piece of software.

Here's a simple Cask that installs the latest (as of now) version of Onlook:

cask "onlook" do
  version "0.0.18"
  sha256 "978ec2ff3141348aed340a82c65c401cfde265edea09b1ac3e3b400134fa6bec"

  url "https://github.com/onlook-dev/onlook/releases/download/v#{version}/Onlook.dmg"
  name "Onlook"
  desc "Visual editor for React apps"
  homepage "https://onlook.dev"

  app "Onlook.app"
end

If saved as onlook.rb, this can be installed locally with:

brew install -s onlook.rb

To allow others to install this, create a Tap (https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap) repository at github.com/onlook-dev/homebrew-tap (or any preferred suffix instead of tap), add this file as Casks/onlook.rb, and users can then install via:

brew install onlook-dev/tap/onlook