schema Commands

Use the schema commands to view the metadata for the standard and custom objects in your org.

schema:sobject:describe

Displays the metadata for a standard or custom object.

Command Syntax

sfdx force:schema:sobject:describe
-s SOBJECTTYPE
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-s | --sobjecttype SOBJECTTYPE
Required




The API name of the object to describe.

Type: string
-u | --targetusername TARGETUSERNAME
Optional




A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional




Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional




The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for schema:sobject:describe

Examples:

schema:sobject:list

Lists all objects of a specified sObject category.

Command Syntax

sfdx force:schema:sobject:list
-c SOBJECTTYPECATEGORY
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-c | --sobjecttypecategory SOBJECTTYPECATEGORY
Required




The type of objects to list: all, custom, or standard.

Type: string
-u | --targetusername TARGETUSERNAME
Optional




A username or alias for the target org. Overrides the default target org.

Type: string
--json
Optional




Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional




The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for schema:sobject:list

Lists all objects, custom objects, or standard objects in the org.

Examples: