sobject describe

Display the metadata for a standard or custom object or a Tooling API object.

The metadata is displayed in JSON format. See this topic for a description of each property: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describesobjects_describesobjectresult.htm.

This command displays metadata for Salesforce objects by default. Use the –use-tooling-api flag to view metadata for a Tooling API object.

force:schema:sobject:describe

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑sobject‑sType: Value
Required

API name of the object to describe.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.
‑‑use‑tooling‑api‑tType: Boolean

Use Tooling API to display metadata for Tooling API objects.

Display the metadata of the “Account” standard object in your default org:

Display the metadata of the “MyObject__c” custom object in the org with alias “my-scratch-org”:

Display the metadata of the ApexCodeCoverage Tooling API object in your default org: