> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idyl.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure the CLI

> Use contexts and flags to control where CLI commands run.

The CLI uses a context to decide which account, profile, namespace, and subnet a command applies to.

Use `idyl whoami` to inspect the active context:

```bash theme={null}
idyl whoami
```

## Update saved context values

Set default values when you want future commands to use the same namespace or subnet:

```bash theme={null}
idyl context edit --set-namespace <namespace>
idyl context edit --set-subnet <subnet>
```

Only the values supplied by flags are changed.

## Override context for one command

Many commands accept context flags. Use them when a command should run against a different account, namespace, subnet, or saved context without changing your defaults.

| Setting       | Flag                 |
| ------------- | -------------------- |
| Account       | `--account-id <id>`  |
| Saved context | `--context <name>`   |
| Namespace     | `--namespace <name>` |
| Profile       | `--profile <name>`   |
| Realm         | `--realm <realm>`    |
| Subnet        | `--subnet <slug>`    |

Example:

```bash theme={null}
idyl get deployment web --namespace <namespace> --subnet <subnet>
```

## Use a different configuration directory

Use `--homedir` when you need a command to read configuration from a different IDYL directory:

```bash theme={null}
idyl whoami --homedir <path>
```

By default, the CLI uses `~/.idyl`.
