npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cliproxyapi-brew-updater

v0.1.8

Published

CLIProxyAPI Homebrew updater for macOS that installs upstream GitHub release binaries while preserving brew services.

Readme

cliproxyapi-brew-updater: CLIProxyAPI Homebrew updater for macOS

cliproxyapi-brew-updater is an npm/npx CLI for macOS users who installed CLIProxyAPI with Homebrew. It updates a Homebrew-managed cliproxyapi service to the latest upstream GitHub release binary while preserving brew services and the Homebrew config path.

Use it when brew upgrade cliproxyapi is behind the upstream router-for-me/CLIProxyAPI release, but you still want to keep the Homebrew service workflow and /opt/homebrew/etc/cliproxyapi.conf configuration.

Why this exists

CLIProxyAPI publishes releases frequently, but the homebrew/core formula may not follow every upstream patch release immediately. In particular, Homebrew's formula can use livecheck throttling for high-frequency projects, so a release such as 6.9.36 may be available on GitHub while brew upgrade cliproxyapi still installs an older version.

Installing the upstream binary manually solves the version lag, but it creates a second problem: many users already run CLIProxyAPI with brew services and keep their config at Homebrew's config path, such as /opt/homebrew/etc/cliproxyapi.conf. Replacing the command naively can lose that service workflow or start CLIProxyAPI without the expected config file.

This package keeps the Homebrew workflow intact while using the upstream release binary. It updates the binary used by the Homebrew service, writes a small wrapper that passes the existing Homebrew config file, restarts the service when needed, and removes older manually installed release binaries.

What it does

  • updates Homebrew-installed CLIProxyAPI on macOS from upstream GitHub releases
  • keeps brew services start cliproxyapi and brew services restart cliproxyapi working
  • preserves the Homebrew config file path, including /opt/homebrew/etc/cliproxyapi.conf
  • supports Apple Silicon (darwin_arm64) and Intel (darwin_amd64) Macs
  • runs as a one-command npx cliproxyapi-brew-updater utility

Usage

Run the latest upstream release:

npx cliproxyapi-brew-updater

Run a specific version:

npx cliproxyapi-brew-updater 6.9.36
npx cliproxyapi-brew-updater v6.9.36

Inspect the current install without changing files:

npx cliproxyapi-brew-updater status
npx cliproxyapi-brew-updater doctor --json

Repair a partial or broken install:

npx cliproxyapi-brew-updater repair
npx cliproxyapi-brew-updater repair 6.9.36

Preview an update without changing files or services:

npx cliproxyapi-brew-updater --dry-run

The updater:

  • detects darwin_arm64 or darwin_amd64
  • downloads the matching GitHub release asset
  • verifies the release checksum
  • installs the upstream binary into the active Homebrew keg with an atomic temporary-file replacement
  • writes a cliproxyapi wrapper that passes: /opt/homebrew/etc/cliproxyapi.conf or ${HOMEBREW_PREFIX}/etc/cliproxyapi.conf
  • restarts brew services if cliproxyapi is already running
  • removes old cliproxyapi-* binaries from all local cliproxyapi kegs

Requirements

  • macOS
  • Homebrew
  • cliproxyapi installed with Homebrew
  • curl, tar, and shasum

Notes

brew upgrade cliproxyapi or brew reinstall cliproxyapi may replace the wrapper. Run this updater again afterward if Homebrew is still behind upstream.

FAQ

How do I update CLIProxyAPI when Homebrew is behind GitHub releases?

Run npx cliproxyapi-brew-updater. The updater resolves the latest CLIProxyAPI GitHub release, downloads the matching macOS binary, verifies its checksum, and installs it into the active Homebrew keg.

Does this replace Homebrew or stop using brew services?

No. The updater keeps the Homebrew-managed service entry. It replaces the service executable with a wrapper that runs the downloaded upstream CLIProxyAPI binary and passes the Homebrew config file path.

Can I install a specific CLIProxyAPI version?

Yes. Pass a version such as 6.9.36 or v6.9.36:

npx cliproxyapi-brew-updater 6.9.36

How do I check whether the updater needs to repair anything?

Run npx cliproxyapi-brew-updater status. It reports the wrapper target, current upstream version, latest upstream version, service state, and the count of old updater-installed release binaries across local Homebrew kegs. Use --json when another script needs to consume the result.

What does repair do?

repair reconciles the target version. It reuses the upstream binary when it is already present and reports the target version correctly, rewrites the Homebrew service wrapper, removes old release binaries, and restarts the service if it is currently running. If the existing binary fails validation, repair downloads and verifies a fresh release asset.

Can I preview changes before applying them?

Yes. Add --dry-run. The updater may still resolve release metadata, but it does not install binaries, rewrite wrappers, remove old files, or restart services.

License

MIT. See LICENSE.