1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# lavacli
[lavacli] is a command line tool to interact with one or many LAVA instances
using XML-RPC.
## Install
### Debian
A package is provided for both Debian and Ubuntu:
```shell
apt-get install lavacli
```
### Pypi
lavacli is also available on PyPi:
```shell
python3 -m pip install lavacli
```
## Configure
### Create a token
In order to access to restricted API methods, lavacli will need a `token` to authenticate.
In the web interface, go to [/api/tokens/](/api/tokens/).

Click on `new` to create a token.

In the modal, you can add a description to the new token. This description
can be left empty for the moment.

The token has been created, click on the green eye icon and copy the value
shown in the modal dialog.

### Create an identity
You can now add this token to lavacli identities with:
```shell
lavacli identities add --uri https://<lava-server>/RPC2/ \
--username <username> \
--token <token> \
myserver
```
### Use the identity
In order to use the identity, call `lavacli -i myserver <command>`.
!!! tip "default identity"
If the identity is called `default` lavacli will use it for every command.
`lavacli -i default <command>` and `lavacli <command>` will use the same identity.
## Help
For more information, refer to the [lavacli documentation][lavacli].
--8<-- "refs.txt"
|