Skip to Content
Configuration & Modes

Inspect, set, and reset LATdx configuration; switch between adaptation modes.

LATdx separates two distinct concerns: which adaptation mode you run tests through, and what configuration the CLI reads to decide how to execute. This page covers both: the latdx config surface, the supported configuration scopes, and the modes / strategies / profiles you can flip per run.

Adaptation modes

LATdx supports two adaptation modes that share the same transformation engine but differ in what gets deployed and how the tests execute:

  • Rapid execution (latdx test run): in-memory transformation plus anonymous Apex. No deployment and no managed-package install required for file-mode runs. Best for the inner-loop edit/run/inspect cycle. See Quickstart for first-run examples.
  • Test acceleration (latdx boost then deploy then sf apex test run): transforms the codebase for the standard Salesforce test runner. Best for CI and orgs that must execute through the platform-native runner. See Adaptation Lifecycle for the boost / restore / clean / uninstall flow.

The two modes are not mutually exclusive: a workspace can use rapid execution day to day and test acceleration in CI, against the same org.

Configuration scopes

Precedence, highest wins:

  1. CLI flag (e.g. --sequential, --no-coverage).
  2. Environment variable (e.g. LATDX_LATDB, LATDX_BATCH_MODE, LATDX_ANON_MODE, LATDX_LOG_LEVEL, LATDX_SF_INSTALL_METHOD).
  3. User-global config (~/.latdx/config.json, written by latdx config set).
  4. Built-in default.

The user-global config file is the only persistent, machine-scoped settings store the CLI manages directly. There is no per-project latdx.config.json written by latdx config; project-scoped overrides are expressed via env vars or per-command flags. CI/release-only env vars are listed separately in the internal env var reference.

WARNING

latdx config set writes to ~/.latdx/config.json, which is shared across every workspace on the machine. There is no scratch file or staging step. Re-run latdx config set <key> <value> with a different value to change it back; there is no latdx config unset. To reset the entire config (release channel and any future keys), delete ~/.latdx/config.json manually. latdx cache clear does not touch this file.

latdx config commands

latdx config set <key> <value> # set a value latdx config get <key> # read a value latdx config list # print every entry

Supported keys

KeyDescriptionExample
channelRelease channel for latdx upgrade (stable or latest).latdx config set channel latest

channel is the only key currently accepted by latdx config set; the canonical schema lives in apps/cli/src/config.ts (CONFIG_SCHEMA). Other ergonomic switches still flow through environment variables; see Environment Variables for the full list.

Test execution engine: sf vs latdx

EngineHow to selectCharacteristics
sf (default)default behavior, --engine sfRoutes through @salesforce/apex-node’s TestService. Runs your code as-is in the org, no preparation or anon-Apex transformation. Class-granular coverage. Sync path for single-class small runs, async path for everything else.
latdxLATDX_EXPERIMENTAL=1 --engine latdx (experimental)Routes through the LATdx anon-Apex runtime. Requires latdx-sf deployed in the target org and latdx_TestRunnerAccess granted. Method-granular coverage. Inner-loop optimized via packed batches.

Use sf for orgs where the standard test runner already works and you only need fast feedback; use latdx (experimental) when you also need the LATdx adaptations (in-memory DB simulation, packed-batch dispatch, per-method coverage). The --db mocked flag only applies to --engine latdx.

Test mode: dbsim vs full

ModeHow to selectCharacteristics
dbsim (default)default behaviorOptimized simulation path; enables packed/concurrent execution strategies where eligible.
fullLATDX_LATDB=offUses full simulation path with more traditional execution semantics.

Execution strategy: packed vs sequential

StrategyHow to selectCharacteristics
packed (default)default behaviorBatch-oriented execution, best for throughput in org mode.
sequential--sequentialEasier debugging/isolation, lower throughput.

Batch profile: turbo vs eco

ProfileHow to selectCharacteristics
turbo (default)default behaviorPrioritizes parallelization and faster completion.
ecoLATDX_BATCH_MODE=ecoReduces worker pressure, prioritizes efficiency/stability.

Anon-Apex emission: named vs inline

StrategyHow to selectCharacteristics
named (default)default behaviorInvokes the test method by name on the deployed class. Tiny payloads, packed batches fit far more tests per call.
inlineLATDX_ANON_MODE=inlineInlines the test method body into the ExecuteAnonymous payload (legacy extraction). Use only for parity debugging.
NOTE

--concurrency <n> overrides the auto-picked default (20 for Developer Edition / trial / scratch orgs, 25 for production / sandbox orgs). The auto-pick comes from classifyOrgTier in @latdx/core. See the CLI Reference.

Coverage and Logging Implications

  1. Coverage is enabled by default during test run.
  2. Use --no-coverage to reduce overhead when coverage output is not required.
  3. In org mode, debug log storage limits can block execution; the CLI auto-deletes logs and retries when CI=true or stdout is non-TTY, and prompts otherwise.

Relevant Environment Variables

The most relevant variables for choosing modes:

  • LATDX_LATDB (on (default) or off): toggle the LATdx DB simulation runtime. off switches the run to full mode (replaces the former --fullSim flag).
  • LATDX_BATCH_MODE (turbo (default) or eco): batch packing strategy for packed execution (replaces the former --eco flag).
  • LATDX_ANON_MODE (named (default) or inline): anon-Apex emission strategy (replaces the former --anon-inline flag).
  • LATDX_SF_INSTALL_METHOD (SOURCE or MANAGED_PKG): controls latdx-sf install strategy. Defaults to MANAGED_PKG when a managed package id is available (binary builds, or LATDX_SF_PACKAGE_ID is set); otherwise SOURCE so dev checkouts work without an explicit override. Legacy alias SF_PACKAGE_INSTALL_METHOD is still honored with a deprecation warning.
  • LATDX_SF_SOURCE_PATH=<path>: pin source-install mode to a specific latdx-sf source root.
  • LATDX_LOG_LEVEL and LATDX_LOG_FORMAT: explicit log level / format overrides; see environment-variables.md.
  • LATDX_SKIP_TEST_RUNNER_ACCESS=1: skip the auto-deploy/assign of the latdx_TestRunnerAccess permission set.

For the full list of supported environment variables, see environment-variables.md.

Safety Notes

  1. Extension runtime has explicit production-org safety behavior by default.
  2. CLI docs in this repository do not define an equivalent dedicated production-org guard flag; target sandbox/scratch orgs intentionally.
  3. For source-based package install workflows, keep latdx-sf source aligned with required package version expectations.
WARNING

Switching channel from stable to latest opts the binary into pre-release builds on the next latdx upgrade. Pre-release builds may contain breaking changes; flip back to stable and re-run latdx upgrade if you need to revert.

See also

Last updated on