Skip to content

make available in brew #23

@rkristelijn

Description

@rkristelijn

**To make lcode a Homebrew tool, you need:

1. Create a Homebrew Formula

Create lcode.rb:

ruby
class Lcode < Formula
desc "Lightning-fast CLI tool to search git repositories with language detection"
homepage "https://github.com/rkristelijn/lcode"
url "https://registry.npmjs.org/@rkristelijn/lcode/-/lcode-2.4.0.tgz"
sha256 "CHECKSUM_HERE"
license "MIT"

depends_on "node"

def install
system "npm", "install", std_npm_args
bin.install_symlink Dir["#{libexec}/bin/
"]
end

test do
system "#{bin}/lcode", "--help"
end
end

2. Steps to Publish

bash

1. Publish to npm first

npm publish

2. Get the SHA256 checksum

curl -L https://registry.npmjs.org/@rkristelijn/lcode/-/lcode-2.4.0.tgz | shasum -a 256

3. Create a tap (your own Homebrew repository)

brew tap-new rkristelijn/lcode

4. Add the formula

cp lcode.rb $(brew --repository)/Library/Taps/rkristelijn/homebrew-lcode/Formula/

5. Test locally

brew install --build-from-source rkristelijn/lcode/lcode

6. Push to GitHub

Create repo: homebrew-lcode

Push the formula

3. Users Install With

bash
brew tap rkristelijn/lcode
brew install lcode

Simpler alternative: Since lcode is on npm, users can already use:
bash
npm install -g @rkristelijn/lcode

or

npx @rkristelijn/lcode**

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