Skip to content

CLI

Installing vars-client also installs a vars-client command.

login

Logs in to Raziel with Basic-auth credentials, exchanges them for a portable encoded-credentials blob (see Auth), and saves it to the canonical ~/.vars/raziel.txt -- so VARSClient.default() and any other VARS app on the machine can connect afterwards with no further login:

vars-client login https://raziel.example.org

You'll be prompted for a username and password interactively. Pass --username to skip the username prompt, and --password-stdin to read the password from stdin instead of prompting for it (for scripting):

echo "$RAZIEL_PASSWORD" | vars-client login https://raziel.example.org --username alice --password-stdin

Use --path to save somewhere other than the default:

vars-client login https://raziel.example.org --path ./raziel.txt

Invalid credentials print an error and exit with a non-zero status rather than writing a file.