Newer Version Available
lightning Commands
lightning:app:create
Command Syntax
- sfdx force:lightning:app:create
- [--json]
- [--loglevel LOGLEVEL]
- -n APPNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [-a APIVERSION]
Parameters
- --json
- Optional
-
Formats output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --appname APPNAME
- Required
-
The Lightning app name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningApp
- Default value: DefaultLightningApp
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- -a | --apiversion APIVERSION
- Optional
-
The API version of the created source.
- Type: string
- Permissible values are: 46.0, 45.0
- Default value: 46.0
Help for lightning:app:create
lightning:component:create
Command Syntax
- sfdx force:lightning:component:create
- [--json]
- [--loglevel LOGLEVEL]
- -n COMPONENTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [-a APIVERSION]
- [--type TYPE]
Parameters
- --json
- Optional
-
Formats output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --componentname COMPONENTNAME
- Required
-
The Lightning component name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningCmp
- Default value: DefaultLightningCmp
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- -a | --apiversion APIVERSION
- Optional
-
The API version of the created source.
- Type: string
- Permissible values are: 46.0, 45.0
- Default value: 46.0
- --type TYPE
- Optional
-
The type of the new Lightning component.
- Type: string
- Permissible values are: aura, lwc
- Default value: aura
Help for lightning:component:create
lightning:event:create
Command Syntax
- sfdx force:lightning:event:create
- [--json]
- [--loglevel LOGLEVEL]
- -n EVENTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [-a APIVERSION]
Parameters
- --json
- Optional
-
Formats output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --eventname EVENTNAME
- Required
-
The Lightning event name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningEvt
- Default value: DefaultLightningEvt
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- -a | --apiversion APIVERSION
- Optional
-
The API version of the created source.
- Type: string
- Permissible values are: 46.0, 45.0
- Default value: 46.0
Help for lightning:event:create
lightning:interface:create
Command Syntax
- sfdx force:lightning:interface:create
- [--json]
- [--loglevel LOGLEVEL]
- -n INTERFACENAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [-a APIVERSION]
Parameters
- --json
- Optional
-
Formats output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --interfacename INTERFACENAME
- Required
-
The Lightning interface name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningIntf
- Default value: DefaultLightningIntf
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- -a | --apiversion APIVERSION
- Optional
-
The API version of the created source.
- Type: string
- Permissible values are: 46.0, 45.0
- Default value: 46.0
Help for lightning:interface:create
lightning:lint
Command Syntax
- sfdx force:lightning:lint
- [--json]
- [--loglevel LOGLEVEL]
- [-i IGNORE]
- [--files FILES]
- [--config CONFIG]
- [--verbose]
- [--exit]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -i | --ignore IGNORE
- Optional
-
A “glob” pattern used to filter folders (and their contents) out of the analysis. For example: --ignore **/foo/**.
- Type: string
- --files FILES
- Optional
-
A “glob” pattern used to add specific files to the analysis. For example, to only analyse your controller files, use --files **/*Controller.js. When specified, this value overrides the --ignore flag. The default is all .js files.
- Type: string
- --config CONFIG
- Optional
-
Path to a custom ESLint configuration file. Only code style rules are used, while the rest are ignored. For example: --config path/to/.eslintrc.
- Type: string
- --verbose
- Optional
-
Report both warnings and errors. The default is to report only errors.
- Type: boolean
- --exit
- Optional
-
Exit with error code 1 if there are lint issues. The default exits without an error code.
- Type: boolean
Help for lightning:lint
lightning:test:create
Command Syntax
- sfdx force:lightning:test:create
- [--json]
- [--loglevel LOGLEVEL]
- -n TESTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
Parameters
- --json
- Optional
-
Formats output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --testname TESTNAME
- Required
-
The name of the new Lightning test. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningTest
- Default value: DefaultLightningTest
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
Help for lightning:test:create
lightning:test:install
Command Syntax
- sfdx force:lightning:test:install
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-w WAIT]
- [-r RELEASEVERSION]
- [-t PACKAGETYPE]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -w | --wait WAIT
- Optional
-
Maximum number of minutes to wait for installation status.
- Type: minutes
- Default value: 2
- -r | --releaseversion RELEASEVERSION
- Optional
-
The release version of LTS unmanaged package you want to install.
- Type: string
- Default value: latest
- -t | --packagetype PACKAGETYPE
- Optional
-
Type of LTS unmanaged package to install. 'jasmine' and 'mocha' contains the essentials for development, 'full' contains both, and adds sample components and tests in the package. 'full' is best for 'kicking the tires' of LTS.
- Type: string
- Permissible values are: jasmine, mocha, full
- Default value: full
Help for lightning:test:install
Examples:
1$ sfdx force:lightning:test:install1$ sfdx force:lightning:test:install -w 0 -r v1.01$ sfdx force:lightning:test:install -t jasminelightning:test:run
Command Syntax
- sfdx force:lightning:test:run
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-a APPNAME]
- [-d OUTPUTDIR]
- [-f CONFIGFILE]
- [-o]
- [-t TIMEOUT]
- [-r RESULTFORMAT]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --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, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -a | --appname APPNAME
- Optional
-
Name of your Lightning test application. The name is case insensitive, and ".app" is optional, so "Test" and "test.app" are equivalent.
Default value: Test.app
- Type: string
- -d | --outputdir OUTPUTDIR
- Optional
-
Directory path to store test run artifacts: log files, test results, and so on.
- Type: directory
- -f | --configfile CONFIGFILE
- Optional
-
Path to a test configuration file to configure WebDriver and other settings. For details, see the LTS documentation.
- Type: filepath
- -o | --leavebrowseropen
- Optional
-
Leaves browser open after the test finishes so that you can view the test suite results.
- Type: boolean
- -t | --timeout TIMEOUT
- Optional
-
Time, in milliseconds, to wait for the results element to be present in the DOM, before failing and moving on to the next test.
- Type: number
- Default value: 60000
- -r | --resultformat RESULTFORMAT
- Optional
-
Format to use when displaying results. If you also specify the --json flag, --json overrides this parameter.
- Type: string
- Permissible values are: human, tap, junit, json
- Default value: human
Help for lightning:test:run
Examples:
1$ sfdx force:lightning:test:run1$ sfdx force:lightning:test:run -a tests -r human1$ sfdx force:lightning:test:run -f config/myConfigFile.json -d testResultFolder