For the complete documentation index, see llms.txt. This page is also available as Markdown.

Command line interface

Overview

The Blurit CLI lets you interact with Blurit On-Premise. It covers two distinct jobs:

  • Operating the stack on the server — requirements, install, start, stop, restart, status, uninstall, create-superadmin. These commands drive Docker on the local machine and only work on the Linux server hosting Blurit.

  • Talking to a running instance — license, tasks, stats, doc. These commands call the Blurit API over HTTP and can be run from any machine that can reach the instance.

The blurit binary is shipped in the archive you received; see Linux dependencies for how to run it.

blurit [OPTIONS] COMMAND [ARGS]...

Operating the stack

These commands must be run on the machine hosting Blurit.

Start

Start the Blurit stack. The CLI waits until every service is running.

blurit start

Restart

Restart the Blurit stack.

blurit restart

Stop

Stop the Blurit stack.

Status

Display the state of each service of the stack, with its number of running replicas.

Uninstall

Remove the Blurit stack from the machine.

Talking to a running instance

Every command in this section accepts the same two options:

  • -h, --host TEXT Host to contact. Defaults to localhost. Accepts a host and port (127.0.0.1:80) or a full URL for a remote instance (https://blurit.example.com).

  • -o [json] Output the raw API response as JSON instead of a table.

When --host has no scheme, the CLI reads the local compose file to decide between http and https.

License

Manage the Blurit license.

info

Display all Blurit license information.

Response:

set

Upload or update the Blurit On-Premise license. Pass the license file you received, or its content with --content. blurit license add is an alias of this command.

options:

  • -c, --content TEXT Pass the license content directly instead of reading it from LICENSE_FILE.

Example:

Response:

Tasks

Manage Blurit anonymization tasks.

create

Create a new Blurit task.

arguments:

  • INPUT For the file and zip input types, the local path of the media. For the directory input type, a sub-directory of the input directory configured on the Blurit server.

  • OUTPUT Optional. Sub-directory of the output directory configured on the Blurit server. It must already exist.

input and output options:

  • --input-type [file|zip|directory] Local file, local zip archive, or a directory located on the Blurit server. Default: file.

  • --input-storage [local|s3] local means on the Blurit server. s3 requires the S3 configuration to have been done at install time, and only works with the directory input type. Default: local.

  • --output-storage [local|s3] Same, for the output. Default: local.

anonymization options:

  • --face-blur / --no-face-blur Activate face blur. Default: enabled.

  • --plate-blur / --no-plate-blur Activate plate blur. Default: enabled.

  • --anonymization-type [blur|pixelate|opaque] Anonymization to apply. Default: blur.

  • --shape [object|box] Anonymize the detected object itself, or its wrapping box. Default: object.

  • --safe-margin FLOAT Extension size around the detection area, between 0.1 and 1. Default: 0.5.

  • --blur-strength FLOAT Blur strength, between 0.1 and 1. blur type only. Default: 0.5.

  • --edge-smoothing FLOAT Smooth the edge of the detection area, between 0.1 and 0.2. blur type only. Default: 0.15.

  • --num-pixels INTEGER Number of pixels, between 1 and 10. pixelate type only. Default: 5.

  • --hex-color TEXT Color of the overlay, # may be omitted. opaque type only. Default: 000000.

  • --keep-audio / --no-keep-audio Keep the audio track in the output media. Default: enabled.

output options:

  • --output-detection-url / --no-output-detection-url Generate a JSON file containing all detected areas. file and zip input types only. Default: enabled.

  • --add-output-suffix / --no-add-output-suffix Add an _anonymized suffix to the output file name. file and zip input types only. Default: enabled.

  • --add-report / --no-add-report Add a CSV report of all processed files to the output zip. zip input type only. Default: disabled.

  • --save-unknown-files / --no-save-unknown-files Reintegrate unknown file types (text files, binaries, …) into the output zip. zip input type only. Default: disabled.

  • --auto-delete / --no-auto-delete Delete the input media once processed. directory input type only. Default: disabled.

Example: anonymize a local video, blurring only the plates:

Example: process a directory located on the Blurit server:

Response:

status

Get the status of a task from its ID.

return:

  • Succeeded

  • Started

  • Sent

  • Failed

Example:

Response:

list

List the task history.

options:

  • --page TEXT Page number.

  • --count TEXT Number of results per page. Default: 10.

  • --from TEXT First date displayed, format Y-m-d.

  • --to TEXT Last date displayed, format Y-m-d.

  • --filetype [picture|video|directory] Filter on the file type.

Response:

Stats

Display total and period (month, day) statistics.

options:

  • --from TEXT First date, format Y-m-d.

  • --to TEXT Last date, format Y-m-d.

  • --granularity [day|month] Display statistics by month or by day.

--from is required as soon as you ask for a period.

Response:

Doc

Display the links to the documentation.

options:

  • -h, --host TEXT Specify the host.

response:

Miscellaneous

Version

Display the version of the CLI itself. This is not the version of the Blurit application.

Help

Display the list of commands. blurit --help does the same, and blurit COMMAND --help details a single command.

Output Format

The Blurit CLI supports two output formats: text (default) and JSON. Add -o json to any command of the "Talking to a running instance" section to get the raw API response.

Example:

Response:

Support and Contribution

If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at support@blurit.io. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.

Last updated