Homebrew
brew tap Arthur-Ficial/tap brew install Arthur-Ficial/tap/bgbgone bgbgone --version bgbgone --check bgbgone photo.jpg > cutout.png
Already installed? brew upgrade bgbgone.
The UNIX-style background remover for macOS. Apple Vision on-device. No cloud, no API keys, no GUI side-effects.
$ brew install Arthur-Ficial/tap/bgbgone
Apple Silicon · macOS 26+ · source on GitHub
Same CLI invocation against sixteen strict-public-domain Wikimedia subjects: photography, painting, spacecraft, woodblock print, vintage product ad. Zero per-image tuning.
$ bgbgone in.jpg > out.png · 16 strict-PD subjects · zero config
Each tile is one bgbgone subject.jpg --bg image:scene.jpg -o panel.jpg. Every subject AND every background is documented public-domain: NASA / JPL-Caltech, Wikimedia PD-old, ESA-Hubble, JWST.
Every knob, on the same studio portrait — feather 0 → 16 px, then crop, padding, shadow and the raw alpha matte (--mask-only). The compositor blends with that matte to produce every other output on this page.
--feather · --crop · --padding · --shadow · --mask-only
Apple Vision exposes three public segmentation primitives. auto = foreground-instance mask; person = portrait segmenter; saliency = objectness heat map. Unsupported names are rejected at parse with exit code 2 — never silently routed.
--algo vn-mask · person · saliency
Every Mac since macOS 14 ships VNGenerateForegroundInstanceMaskRequest — only callable from Swift. bgbgone is the thin, hard-tested CLI that wraps it.
# single cutout to a transparent PNG $ bgbgone photo.jpg > out.png # brand background, JPEG, tight crop, soft edge $ bgbgone selfie.jpg --bg color:#0066cc --crop --feather 2 \ --to jpg --quality 95 -o avatar.jpg # batch a folder, stream NDJSON for jq $ ls *.heic | xargs -I{} bgbgone {} --ndjson --out-dir ./out/ \ | jq -s 'group_by(.algo) | map({algo: .[0].algo, n: length})' # pipe into auge for cleaner downstream classification $ bgbgone in.jpg --bg color:black --to jpg -o /tmp/c.jpg \ && auge --classify /tmp/c.jpg --top 3
NetworkGuard registers a URLProtocol that intercepts http / https / ws / wss inside the process and exits with code 3 if anything tries.
60 unit tests on the pure-Swift core (no XCTest, no Testing framework). 15 integration tests spawning the real binary across all 16 PD fixtures.
100-image performance harness: 11.6 images/s, 86 ms/image on Apple Silicon. One make perf-100 guards the regression.
Apple Silicon, macOS 26+. No Xcode required.
brew tap Arthur-Ficial/tap brew install Arthur-Ficial/tap/bgbgone bgbgone --version bgbgone --check bgbgone photo.jpg > cutout.png
Already installed? brew upgrade bgbgone.
git clone https://github.com/Arthur-Ficial/bgbgone cd bgbgone make install # bumps patch, builds release, # installs to /usr/local/bin
Regenerate README assets with make readme-images; ship with make release.
On-device CLI tools for Apple frameworks Apple never wrapped. Each one is one binary, one purpose.
| Tool | Capability | Apple framework |
|---|---|---|
| apfel | LLM (text generation) | FoundationModels |
| auge | Vision / OCR | Vision |
| bgbgone (this) | Background removal | Vision + Core Image |
| ohr | Speech-to-text | SpeechAnalyzer |
| kern | Embeddings | NLContextualEmbedding |