Skip to content

feat: add npm and pip packages with CI/CD auto-publish#33

Open
anonymousAAK wants to merge 8 commits into
perplexityai:mainfrom
anonymousAAK:main
Open

feat: add npm and pip packages with CI/CD auto-publish#33
anonymousAAK wants to merge 8 commits into
perplexityai:mainfrom
anonymousAAK:main

Conversation

@anonymousAAK
Copy link
Copy Markdown

  • Add npm wrapper package (bumblebee-scan) with postinstall binary download
  • Add PyPI wrapper package (bumblebee-scan) with CLI entrypoint
  • Extend release workflow to auto-publish to npm and PyPI on tag push
  • Update README with npm/pip install instructions

- Add npm wrapper package (bumblebee-scan) with postinstall binary download
- Add PyPI wrapper package (bumblebee-scan) with CLI entrypoint
- Extend release workflow to auto-publish to npm and PyPI on tag push
- Update README with npm/pip install instructions

Requires NPM_TOKEN and PYPI_TOKEN repository secrets.
Copilot AI review requested due to automatic review settings May 27, 2026 16:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds distributable wrappers so bumblebee can be installed via npm and pip, and updates the release workflow to publish those artifacts alongside GoReleaser releases.

Changes:

  • Introduces a PyPI package that downloads (or go installs) the bumblebee Go binary on first run.
  • Introduces an npm package with a postinstall binary downloader (fallback to go install) and a JS shim for bumblebee.
  • Extends the GitHub Actions release workflow to publish to npm and PyPI; updates root docs and ignores build artifacts.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pypi-package/pyproject.toml Defines Python package metadata and console script entrypoint.
pypi-package/bumblebee_scanner/cli.py Implements the Python CLI wrapper that ensures the Go binary is present.
pypi-package/bumblebee_scanner/init.py Exposes package version.
pypi-package/README.md Documents PyPI install/usage.
pypi-package/LICENSE Adds Apache 2.0 license for PyPI package.
npm-package/scripts/install.js Downloads/extracts the released binary during npm postinstall (fallback to go install).
npm-package/package.json Defines npm package metadata, postinstall, and bin entrypoint.
npm-package/bin/bumblebee.js Node shim that executes the installed binary.
npm-package/README.md Documents npm install/usage.
npm-package/LICENSE Adds Apache 2.0 license for npm package.
README.md Adds npm/pip install instructions to the main project README.
.gitignore Ignores npm/pip build artifacts.
.github/workflows/release.yml Publishes npm and PyPI packages based on the release tag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

version = "0.1.1"
description = "Supply-chain inventory collector for package, extension, and developer-tool metadata on macOS and Linux."
readme = "README.md"
license = "Apache-2.0"
Comment on lines +42 to +46
with tarfile.open(tmp.name, "r:gz") as tf:
member = tf.getmember("bumblebee")
member.name = "bumblebee"
tf.extract(member, path=str(bin_dir))
os.chmod(str(_bin_path()), 0o755)
Comment on lines +36 to +50

try:
bin_dir = _bin_dir()
bin_dir.mkdir(parents=True, exist_ok=True)
with tempfile.NamedTemporaryFile(suffix=".tar.gz", delete=False) as tmp:
urllib.request.urlretrieve(url, tmp.name)
with tarfile.open(tmp.name, "r:gz") as tf:
member = tf.getmember("bumblebee")
member.name = "bumblebee"
tf.extract(member, path=str(bin_dir))
os.chmod(str(_bin_path()), 0o755)
os.unlink(tmp.name)
return True
except Exception:
return False
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const zlib = require("zlib");
Comment on lines +70 to +75
tar.on("close", (code) => {
if (code === 0) {
fs.chmodSync(binPath, 0o755);
resolve();
} else {
reject(new Error(`tar exited with ${code}`));
Comment thread npm-package/README.md Outdated
Comment on lines +1 to +8
# @perplexityai/bumblebee

npm wrapper for [bumblebee](https://github.com/perplexityai/bumblebee) — a read-only supply-chain inventory collector for package, extension, and developer-tool metadata on macOS and Linux.

## Install

```sh
npm install -g @perplexityai/bumblebee
Comment thread npm-package/README.md Outdated
Comment on lines +1 to +8
# @perplexityai/bumblebee

npm wrapper for [bumblebee](https://github.com/perplexityai/bumblebee) — a read-only supply-chain inventory collector for package, extension, and developer-tool metadata on macOS and Linux.

## Install

```sh
npm install -g @perplexityai/bumblebee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants