Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go

> 编程语言
Open source

Go-based command-line tool for the remove.bg API

138.8K stars0 likes1 views
WebsiteGitHub

About

Go-based command-line tool for the remove.bg API

remove.bg CLI 2.0

⚠️ This repository is archived! Please read the message below.

We released a new version of the remove.bg CLI. You can download it here: https://github.com/remove-bg/remove-bg-cli The go version of our CLI is no longer maintained nor supported.


remove.bg CLI Installation Download

You can download latest stable release (Windows, Mac, and Linux supported) Homebrew deb / rpm

Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i.

For the latest deb package supporting x86-64 you can also run:

Usage API key

To process images you'll need your remove.bg API key.

To use the API key for all requests you can export the following environment variable in your shell profile (e.g. ~/.bashrc / ~/.zshrc):

Alternatively you can specify the API key per command: Processing a directory of images Saving to the same directory (default)

If you want to remove the background from all the PNG and JPG images in a directory, and save the transparent images in the same directory:

Given the following input:

The result would be: Saving to a different directory (--output-directory)

If you want to remove the background from all the PNG and JPG images in a directory, and save the transparent images in a different directory:

Given the following input:

The result would be: CLI options

  • --api-key or REMOVE_BG_API_KEY environment variable (required).

  • --output-directory (optional) - The output directory for processed images.

  • --reprocess-existing - Images which have already been processed are skipped by default to save credits. Specify this flag to force reprocessing.

  • --confirm-batch-over (default 50) - Prompt for confirmation before processing batches over this size. Specify -1 to disable this safeguard. Image processing options

Please see the API documentation for further details.

  • --size (default auto)
  • --type
  • --channels
  • --bg-color
  • --format (default: png)
  • --extra-api-options for forwarding any unlisted/new options to the API
    • Formatted as a URI encoded string (= between key/value, delimited with &)
    • e.g. --extra-api-options 'crop=true&add_shadow=true' Examples Development

Prerequisites:

  • go 1.14
  • dep

Getting started:

To build & try out locally: Releasing a new version

  • Install goreleaser
  • Create a Github token with repo access
  • Run the release script:

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gocommand-line-toolremovebg

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言