Configuration reference
CLI and SDK share remote transport configuration, but only the CLI automatically reads the API address from .env.local in the current directory.
| Configuration | CLI | SDK | Meaning |
|---|---|---|---|
ENVLOOP_BASE_URL | Environment or .env.local | Environment only | Platform address, production https://api.envloop.ai |
ENVPLATFORM_API_URL | Compatibility fallback | Compatibility fallback | Legacy address variable |
ENVLOOP_API_KEY | Environment only | Environment or api_key= | Bearer Key; no CLI --api-key |
ENVLOOP_WORKSPACE_ID | Environment or --workspace-id | Environment or workspace_id= | Optional authorized workspace |
ENVLOOP_LOG_LEVEL | Environment | Environment | Application logging level; importing the SDK does not install a global handler |
Address precedence
CLI: --api-url → system environment → current directory .env.local. Within the same source, ENVLOOP_BASE_URL takes precedence over the legacy variable. The file supports quoted values, end-of-line comments, and an export prefix; Keys and other variables in the file are not loaded.
SDK: Client.remote(api_url=...) → system ENVLOOP_BASE_URL → system legacy variable. Missing or invalid addresses raise errors without silently switching to local execution. Explicit api_key / workspace_id overrides the corresponding environment variables.
Without any configured address, the CLI uses the in-process local backend; explicit repository / work-dir options or Profile operations skip the file's address. If the shell environment specifies a remote address, combining it with local options causes an argument error; clear address variables first.
URL rules
- Production:
https://api.envloop.ai. The transport supports an existing/v1suffix. - Full local platform:
http://127.0.0.1:5173/api/, retaining the/apiprefix. - Trusted local JobMaster: for example,
http://127.0.0.1:8000; use the actual service port. - Public HTTP, credentials in URLs, query / fragment components, and automatic redirects are rejected.
Production clients should not send Bearer Keys to the old workers.dev web address. Adjust ports when development configuration changes them.
Local storage and lifecycle
| Parameter / path | Behavior |
|---|---|
work_dir / --work-dir | Local task execution and artifact directory; does not change the log directory |
repository_root / --repository-root | Explicit repository binding; top-level paths are not currently discovered automatically |
repository_commit / --repository-commit | Specify a fixed commit; omission resolves local main, not current HEAD |
logs/trials/<trial_id>/ | Local stdout/stderr logs and manifest under the current directory at startup |
The repository supports Dataset / Profile and completed receipts; without binding, state is held in instance memory and does not persist across processes. Closing a local client waits for accepted execution; closing a remote client does not cancel platform work.