bveCLI can load the login credentials for a target BVE API server from a configuration (preferences) file located under the user's home directory. On Linux/Solaris this can be accessed as $HOME/.bveapirc
while on Windows it is accessible as %HOME%\.bveapirc
. bveCLI can load a configuration file located at an alternate location using the --config
parameter. The configuration file has the following general format:
[n.n.n.n]
_default=user1
user1=password1
where n.n.n.n
is the fully-qualified domain name or IP address of the BVE server. The configuration file can support multiple sections, each represented with its own BVE server address. The default user ID for a server is specified using the _default
property. If specified, upon connecting to the server, bveCLI attempts to log in as the specified user. The password for this or other users are specified within the same section as name-value pairs. You may specify multiple credential pairs and the correct password will be looked up when logging into the API server using the corresponding user.
Example: $HOME/.bveapirc
[myServer1]
_default=admin
admin=secret1
demo1=letmein
[yourServer2]
visitor=public1
When bveCLI is launched as bveCLI.pl --host myServer1
, the tool attempts to log into the server as user admin
using password secret1
automatically. Alternatively, bveCLI.pl --host myServer1 --user demo1
results in automatic login using the password letmein
. Finally, when launched as bveCLI.pl --host yourServer2
, the tool establishes a connection to the server but does not attempt to automatically log into it.