https://github.com/stackql/stackql-provider-homebrew
generate stackql provider for Homebrew from openapi specs
https://github.com/stackql/stackql-provider-homebrew
homebrew stackql stackql-provider
Last synced: 4 months ago
JSON representation
generate stackql provider for Homebrew from openapi specs
- Host: GitHub
- URL: https://github.com/stackql/stackql-provider-homebrew
- Owner: stackql
- License: mit
- Created: 2025-09-18T08:43:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-09-18T09:09:51.000Z (4 months ago)
- Last Synced: 2025-09-18T11:30:46.619Z (4 months ago)
- Topics: homebrew, stackql, stackql-provider
- Language: JavaScript
- Homepage: http://homebrew-provider.stackql.io/
- Size: 278 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `homebrew` provider for [`stackql`](https://github.com/stackql/stackql)
This repository is used to generate and document the `homebrew` provider for StackQL, allowing you to query Homebrew packages, formulas, and repositories using SQL-like syntax. The provider is built using the `@stackql/provider-utils` package, which provides tools for converting OpenAPI specifications into StackQL-compatible provider schemas.
## Prerequisites
To use the Homebrew provider with StackQL, you'll need:
1. StackQL CLI installed on your system (see [StackQL](https://github.com/stackql/stackql))
2. Basic understanding of Homebrew API endpoints
## 1. Download the Open API Specification
First, create an OpenAPI specification for the Homebrew API (since Homebrew doesn't provide an official one):
```bash
mkdir -p provider-dev/downloaded
# Create or download the homebrew OpenAPI spec
# You'll need to implement a script that generates an OpenAPI spec from Homebrew's API endpoints
python3 provider-dev/scripts/generate_homebrew_spec.py \
--output provider-dev/downloaded/openapi.json
```
## 2. Split into Service Specs
Next, split the OpenAPI specification into service-specific files:
```bash
rm -rf provider-dev/source/*
npm run split -- \
--provider-name homebrew \
--api-doc provider-dev/downloaded/openapi.json \
--svc-discriminator tag \
--output-dir provider-dev/source \
--overwrite \
--svc-name-overrides "$(cat <