---
sidebar_label: "Configuration"
title: "Configuration reference"
description: "Shared connection settings, client boundaries, URL binding and compatibility status."
last_update:
  date: 2026-11-04
---

<span id="configuration-reference" className="legacy-anchor" />

The CLI and SDK provided by the public envloop-cli package share user configuration in `~/.envloop/`. See [Authentication](../guides/authentication.md) and [Compatibility](../guides/resources.md). Only the CLI reads the API address from the current directory's `.env.local`; the SDK does not read cwd dotenv files.

## Client boundary and compatibility

Use the CLI or `Client.remote()` with an API address and project Key. Resource queries use the returned IDs; the platform manages execution directories, state, logs and artifacts.

The current CLI does not expose `--repository-root`, `--repository-commit`, `--work-dir`, `--namespace` and `--queue-id`. Profile selectors are consolidated into `--profile NAME[@VERSION]`. Bench and Sandbox submissions accept an explicit `--provider NAME`, validated against the platform configuration for that Job type. Train and Inference execution environments are selected by the platform. Executor parameters and environment overrides are unsupported. Profile CLI / SDK management now uses the platform HTTP catalog. All CLI resources share connection settings without in-process execution fallback.

For local platform development, connect to the public loopback `/api/` address with `Client.remote()`. `Client.local()`, `Client.init_repository()` and repository/work-directory arguments are legacy development-test helpers; use them only in that context.

Explicit Task/configuration files, Profile import/export files and download destinations remain ordinary user inputs and outputs. `ENVLOOP_HOME` stores connection settings and credentials; it is not an execution directory. Dataset version / revision selectors identify platform content, not a client repository binding. For missing settings or API errors, correct the connection before retrying.

| Configuration | Meaning |
|---|---|
| `ENVLOOP_BASE_URL` | Platform address, production `https://api.envloop.ai` |
| `ENVPLATFORM_API_URL` | Legacy address fallback; prefer `ENVLOOP_BASE_URL` |
| `ENVLOOP_API_KEY` | Bearer Key; no CLI `--api-key` option |
| `ENVLOOP_WORKSPACE_ID` | Optional authorized workspace |
| `ENVLOOP_PROJECT_ID` | Optional project within the Key scope |
| `ENVLOOP_HOME` | User configuration directory; a nonempty absolute path (`~` expands), default `~/.envloop` |
| `ENVLOOP_LOG_LEVEL` | Application logging level; SDK imports do not install a global handler |

## Address precedence

| Field | CLI (highest → lowest) | SDK remote (highest → lowest) |
|---|---|---|
| Base URL | system `ENVLOOP_BASE_URL` → system `ENVPLATFORM_API_URL` → user `config.toml` → cwd `.env.local` URL | Explicit `api_url` → system `ENVLOOP_BASE_URL` → system `ENVPLATFORM_API_URL` → user `config.toml` |
| API Key | System `ENVLOOP_API_KEY` → `auth.json` entry matching the effective URL | Explicit `api_key` → system `ENVLOOP_API_KEY` → matching `auth.json` entry |
| Workspace | system `ENVLOOP_WORKSPACE_ID` → saved workspace for a matching URL → for another URL, the workspace of that URL's saved Key | Explicit `workspace_id` → system `ENVLOOP_WORKSPACE_ID` → saved workspace for a matching URL → for another URL, the workspace of that URL's saved Key |
| Project | system `ENVLOOP_PROJECT_ID` → saved project for a matching URL/workspace → for another URL, the project of that URL's saved Key | Explicit `project_id` → system `ENVLOOP_PROJECT_ID` → matching saved project when user files supply connection values |

`.env.local` loads only the URL, preferring `ENVLOOP_BASE_URL` over the legacy variable. Quoted values, end-of-line comments and `export` are supported; Keys and other variables are not loaded. Authentication show/status use the effective CLI connection, using dotenv only if no user URL is saved. Writes target only the saved user configuration, ignore override URLs and never automatically persist an environment Key. Changing the saved URL restores the workspace and project of the new URL's saved Key, or clears them when that Key's scope is unknown or ambiguous; changing workspace clears project. The saved scope of another URL is used only when its Key also comes from `auth.json`.

