# CLI

> **Deprecation Notice**
> This page describes features that have been removed or replaced in Luxonis Hub. Functionality may be limited and only available
to Hub Original customers. Please refer to the up-to-date guides to provision devices, manage fleets, and deploy applications.

The Luxonis Hub Agent comes with a command-line interface (CLI) that allows you to interact with and manage the agent and its
connected devices. This section covers the usage and available commands for the CLI.

To use the CLI, open your terminal and run the following command:

```bash
hubctl [command] [options]
```

Replace [command] with one of the available commands described below and [options] with any applicable command-specific options.

## General commands

version - Prints the version of the Luxonis Hub Agent.

An example:

```bash
$ hubctl version
Installed agent version: 24.55.1308
```

status - Prints the status of the Luxonis Hub Agent.

An example:

```bash
$ hubctl status
╔═══════════════════════════════════════════════════════════════╗
║                                                               ║
║ Luxonis Hub Agent (24.55.1308 | linux/arm64 | DepthAI 2.21.2) ║
║                                                               ║
╚═══════════════════════════════════════════════════════════════╝

Web UI                   https://localhost:9010
DepthAI                  2.21.2

Connected to cloud?      yes (https://hub.luxonis.com)
Team                     Luxonis
Pending detections       0

Link to robot in cloud
https://hub.luxonis.com/robots/00000000-0000-0000-0000-000000000000
```

start - Starts the Luxonis Hub Agent.

Requires root privileges

An example:

```bash
$ sudo hubctl start
```

stop - Stops the Luxonis Hub Agent.

Requires root privileges

An example:

```bash
$ sudo hubctl stop
```

restart - Restarts the Luxonis Hub Agent.

Requires root privileges

An example:

```bash
$ sudo hubctl restart
```

startup - Enables or disables automatic launch of the Luxonis Hub Agent on startup.

Arguments:

 * enable enables automatic launch
 * disable disables automatic launch

An example:

```bash
$ hubctl startup enable
```

logs - Displays logs from the Luxonis Hub Agent.

Options:

 * -f, --follow do not terminate, keep following the logs (default: false)
 * -a, --all prints all available logs (consider piping to less) (default: false)
 * -l, --last <lines> how many lines (from the end to print) (default: "20")
 * --since <linux date> filter since
 * --until <linux date> filter until
 * --format <json|pretty|plain> choose format of logs (default: "pretty")

An example:

```bash
$ hubctl logs
63 23:05:28  I  user/agent/hub-connection : received see_you
63 23:05:31  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
63 23:05:36  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
63 23:05:41  I  user/agent/apps/logs : uploading app logs to RH | pending -> 0
```

upload-support - Uploads a support file to Luxonis. Please provide the hash printed at the end to our support team.

An example:

```bash
$ hubctl upload-support
File has been uploaded with hash: f0a83c01bc4c7c7f0bd466d6cca2ec9071f8c267e6e65385f744e94f1caa734d
```

reset - Resets the Luxonis Hub Agent to its post-installation state.

Requires root privileges

An example:

```bash
$ sudo hubctl reset --i-understand-consequences --keep-robot-in-cloud
```

## Cloud commands

cloud connect - Connects the Luxonis Hub Agent to Luxonis Hub.

An example:

```bash
$ hubctl cloud connect
Already connected to cloud (team Luxonis). Disconnect first to connect again.
hubctl cloud disconnect
```

cloud disconnect - Disconnects the Luxonis Hub Agent from Luxonis Hub.

An example:

```bash
$ hubctl cloud disconnect
```

cloud force-sync - Forces manual synchronization with Luxonis Hub.

An example:

```bash
$ hubctl cloud force-sync
```

## Devices commands

devices - Displays a list of devices connected to the Luxonis Hub Agent.

An example:

```bash
$ hubctl devices
┌────────────────────┬────────────────────┬───────────────────────┬──────────┬─────────┬──────────────────┬──────┐
│ serial             │ name               │ product               │ location │ status  │ connectionStatus │ app  │
├────────────────────┼────────────────────┼───────────────────────┼──────────┼─────────┼──────────────────┼──────┤
│ 18443010116C870E00 │ 18443010116C870E00 │ OAK-D-PRO-FF (DM9098) │ USB 2.1  │ success │ ready            │ none │
└────────────────────┴────────────────────┴───────────────────────┴──────────┴─────────┴──────────────────┴──────┘
```

## Apps commands

apps list - Displays a list of installed apps.

An example:

```bash
$ hubctl apps list
┌──────────────────────────────────────┬─────────┬─────────┬──────────────────────────┬────────────┐
│ id                                   │ type    │ status  │ started at               │ stopped at │
├──────────────────────────────────────┼─────────┼─────────┼──────────────────────────┼────────────┤
│ bfeb4f73-f503-458a-8c24-b88258f9523a │ builtin │ Running │ 2024-03-01T08:15:33.282Z │            │
└──────────────────────────────────────┴─────────┴─────────┴──────────────────────────┴────────────┘
```
