Skip to content

Run, test, and debug Apex locally

Local Apex runtime for SFDX projects

Run supported Apex checks, focused tests, SOQL/DML, triggers, and anonymous Apex against local project state. Debug supported paths from VS Code. Check human and AI-generated changes before the org round trip. Salesforce remains the validation gate.

Latest stable release:v0.2.8

No Salesforce org login required for supported local checks.

Project loopLocal check
$ glade check --project . --no-progress
DiagnosticCannot resolve variable renewalQuote

RenewalQuoteService.cls:42

1diagnostic0deploys412msruntime

Daily local workflow

One local loop for CLI, VS Code, AI, and CI.

CLI

Check source, run focused tests, execute anonymous Apex, and inspect SOQL/DML behavior from your terminal.

VS Code

Open Glade Home for local proof, data, debug, and ship actions. Run local tests from Test Explorer and CodeLens.

AI-assisted changes

Give agents a small local contract: run a check, quote the diagnostic, fix the smallest source change, and rerun the same command.

CI

Use JSON, SARIF, JUnit, stable exit codes, affected-test selection, and saved run artifacts in pull request workflows.

What runs locally

Examples from the checked capability map.

Database.insertRuns locally
Schema.DescribeSObjectResultRuns with limits
Answers.findSimilarRequires Salesforce
What runs locally

What runs locally

Check what runs locally before relying on it.

Glade lists local behavior in three groups: runs locally, runs with limits, and requires Salesforce.

Runs locally

  • Apex parse + semantic checks
  • Focused Apex tests
  • SOQL, DML, triggers, and SObjects
  • Anonymous Apex
  • Local Salesforce API routes
  • JSON, SARIF, and JUnit output

Runs with limits

  • Describe and schema behavior
  • Callout mocks
  • Messaging result objects
  • Visualforce and LWC local shells remain preview features.
  • Deterministic search and SOSL helpers

Requires Salesforce

  • Live auth and sessions
  • Hosted service engines
  • Exact Lightning Experience behavior
  • Metadata deploy and retrieve
  • Streaming, Pub/Sub, and GraphQL
  • Exact production governor accounting

Local data

Local data without a scratch org

Run anonymous Apex, SOQL, DML, triggers, local API routes, and playground examples against local project state. Use SQLite-backed environments when a loop needs persistence.

glade playground --project . --open
glade server --project . --db .glade/refinement-local.sqlite --addr 127.0.0.1:8080
glade db seed --db .glade/refinement-local.sqlite --project . data/file-rows.json
glade org create refinement-local

Use glade org when a supported sf command needs a local target. It is not a real scratch org. Live auth, hosted services, deploy and retrieve, and exact production behavior stay with Salesforce.

Extension points

Optional plugins

The base runtime stays focused on local Apex workflows. Add plugins only when a project needs capability reports, advisory scans, or custom local checks.

Base Glade workflows do not require plugins. Registry commands are preview until a registry, archive URL, or linked plugin is configured.

glade plugins list
glade plugins install @glade/performance
glade plugins install @glade/orgpackage

See first-party plugin install and lock-file docs.

Validation boundary

Salesforce remains the validation gate.

Use Salesforce for live auth, hosted service engines, deploy and retrieve, exact Lightning Experience behavior, Streaming, Pub/Sub, GraphQL, and exact production governor accounting.

curl -fsSL https://glade.sh/install.sh | sh
glade doctor
glade check --project .

Supported paths run locally. Unsupported platform services fail with named diagnostics. Salesforce remains the validation gate.

Glade is local-first Apex tooling.