class Cgip < Formula desc "Terminal client for Chat GPT" homepage "https://github.com/divanvisagie/chat-gipity" # Dynamically set the URL and SHA256 based on the CPU architecture if Hardware::CPU.intel? url "https://github.com/divanvisagie/chat-gipity/releases/download/{{tag}}/cgip-darwin-x86_64.tar.gz" sha256 "{{intel_hash}}" elsif Hardware::CPU.arm? url "https://github.com/divanvisagie/chat-gipity/releases/download/{{tag}}/cgip-darwin-aarch64.tar.gz" sha256 "{{arm_hash}}" else odie "Your architecture is not supported!" end def install bin.install "cgip" man1.install "cgip.1" end test do system "#{bin}/cgip --version" end end