VWS-CLI

A CLI for Vuforia Web Services.

Installation

With pip

Requires Python 3.12+.

pip install VWS-CLI

With Homebrew (macOS, Linux, WSL)

Requires Homebrew.

brew tap VWS-Python/vws
brew install vws-cli

Pre-built Linux binaries

curl --fail -L https://github.com/VWS-Python/vws-cli/releases/download/2024.2.21/vws -o /usr/local/bin/vws && \
chmod +x /usr/local/bin/vws
curl --fail -L https://github.com/VWS-Python/vws-cli/releases/download/2024.2.21/vuforia-cloud-reco -o /usr/local/bin/vuforia-cloud-reco && \
chmod +x /usr/local/bin/vuforia-cloud-reco

Shell completion

~/Documents ~> vws get-<TAB>
get-database-summary-report        (Get a database summary report.)
get-duplicate-targets  (Get a list of potential duplicate targets.)
get-target-record                            (Get a target record.)
get-target-summary-report            (Get a target summary report.)

Add this to ~/.bashrc:

eval "$(_VWS_COMPLETE=bash_source vws)"

Add this to ~/.zshrc:

eval "$(_VWS_COMPLETE=zsh_source vws)"

Run the following command:

_VWS_COMPLETE=fish_source vws > ~/.config/fish/completions/vws.fish

After modifying the shell configuration files, you need to start a new shell in order for the changes to be loaded.

Usage example

$ vws add-target \
    --server-access-key $SERVER_ACCESS_KEY \
    --server-secret-key $SERVER_SECRET_KEY \
    --name my_image_name \
    --width 2 \
    --image ~/Documents/my_image.png \
    --application-metadata $(echo "my_metadata" | base64) \
    --active-flag true
03b99df0-78cf-4b01-b929-f1860d4f8ed1
$ vws --help
...
$ vuforia-cloud-reco my_image.jpg \
    --max-num-results 5 \
    --include-target-data none
- target_id: b60f60121d37418eb1de123c381b2af9
- target_id: e3a6e1a216ad4df3aaae1f6dd309c800
$

Reference