Closed micr0-dev closed 5 months ago
If you want I can make one on arch it should work on MacOS. I don't use Brew so I'm not 100% on that ( it's just I've seen this has been open for a while ) I am getting a MacBook soon not sure how long though so if it can't be done on Arch and this is still open I can do it on that for you.
That would be great! Thanks so much!
after way to long i have the pull request open https://github.com/Homebrew/homebrew-core/pull/168214
EDIT: im starting with a new one that i know will work sorry there rules are way to strict for commits
https://github.com/Homebrew/homebrew-core/pull/168216 no errors :)
If anyone is any good with Ruby and wants to help, I'm having an issue with getting Lexido on Homebrew due to their rules.
What I'm attempting to accomplish is to create a test that I expect to fail, similar to what I've done. However, the entire formula is failing because I'm unable to set the API key before running the test command with Lexido.
Here's what I want to achieve:
lexido "test"
I expect to receive an output containing any of the following:
Then, the test should exit with a success code (0) indicating that it was successful. However, I'm not very good with Ruby and am having difficulty in achieving this. I've made 12 commits so far, and 11 have failed on the same check. It's ironic that when I execute brew test lexido
on my system, it attempts to use my API key, even when I'm in a distrobox, and I have no clue where the key is located. I've searched in ~/.zshrc
and ~/.bashrc
.
Here's the current formula code:
class Lexido < Formula
desc "Innovative assistant for the command-line"
homepage "https://github.com/micr0-dev/lexido"
url "https://github.com/micr0-dev/lexido.git", tag: "v1.3.1", revision: "36f02d699f2709f0bd51a5f119e0670845b4ad9f"
license "AGPL-3.0-or-later"
depends_on "go" => :build
def install
# Build the binary using the default go build command
system "go", "build", *std_go_args
end
test do
# set fake api key
ENV["LEXIDO_API_KEY"] = "12309863243987"
# Run the `lexido` command with the "test" argument
output = shell_output("#{bin}/lexido test", 1).strip
# Check if the error message or relevant parts are present in the output
assert_match "API key not valid", output
assert_match "HTTP response code 400", output
assert_match "INVALID_ARGUMENT", output
assert_match "API_KEY_INVALID", output
# Exit with success (exit code 0)
assert_equal 0, $?.exitstatus
end
end
this is a updated one from my last commit on the PR
if you need it here is where the formula has an error lexido 1.3.1 (new formula) #168216
The key is located in ~/.lexido/keyring.json
I think I found the issue!!!
The ENV variable name is wrong the one lexido uses is GOOGLE_AI_KEY
The ENV variable name is wrong the one lexido uses is GOOGLE_AI_KEY
yep that will do it lmao
got a working test with local though going to push it to git now and see if any error come up.
its looking like its going to pass every test bit the push format style (I cant fix that idk what is wrong with it)
https://github.com/Homebrew/homebrew-core/pull/168585 my last time trying till i get my mac
@micr0-dev is this project on AGPL-3.0-or-later or AGPL-3.0-only
A reviewer in the PR is trying to find out what one it is 😃
AGPL-3.0-or-later
Your on homebreeeew
This is awesome!!!!! Thanks so much for all your work!!!
Is your feature request related to a problem? Please describe. The current installation process requires manually downloading the binary or building from source, which can be cumbersome for users who prefer the convenience of package managers like Homebrew.
Describe the solution you'd like I would like Lexido to be available as a Homebrew package. This would allow users to easily install, update, and manage Lexido with simple commands (
brew install lexido
,brew update
,brew upgrade lexido
). It will greatly simplify the installation process and enhance the user experience for macOS users.Describe alternatives you've considered An alternative could be providing an installation script that automates the download and installation process. However, this doesn't provide the same level of integration and ease of use as having Lexido directly available in Homebrew. Additionally, users tend to trust and rely on Homebrew for managing software on macOS, making it a preferred solution.
Additional context Making Lexido available on Homebrew would not only improve accessibility for current users but also potentially increase the user base by making it more discoverable to those searching for tools within the Homebrew ecosystem. This addition would align with our goal of making Lexido readily available and easy to install for as many developers as possible.