Skip to Content
SDKConfiguration

Configuration

TL;DR

Client() uses the active local Cmdop configuration. Set an explicit relay URL and bearer token only for remote mode. Constructor values take precedence over environment variables.

Defaults

SettingPython / NodeEnvironmentDefault
Relay URLbase_url / baseUrlCMDOP_BASE_URLactive local Cmdop setup
Bearer tokentokenCMDOP_TOKENmatching local credentials
Timeouttimeout_ms / timeoutMsCMDOP_TIMEOUT_MS30000 ms
Development binary overridebinary_path / binaryPathCMDOP_CORE_BINARYpackaged host binary

With no URL override, the core discovers the active relay and credentials from Cmdop. An explicit remote URL requires a bearer token. An explicit loopback URL can mint a local loopback token.

Leave the binary override unset in normal use — the packaged host binary is the one the client is tested against. It exists for local development against a core you built yourself.

Constructor options

from cmdop import Client client = Client( base_url="https://relay.example.com", token="...", timeout_ms=30_000, )
import { Client } from "@cmdop/sdk"; const client = new Client({ baseUrl: "https://relay.example.com", token: "...", timeoutMs: 30_000, });

Client.from_env() and Client.fromEnv() are aliases for constructing a zero-argument client. The regular constructor is the shortest canonical form.

Precedence

  1. Explicit constructor value.
  2. Matching environment variable.
  3. Local discovery or the documented timeout default.

Always close the client after use. See Getting started for lifecycle examples.

Last updated on