Skip to content

feat: Add Homebrew tap support for gitkey #5

Description

@bagdevich

🍺 Feature: Add Homebrew tap support for gitkey

Description

gitkey is currently distributed as an npm package, but since it primarily targets macOS users, it should also be installable via Homebrew to provide a more native developer experience.

The initial goal is to support installation through a custom tap, rather than submitting to homebrew-core.


Goals

  • Add Homebrew installation support for gitkey
  • Publish and maintain a dedicated tap repository
  • Allow users to install with:
brew tap bagdevich/tap
brew install gitkey

Scope

  • Create a tap repository, e.g.:

    • bagdevich/homebrew-tap
  • Add a formula file:

    • Formula/gitkey.rb
  • Use GitHub release archives (tagged versions) as the formula source

  • Ensure the formula installs the gitkey CLI correctly

  • Document Homebrew installation in the main project README.md


Recommended initial approach

Use a source-based formula with Node.js dependency.

The formula should:

  • declare dependency on node
  • fetch a tagged release archive from GitHub
  • install dependencies (npm ci or npm install)
  • build the project (npm run build)
  • install the CLI entry point into Homebrew’s bin

Example formula (draft)

class Gitkey < Formula
  desc "CLI for managing Git SSH profiles and keys"
  homepage "https://github.com/bagdevich/gitkey"
  url "https://github.com/bagdevich/gitkey/archive/refs/tags/v0.1.0.tar.gz"
  sha256 "PUT_SHA256_HERE"
  license "MIT"

  depends_on "node"

  def install
    system "npm", "ci"
    system "npm", "run", "build"

    bin.install "dist/index.js" => "gitkey"
  end
end

Why this approach

  • gitkey is already a Node-based CLI
  • existing npm run build pipeline can be reused
  • avoids premature complexity (no need for native binaries yet)
  • easier to maintain compared to publishing to homebrew-core

Out of scope

  • Publishing to homebrew-core
  • Building standalone native binaries
  • Linux package managers
  • Windows package managers

Acceptance criteria

  • A dedicated Homebrew tap repository exists
  • Formula/gitkey.rb installs the CLI successfully
  • Installation works via:
brew tap bagdevich/tap
brew install gitkey
  • Installed binary works:
gitkey --help
  • README.md includes a Homebrew installation section
  • Updating the formula for new releases is documented or predictable

Nice to have

  • Add CI validation for the Homebrew formula
  • Add a release checklist for updating the tap
  • Automate formula updates on tagged releases

Notes

  • npm remains the primary distribution channel
  • Homebrew is an additional convenience layer for macOS users
  • Long-term, native binaries could be considered, but are not required for initial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions