Skip to content

A fast, helpful, and open-source document parser

feat: add homebrew publishing script + action

Clelia (Astra) Bertelli26d01c2b58d7
diff --git a/.github/workflows/homebrew_release.yml b/.github/workflows/homebrew_release.yml
new file mode 100644
index 0000000..2385d8e
--- /dev/null
+++ b/.github/workflows/homebrew_release.yml
@@ -0,0 +1,25 @@
+name: Push Release to HomeBrew repository
+
+on:
+ workflow_dispatch:
+
+jobs:
+ push-release-homebrew:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v6
+
+ - name: Set up Python
+ run: uv python install 3.13
+ shell: bash
+
+ - name: Push Release to HomeBrew repository
+ run: ./scripts/publish-to-homebrew-repo.sh
+ shell: bash
+ env:
+ GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} # PAT with permissions to push to run-llama/homebrew-liteparse
diff --git a/README.md b/README.md
index b24defd..410d006 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ LiteParse is a standalone OSS PDF parsing tool focused exclusively on **fast and
#### Option 1: Global Install (Recommended)
-Install globally via npm to use the `liteparse` command anywhere:
+Install globally via npm to use the `lit` command anywhere:
```bash
npm i -g @llamaindex/liteparse
@@ -42,6 +42,13 @@ lit parse document.pdf
lit screenshot document.pdf
```
+For macOS and Linux users, `liteparse` can be also installed via `brew`:
+
+```bash
+brew tap run-llama/liteparse
+brew install llamaindex-liteparse
+```
+
#### Option 2: Install from Source
You can clone the repo and install the CLI globally from source:
diff --git a/scripts/publish-to-homebrew-repo.sh b/scripts/publish-to-homebrew-repo.sh
new file mode 100755
index 0000000..b7ea34b
--- /dev/null
+++ b/scripts/publish-to-homebrew-repo.sh
@@ -0,0 +1,17 @@
+#/bin/bash
+
+echo "Installing homebrew-npm-noob tool"
+uv tool install --upgrade homebrew-npm-noob
+echo "Setting up repository locally"
+git clone https://github.com/run-llama/homebrew-liteparse
+cd homebrew-liteparse
+mkdir -p Formula/
+echo "Generating HomeBrew Formula"
+noob @llamaindex/liteparse > Formula/llamaindex-liteparse.rb
+echo "Pushing to GitHub"
+git add .
+git commit -m "Automated HomeBrew Release for liteparse"
+git push -u origin main
+echo "Removing local copy"
+cd ..
+rm -rf homebrew-liteparse