Skip to content

reference

JSON envelope reference ​

Priority commands write a versioned JSON envelope.

json
{
  "schemaVersion": "1.0",
  "command": "check",
  "status": "passed",
  "exitCode": 0,
  "project": {},
  "summary": {},
  "diagnostics": [],
  "artifacts": [],
  "timings": {},
  "suggestions": [],
  "tests": [],
  "data": {}
}

Fields ​

FieldTypeNotes
schemaVersionstringEnvelope version. Current value is 1.0.
commandstringCommand that produced the output.
statusstringpassed, failed, partial, or unsupported where supported.
exitCodenumberProcess exit status.
projectobjectProject root and package information when known.
summaryobjectCommand-specific counts.
diagnosticsarrayStable diagnostic objects.
artifactsarrayFiles written by the command.
timingsobjectTimings when reported.
suggestionsarrayNext commands to run.
testsarrayFlat test rows for glade test.
dataobjectCommand-specific detail during migration.
excludedClassesarrayInvalid classes, their dependents, and excluded triggers for glade test.

Test exclusions ​

summary.excludedClasses counts exclusions, including non-test classes and triggers. Each excludedClasses entry has className, file, line, dependsOn, root, and message. A root with multiple errors may include problems, an array of line/message pairs. Excluded tests appear as compile_error test rows. Any exclusion makes the command exit 1.

Doctor JSON ​

glade doctor --json has its own schema version 1.1, with fields such as parserOK, parserStatus, and toolchain/project status. It does not use the example envelope above. Inspect command-specific schemas before parsing them.

Doctor object ​

In v0.3.0, glade doctor --json uses a flattened 1.1 object because its fields predate the shared envelope. Version 1.1 makes the Apex readiness scope explicit and treats LWC-toolchain and local-data health as independent workflow advisories. Older v0.2.15 binaries emit schema 1.0; consumers must select fields according to the installed schema version. Important fields are:

FieldTypeNotes
readinessScopestringapex; status and exitCode describe Apex check/test prerequisites.
apexReadybooleanWhether the project, configuration, and parser are ready for Apex check/test.
projectOKbooleanThe resolved local project could be loaded.
projectRootstringResolved absolute project root when known.
configOK / configMissingbooleanDistinguish an invalid config from an absent one.
configStatusstringParse or validation detail for an invalid config.
sourceApiVersionstringProject Apex API default; individual class metadata can override it.
sourceApiInCheckedWindowbooleanThe default is in the 62.0 through 68.0 checked window. This does not mean Salesforce was queried during this run.
parserOKbooleanThe binary passed a real Apex parser self-check.
toolchainOKbooleanLWC compiler/runtime assets were found. This is advisory for Apex check and test.
localDataobjectProject-local DB state and schema binding when present; a failed state is advisory for Apex and blocks DB-backed confidence.
salesforceBoundarystringStates that doctor did not contact Salesforce.
suggestionsarrayProject-scoped next commands after a ready result.
recoveryarrayProject-scoped recovery steps after a failed result.
advisoriesarrayNon-blocking historical-version or LWC-toolchain guidance.

For recognized doctor flags, setup failures such as a missing project path or malformed glade.yml still emit the doctor JSON object with status: "failed" and the matching nonzero exitCode.

When source uses undeclared org features or project permission-set assignments, the optional orgSetup array contains setup advice. It is omitted when there are no suggestions. Each entry has:

FieldMeaning
kindfeature or permissionSet.
featureFeature name for a feature suggestion; otherwise omitted.
namesPermission-set API names for a permission-set suggestion; otherwise omitted.
reasonSource evidence that prompted the suggestion.
filesUp to three project-relative files containing evidence; omitted when empty.
yamlSuggested glade.yml block, retaining existing configured entries.

Suggestions do not enable features or assign permissions, and do not change doctor's status or exitCode. See setup suggestions.

Diagnostic object ​

json
{
  "code": "GLADESEMA002",
  "severity": "error",
  "message": "method \"latestInvoice\" references unknown type \"Invoice__c\"",
  "file": "force-app/main/default/classes/RefinementService.cls",
  "line": 2,
  "column": 3,
  "why": "The Apex type reference is not present in local Apex, schema, or platform symbols.",
  "try": [
    "glade schema load --project .",
    "glade check --project ."
  ],
  "docs": "https://glade.sh/reference/errors#gladesema002"
}

Glade is an independent project and is not affiliated with, sponsored by, or endorsed by Salesforce. Salesforce and Apex are trademarks of Salesforce, Inc. · Contributors · Security · Releases · Apache-2.0