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 startRestart
Restart the Blurit stack.
blurit restartStop
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 TEXTHost to contact. Defaults tolocalhost. 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 TEXTPass the license content directly instead of reading it fromLICENSE_FILE.
Example:
Response:
Tasks
Manage Blurit anonymization tasks.
create
Create a new Blurit task.
arguments:
INPUTFor thefileandzipinput types, the local path of the media. For thedirectoryinput type, a sub-directory of the input directory configured on the Blurit server.OUTPUTOptional. 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]localmeans on the Blurit server.s3requires the S3 configuration to have been done at install time, and only works with thedirectoryinput type. Default:local.--output-storage [local|s3]Same, for the output. Default:local.
anonymization options:
--face-blur / --no-face-blurActivate face blur. Default: enabled.--plate-blur / --no-plate-blurActivate 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 FLOATExtension size around the detection area, between 0.1 and 1. Default:0.5.--blur-strength FLOATBlur strength, between 0.1 and 1.blurtype only. Default:0.5.--edge-smoothing FLOATSmooth the edge of the detection area, between 0.1 and 0.2.blurtype only. Default:0.15.--num-pixels INTEGERNumber of pixels, between 1 and 10.pixelatetype only. Default:5.--hex-color TEXTColor of the overlay,#may be omitted.opaquetype only. Default:000000.--keep-audio / --no-keep-audioKeep the audio track in the output media. Default: enabled.
output options:
--output-detection-url / --no-output-detection-urlGenerate a JSON file containing all detected areas.fileandzipinput types only. Default: enabled.--add-output-suffix / --no-add-output-suffixAdd an_anonymizedsuffix to the output file name.fileandzipinput types only. Default: enabled.--add-report / --no-add-reportAdd a CSV report of all processed files to the output zip.zipinput type only. Default: disabled.--save-unknown-files / --no-save-unknown-filesReintegrate unknown file types (text files, binaries, …) into the output zip.zipinput type only. Default: disabled.--auto-delete / --no-auto-deleteDelete the input media once processed.directoryinput 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 TEXTPage number.--count TEXTNumber of results per page. Default:10.--from TEXTFirst date displayed, formatY-m-d.--to TEXTLast date displayed, formatY-m-d.--filetype [picture|video|directory]Filter on the file type.
Response:
Stats
Display total and period (month, day) statistics.
options:
--from TEXTFirst date, formatY-m-d.--to TEXTLast date, formatY-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 TEXTSpecify 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