# Overview

> Octelium documentation. Canonical page: <https://octelium.com/docs/octelium/latest/user/cli/overview>.

## Domain Environment Variable

Since `octelium` and `octeliumctl` CLIs are designed to work with multiple *Clusters* at the same time, and since a *Cluster* is defined and addressed by its domain, therefore `octelium` and `octeliumctl` commands need the `--domain` flag as follows:

```bash
octelium get service --domain <DOMAIN>
```

However, this might become exhausting especially if you do many commands for the same *Cluster*, therefore you can just set your domain once as an environment variable as follows:

```bash
export OCTELIUM_DOMAIN=example.com
```

Or in Windows PowerShell as follows:

```powershell
$env:OCTELIUM_DOMAIN = "example.com"
```

Now you can do all your commands without having to add the `--domain` flag every time as follows:

```bash
octelium get service
octelium status
octelium connect
```

## Listing Resources

You can list the *Cluster*'s *Namespaces* as follows:

```bash
octelium get namespace
# OR
octelium get ns
```

You can also list the *Cluster*'s *Services* as follows:

```bash
octelium get service
# OR
octelium get svc
```

You can also filter the list of *Services* by a specific *Namespace* via the `--namespace` or `-n` flag as follows:

```bash
octelium get svc --namespace default
# OR
octelium get svc -n production
```

By default, the list is ordered by the creation date. You can, however, set order the list by name as follows:

```bash
octelium get svc --order-by-name
```

You can also reverse the order of the list as follows:

```bash
octelium get svc --order-by-name --order-reverse
```

You can also set the page and number of items per page for the list as follows:

```bash
octelium get svc --items-per-page 10 --page 3
```

By default, the output of a `octeliumctl get` command is formatted as a table. You can force the output to be formatted as YAML as follows:

```bash
octelium get svc -o yaml
# OR
octelium get svc -o yml
```

You can also force the output to be formatted as JSON as follows:

```bash
octelium get svc -o json

# You can also use jq
octelium get svc -o json | jq
octelium get sess -o json | jq -r .items[0].metadata.uid
```

## CLI Upgrade

You can also check whether there is a new latest version available for your Octelium clients as follows:

```bash
octelium version --check
# OR
octeliumctl version --check
```

## Debugging Mode

You can see the debug logs of your `octelium` and `octelium` commands by enabling the debug mode. This can be especially useful to debug the `octelium connect` command in case of any connection issues. Here is an example:

```bash
export OCTELIUM_DEV=true
octelium connect
```

## Disable TLS Verification

You can also disable verifying the *Cluster*-side TLS certificates by using the `OCTELIUM_INSECURE_TLS` environment variable. This can be useful for debugging, testing, troubleshooting use cases where the *Cluster*'s TLS certificate has not been issued yet or simply expired.

```bash
export OCTELIUM_INSECURE_TLS=true
octelium status
```

## Multiple Profiles

You can use the `OCTELIUM_HOME` environment variable to explicitly set a custom home **directory** for the `octelium` and `octeliumctl` CLIs. You can use this environment variable to effectively switch between multiple "profiles" for the same *Cluster* or for multiple *Clusters*.

```bash
export OCTELIUM_DOMAIN=example.com

# Default profile
octelium status

# Use the directory "/tmp/profile-1"
export OCTELIUM_HOME=/tmp/profile-1
octelium status

# Use the directory "/tmp/profile-2"
export OCTELIUM_HOME=/tmp/profile-2
octelium status
```
