← All migration guides

Migration guide · command line

LassoCut CLI: replace the remove.bg command-line tool

The remove.bg CLI calls the remove.bg API, which closes on 1 December 2026. The LassoCut CLI works like the remove.bg CLI and uses an API compatible with the remove.bg API: same flags, same -removebg file names, same behaviour on folders. Your scripts only need a new command name and a new key.

1. Install it

Needs Node.js 18 or later. One file, no dependencies.

npm install -g lassocut-cli

Or run it once without installing: npx lassocut-cli photo.jpg.

2. Sign in

lassocut login

Your browser opens LassoCut: sign in with GitHub or Google and approve. The CLI saves its own key; nothing to copy. Every account gets 50 free previews a month (up to 10 a day). On a server without a browser, create a key in your account and set LASSOCUT_API_KEY instead.

If your environment already sets REMOVE_BG_API_KEY, the CLI reads it too: put your LassoCut key in it and nothing else changes. --api-key also works.

3. Change the command name

- removebg --size full --output-directory out/ photos/*.jpg
+ lassocut --size full --output-directory out/ photos/*.jpg

In a shell script with many calls, an alias is enough: alias removebg=lassocut.

Flags

FlagStatusNotes
--api-keySameOr LASSOCUT_API_KEY, or REMOVE_BG_API_KEY
--size, --type, --format, --channelsSameSame values as the API
--bg-color, --bg-image-fileSame
--output-directorySameResults keep the -removebg suffix
--reprocess-existingSameWithout it, images already done are skipped
--confirm-batch-overSameAsks before a large batch
--extra-api-optionSameAny other API parameter
--api-url, --output-suffix, --concurrencyNewDefault concurrency is 4; 429 and 503 answers are retried automatically

Full list: lassocut --help, or the source on github.com/jaupin94/lassocut-cli (MIT licence).

Marketplace presets and cast shadow

From version 1.2.0, --preset amazon (or ebay, etsy, shopify, zalando, instagram) frames the photo to that marketplace's image rules and saves a .jpg. Add --shadow cast, with --light (-90 to 90, positive = light from the left), --shadow-length (short, medium or long) and --shadow-strength (0 to 100). --format, --bg-color and the crop flags are refused together with --preset. Example: lassocut --preset shopify --shadow cast --light 30 "shots/*.jpg". See marketplace presets.

Questions

Is it a copy of the remove.bg CLI?

No. It is written from scratch by LassoCut and only follows the same flags, so your scripts keep working.

Can I keep calling remove.bg with it?

Yes, until the API closes: --api-url https://api.remove.bg/v1.0. Handy to compare results on your own images.

No Node.js on the machine?

Use the batch tool in the browser, or call the API directly with curl as shown in the API migration guide.