Install, activate, and run the CLI with confidence.
Follow this guide in order: install, activate, verify, then run your first image.
1) Install CLI
Run installer and verify the binary.
curl -fsSL https://local.backgroundrm.com/install | bashrmbg --version2) Activate license
Activate your CLI key on this machine.
rmbg license activate --key YOUR_KEY --surface cli --format jsonrmbg license status --surface cli --format json3) Run first image
Ensure model files, then process an input image.
rmbg model ensure --surface cli --format jsonrmbg remove --surface cli --input ./input.jpg --output ./input_rmbg.png --format jsonCommand reference
Core commands you will use most often.
Download and install the latest macOS CLI build
Creates an rmbg symlink in ~/.local/bin by default.
curl -fsSL https://local.backgroundrm.com/install | bashActivate your CLI entitlement on this machine
Required before running model ensure or remove.
rmbg license activate --key YOUR_KEY --surface cli --format jsonRead local activation state for the CLI surface
Useful for health checks in scripts and CI.
rmbg license status --surface cli --format jsonBootstrap the local model if files are missing
Defaults to ~/.cache/background-removal/models/birefnet.
rmbg model ensure --surface cli --format jsonRemove a background from one image
Input accepts local paths and http/https image URLs.
rmbg remove --surface cli --input ./input.jpg --output ./input_rmbg.png --format jsonShow top-level command help
Use rmbg <command> --help for command-specific docs.
rmbg --helpDesktop + CLI workflow
For bundle workflows, require both surfaces before processing.
Use both licenses for bundle workflows
Require desktop and CLI surfaces when your automation depends on both.
rmbg remove --surface cli --require-surface desktop --input ./input.jpg --output ./input_rmbg.png --format jsonExit codes
Use these for shell scripts and automation logic.
0Success
2Input image read or validation failure
3Model bootstrap or model availability failure
4Inference failure
5Output image write failure
6License activation or validation failure
Built-in help
See every flag directly from the CLI.
rmbg --helprmbg remove --help