Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.74 KB

README.md

File metadata and controls

66 lines (42 loc) · 1.74 KB

Remove Bg CLI

The Remove Bg CLI tool is a powerful and efficient command-line utility designed to remove backgrounds from images seamlessly. It streamlines the process of isolating foreground objects by eliminating the background, providing users with clean, transparent images.

It's based on Rembg open-source package.

Installation

To install Remove Bg CLI, you will need to have Python and pip installed on your system. Run this command:

pip install -i https://test.pypi.org/simple/ remove-bg

It is important to note that this package is published on TestPyPI.

Usage

Unlike most utilities, Remove Bg uses a different name for its executable script: rmbg. This is done for simplicity.

Remove Bg has three commands: for, init and config.

To remove background for an image, use for command:

rmbg for cat.png

If you want to have a directory where you will place all the images you want to process, use init command to initialize this directory:

rmbg init

With this directory, you can run for command with --directory parameter and it will search for images in it:

rmbg for --directory cat.png

By default, init command creates remove-bg directory in your home directory, but you can change this with the config command:

rmbg config --directory ~/dir/images

Remove Bg CLI configuration can be found in ~/.config/rmbg.toml or in ~/.rmbg.toml.

If you want to get the value of a configuration parameter, use config command with --get option:

rmbg config --get directory

To see help, use the following command:

rmbg --help

You can also get help for a specific command:

rmbg for --help