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

# idyl init

> Initialize the IDYL CLI for a realm

Configure the CLI for an IDYL realm without authenticating.

This command configures the realm endpoints (identity, global API, meta) and
saves the realm configuration to \<idyl-home>/realms/\<realm>/realm.yaml. It does
not authenticate; run 'idyl login' to sign in.

For CI environments, initialize the realm and provide a service account token
through the environment:
idyl init --realm idyl.network
export IDYL\_TOKEN=\<service-account-token>
export IDYL\_ACCOUNT=\<account-id>
idyl deploy myapp:latest --name myapp --subnet \<subnet>

For interactive use, prefer 'idyl login', which includes init.

## Usage

```bash theme={null}
idyl init [flags]
```

## Flags

| Flag                       | Description                                                       |
| -------------------------- | ----------------------------------------------------------------- |
| `--globalapi-url <string>` | Override the global API URL for accounts, organizations, and IAM. |
| `--identity-url <string>`  | Override the identity service URL.                                |
| `--meta-url <string>`      | Override the meta service URL used for subnet discovery.          |
| `--realm <string>`         | Realm to initialize. Defaults to idyl.network.                    |

## Inherited flags

| Flag                                 | Description                                                        |
| ------------------------------------ | ------------------------------------------------------------------ |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context.                 |
| `-c <string>, --context <string>`    | Use the named context for this command.                            |
| `--homedir <string>`                 | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-n <string>, --namespace <string>`  | Namespace to use for this command.                                 |
| `-o <string>, --output <string>`     | Output format (json\|yaml).                                        |
| `-p <string>, --profile <string>`    | Override the access profile for this command.                      |
| `--subnet <string>`                  | Override the context subnet for this command.                      |

## Examples

```bash theme={null}
# Initialize for the default realm
idyl init --realm idyl.network


# Initialize with custom endpoints
idyl init --realm custom.example.com \
    --identity-url https://identity.custom.example.com \
    --globalapi-url https://api.custom.example.com \
    --meta-url https://meta.custom.example.com
```
