# CLI Installation

### Download CLI

<figure><img src="https://2983949833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzRZpxg1UUX5iPuJAfelm%2Fuploads%2F2wm6J72XBWP8UAIMAzOM%2Fimage.png?alt=media&#x26;token=08142535-10e4-4789-b231-39e8bdf86c49" alt=""><figcaption></figcaption></figure>

1. Logon to SBOM360 portal (<https://app.veedna.com>)
2. Click on "Integrations" icon
3. Click on "Download CLI"
4. Click on "Download SBOMDetect CLI" link
5. Extract the CLI with the below steps

```
# Run these commands as a regular user
# Extract the veecli.tar.gz
ubuntu@ip-a.b.c.d:~$ tar -xzf veecli.tar.gz
# This will create a directory called veecli
ubuntu@ip-a.b.c.d:~$ cd veecli
# Run pre.sh to set the permissions of the CLI and associated files
ubuntu@ip-a.b.c.d:~$ bash pre.sh
```

6. Go back to SBOM360 portal and click on "Verify Device" (Step-2)

<figure><img src="https://2983949833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzRZpxg1UUX5iPuJAfelm%2Fuploads%2FmdjsCWCUVTW7JLXw2sQE%2Fimage.png?alt=media&#x26;token=5b5cc16a-55b6-4db1-aa6d-a2563cc2c547" alt=""><figcaption></figcaption></figure>

7. Click on "Verify Link" and a device confirmation code will appear

<figure><img src="https://2983949833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzRZpxg1UUX5iPuJAfelm%2Fuploads%2FKdsA2U8hvIbMbuhFysGZ%2Fimage.png?alt=media&#x26;token=52850780-9f5d-48a8-9f38-f7606b4b8380" alt=""><figcaption></figcaption></figure>

7. Click on “Confirm”
8. Provide the SBOM360 credentials when prompted the login page. If credentials are cached, then it may not prompt for the SBOM360 credentials again.

### Register CLI

1. Once the device registration is successful, a code will be displayed in SBOM360 portal. The device registration code is valid only for 5 min. If it expires, click on "Verify Device"->"Verify Link" again to get a new code.

<figure><img src="https://2983949833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzRZpxg1UUX5iPuJAfelm%2Fuploads%2F7lwEc6j6wIr3B1QhfbMN%2Fimage.png?alt=media&#x26;token=985b306b-e6de-4969-b8ad-368f3d434d27" alt=""><figcaption></figcaption></figure>

2. Run the following commands from your ubuntu machine where CLI is extracted

```
# Run these commands as a regular user
# Go inside the directory where CLI is extracted
ubuntu@ip-172-31-26-185:~$ cd veecli
# Register the CLI with the SBOM360 backend using the device code obtained from portal
ubuntu@ip-172-31-26-185:~$ ./veecli register --devicecode npbP_fImda2Cj_Hzk9LgxJUn
2022-07-07T14:18:15.584+0300 info Starting to register veeCLI
2022-07-07T14:18:16.924+0300 info Successfully configured authentication
2022-07-07T14:18:16.924+0300 debug Signature in auth0 access token payload is 
unknown
2022-07-07T14:18:16.933+0300 info Authenticated for Tenant Name - ******, Tenant 
Id - vdna_************** and Device Code - npbP_fImda2Cj_Hzk9LgxJUn
2022-07-07T14:18:16.934+0300 info Successfully registered veeCLI
```

<br>

<br>
