Skip to content

resolveConfig / XpenseConfig ​

Resolves the effective config from env vars overlaid with explicit options.

resolveConfig ​

ts
resolveConfig(options?: Partial<XpenseConfig>): XpenseConfig
ParamTypeDescription
optionsPartial<XpenseConfig>explicit overrides; win over env

Resolution order: explicit option → env var → default.

FieldEnvDefault
apiBaseUrlXAGENT_API_BASEhttps://api.xerpaai.com
frontendBaseXAGENT_FRONTEND_BASEhttps://www.xerpaai.com
modeXAGENT_PI_MODEdry-run
version—package version

Example ​

ts
import { resolveConfig } from "@xagent/xpense";

const config = resolveConfig({ mode: "mock" });

Proprietary software. All rights reserved.