> ## 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.

# Accounts, profiles, and contexts

> How IDYL chooses the account, permissions, namespace, and subnet for CLI commands.

Most IDYL commands run inside an account and use a saved CLI context.

A context keeps the selections that are needed for normal CLI use: realm, identity, account, profile, namespace, and subnet. Use `idyl whoami` or `idyl context show` to review the active context before creating or changing resources.

## Identity

An identity is the authenticated user or token used for a request.

Interactive users normally authenticate with `idyl login`. Automation can use tokens created through IAM. The identity determines who is asking IDYL to perform an action.

## Account

An account is the primary ownership boundary for IDYL resources.

Workload resources, namespaces, subnets, fleets, and IAM configuration are evaluated in relation to an account. A user can have access to more than one account.

Accounts are global. Regional placement is selected through subnets, not by creating separate regional accounts.

## Profile

A profile defines the permissions available when you act in an account.

Use `idyl profile list` to see profiles available to the active identity. Use `idyl use` or a context command to switch to a different account and profile combination.

## Context

A context is a named CLI configuration. It does not create permissions by itself; it selects an identity, account, profile, namespace, and subnet for commands.

Commands can override context values with flags such as `--account-id`, `--profile`, `--namespace`, and `--subnet`.

## Namespace and subnet selection

Namespace and subnet answer different questions:

| Selection | Question it answers                                                          |
| --------- | ---------------------------------------------------------------------------- |
| Namespace | Which group of workload resources should this command operate on?            |
| Subnet    | Where should this workload run, or which subnet should this command inspect? |

Set saved values when most commands should use the same target:

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

Use command flags when one command should use a different target.

## Related guides

* [Get started with the CLI](/cli/get-started)
* [Global accounts and regions](/concepts/global-accounts-and-regions)
* [Configure the CLI](/cli/configure)
* [Authentication and access](/cli/authentication)
