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 boostthen deploy thensf 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:
- CLI flag (e.g.
--sequential,--no-coverage). - Environment variable (e.g.
LATDX_LATDB,LATDX_BATCH_MODE,LATDX_ANON_MODE,LATDX_LOG_LEVEL,LATDX_SF_INSTALL_METHOD). - User-global config (
~/.latdx/config.json, written bylatdx config set). - 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.
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 entrySupported keys
| Key | Description | Example |
|---|---|---|
channel | Release 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
| Engine | How to select | Characteristics |
|---|---|---|
sf (default) | default behavior, --engine sf | Routes 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. |
latdx | LATDX_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
| Mode | How to select | Characteristics |
|---|---|---|
dbsim (default) | default behavior | Optimized simulation path; enables packed/concurrent execution strategies where eligible. |
full | LATDX_LATDB=off | Uses full simulation path with more traditional execution semantics. |
Execution strategy: packed vs sequential
| Strategy | How to select | Characteristics |
|---|---|---|
packed (default) | default behavior | Batch-oriented execution, best for throughput in org mode. |
sequential | --sequential | Easier debugging/isolation, lower throughput. |
Batch profile: turbo vs eco
| Profile | How to select | Characteristics |
|---|---|---|
turbo (default) | default behavior | Prioritizes parallelization and faster completion. |
eco | LATDX_BATCH_MODE=eco | Reduces worker pressure, prioritizes efficiency/stability. |
Anon-Apex emission: named vs inline
| Strategy | How to select | Characteristics |
|---|---|---|
named (default) | default behavior | Invokes the test method by name on the deployed class. Tiny payloads, packed batches fit far more tests per call. |
inline | LATDX_ANON_MODE=inline | Inlines the test method body into the ExecuteAnonymous payload (legacy extraction). Use only for parity debugging. |
--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
- Coverage is enabled by default during
test run. - Use
--no-coverageto reduce overhead when coverage output is not required. - In org mode, debug log storage limits can block execution; the CLI auto-deletes logs and retries when
CI=trueor stdout is non-TTY, and prompts otherwise.
Relevant Environment Variables
The most relevant variables for choosing modes:
LATDX_LATDB(on(default) oroff): toggle the LATdx DB simulation runtime.offswitches the run tofullmode (replaces the former--fullSimflag).LATDX_BATCH_MODE(turbo(default) oreco): batch packing strategy for packed execution (replaces the former--ecoflag).LATDX_ANON_MODE(named(default) orinline): anon-Apex emission strategy (replaces the former--anon-inlineflag).LATDX_SF_INSTALL_METHOD(SOURCEorMANAGED_PKG): controls latdx-sf install strategy. Defaults toMANAGED_PKGwhen a managed package id is available (binary builds, orLATDX_SF_PACKAGE_IDis set); otherwiseSOURCEso dev checkouts work without an explicit override. Legacy aliasSF_PACKAGE_INSTALL_METHODis still honored with a deprecation warning.LATDX_SF_SOURCE_PATH=<path>: pin source-install mode to a specificlatdx-sfsource root.LATDX_LOG_LEVELandLATDX_LOG_FORMAT: explicit log level / format overrides; see environment-variables.md.LATDX_SKIP_TEST_RUNNER_ACCESS=1: skip the auto-deploy/assign of thelatdx_TestRunnerAccesspermission set.
For the full list of supported environment variables, see environment-variables.md.
Safety Notes
- Extension runtime has explicit production-org safety behavior by default.
- CLI docs in this repository do not define an equivalent dedicated production-org guard flag; target sandbox/scratch orgs intentionally.
- For source-based package install workflows, keep
latdx-sfsource aligned with required package version expectations.
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.