# Homebrew formula for Aye Chat
# This file is auto-generated by the build-homebrew workflow.
# To use: brew install acrotron/tap/aye-chat
#
# For manual installation:
#   1. Create a tap repository (e.g., github.com/acrotron/homebrew-tap)
#   2. Copy this formula to Formula/aye-chat.rb in the tap
#   3. Users can then: brew tap acrotron/tap && brew install aye-chat

class AyeChat < Formula
  include Language::Python::Virtualenv

  desc "Terminal-first AI Code Generator"
  homepage "https://ayechat.ai"
  url "https://files.pythonhosted.org/packages/source/a/ayechat/ayechat-VERSION.tar.gz"
  sha256 "SHA256_PLACEHOLDER"
  license "MIT"
  head "https://github.com/acrotron/aye-chat.git", branch: "main"

  depends_on "python@3.12"

  # Core dependencies - SHA256 values will be filled by CI
  resource "typer" do
    url "https://files.pythonhosted.org/packages/source/t/typer/typer-0.20.0.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  resource "httpx" do
    url "https://files.pythonhosted.org/packages/source/h/httpx/httpx-0.28.1.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  resource "keyring" do
    url "https://files.pythonhosted.org/packages/source/k/keyring/keyring-25.7.0.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  resource "prompt-toolkit" do
    url "https://files.pythonhosted.org/packages/source/p/prompt_toolkit/prompt_toolkit-3.0.52.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  resource "pathspec" do
    url "https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-0.12.1.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  resource "chromadb" do
    url "https://files.pythonhosted.org/packages/source/c/chromadb/chromadb-1.3.5.tar.gz"
    sha256 "SHA256_PLACEHOLDER"
  end

  def install
    virtualenv_install_with_resources
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/aye --version")
  end
end