The URL is resolved before selecting the saved Key and workspace. Invalid higher-priority values fail rather than falling back. Omitted or `None` SDK parameters follow the table; empty strings are errors. `Client.remote(..., config=False)` disables user file access while retaining explicit and system environment configuration.

Profile, Task, Job and training APIs share these connection settings. For 401/403 or network errors, check the effective address, Key and project with `el auth config show --json` and `el auth status --check`.

## URL rules

- Production: `https://api.envloop.ai`; public HTTP is rejected.
- Full local platform: `http://127.0.0.1:5173/api/`; trusted loopback HTTP accepts Bearer Keys and retains `/api`.
- Internal JobMaster addresses do not replace the public development entrypoint above; use the UI origin plus `/api/` for platform authentication and catalogs.
- Scheme / host, default ports, trailing `/` and `/v1` are normalized: `https://api.envloop.ai/v1/` matches `https://api.envloop.ai`; `https://host/api` does not match `https://host`.
- Saved Keys match only the same canonical URL. Changing host, scheme, nondefault port or base path does not reuse another address's Key. Saved workspace selection also requires the stored and effective URLs to match.
- Supported prefixes are the root, `/v1`, `/api` and `/api/v1`, with optional trailing slashes. URL credentials, query / fragment components, other paths and automatic redirects are rejected.

Production clients should not send Bearer Keys to the old workers.dev web address.

## User configuration files

| File / directory | Content and permissions (POSIX) |
|---|---|
| `~/.envloop/` | Private current-user directory, `0700` |
| `config.toml` | URL and optional workspace/project, `0600` |
| `auth.json` | Plaintext API Keys bound to URLs, `0600` |

File persistence supports POSIX. On Windows, use environment or explicit credentials and SDK `config=False`. Missing files mean unconfigured; when a file is needed, malformed content, unknown versions, unsafe ownership / permissions and symlinks cause errors. Commands do not automatically repair permissions on existing paths.

`auth config path` prints paths; `show --json` and `status --json` show saved settings, effective settings and sources with Key presence only. `get api-key` returns only `configured` / `missing`. `auth logout` and `unset api-key` remove only the stored default URL's Keys, including workspace and project Keys; they do not revoke server Keys, change environment variables or remove other address entries. `unset base-url` retains existing Key entries.

Project credentials prefer a `project_keys[workspace_id][project_id]` entry for the effective URL, falling back to the address default Key. Without a project selector, legacy `workspace_keys` remains supported. Different projects in one workspace retain distinct Keys. Existing auth.json files remain readable; after saving workspace Keys, keep the CLI / SDK package updated. Older clients reject the added field.

## Files and execution lifecycle

The platform owns execution directories, run state, logs and artifacts. Retrieve historical Jobs / Trials with the same effective API connection and returned resource IDs, without binding a local repository. Closing an API client does not cancel accepted platform work.

User paths may supply submission files or save exports and downloads; they do not configure platform execution directories. Ordinary CLI commands skip user files on non-POSIX platforms, retaining environment connections; use explicit `config=False` for the SDK.

## Keep development and production separate

A browser project selector does not change CLI scope. A new terminal may also inherit environment overrides that differ from the saved selection. Before a write, inspect:

```bash
el auth config show --json
el auth status --check --json
```

Use a separate private `ENVLOOP_HOME` for independent client environments. The CLI requires `ENVLOOP_HOME` and its config files to be private: the directory must be mode 700 (`chmod 700 "$ENVLOOP_HOME"`) and files mode 600, otherwise every `el` command fails with `CONFIG_INSECURE_PATH`. Create the directory with private permissions before use; it contains credentials, not execution data. Keep development Keys separate from production Keys and use the target platform's own issued credentials. Saving a new URL does not move resources or migrate Keys.

For a CI job, inject `ENVLOOP_BASE_URL` and `ENVLOOP_API_KEY` using the CI secret system. Add workspace/project overrides only when they match that Key. Do not copy the whole user authentication directory into an image or write secrets to `.env.local` expecting the CLI to load them. Use [HTTP API](http-api.md) when implementing a separate client.
