@salesforce/cli
Version:
The Salesforce CLI
686 lines • 186 kB
JSON
{
"commands": {
"code-analyzer:config": {
"aliases": [],
"args": {},
"description": "Code Analyzer gives you the ability to configure settings that modify Code Analyzer's behavior, to override the tags and severity levels of rules, and to configure the engine specific settings. Use this command to see the current state of this configuration. You can also save this state to a YAML-formatted file that you can modify for your needs.\n\nTo apply a custom configuration with Code Analyzer, either keep your custom configuration settings in a `code-analyzer.yml` file located in the current folder from which you are executing commands, or specify the location of your custom configuration file to the Code Analyzer commands with the --config-file flag.\n\nWe're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://sfdc.co/CodeAnalyzerFeedback.",
"examples": [
"Display the current state of the Code Analyzer configuration using the default behavior: display top level configuration, display the engine and rule override settings associated with all the rules; and automatically apply any existing custom configuration settings found in a `code-analyzer.yml` or `code-analyzer.yaml` file in the current folder:\n<%= config.bin %> <%= command.id %>",
"This example is identical to the previous one, assuming that `./code-analyzer.yml` exists in your current folder.\n<%= config.bin %> <%= command.id %> --config-file ./code-analyzer.yml --rule-selector all",
"Write the current state of configuration to the file `code-analyzer.yml`, including any configuration from an existing `code-analyzer.yml` file. The command preserves all values from the original config, but overwrites any comments:\n<%= config.bin %> <%= command.id %> --config-file ./code-analyzer.yml --output-file code-analyzer.yml",
"Display the configuration state for just the recommended rules, instead of all the rules:\n<%= config.bin %> <%= command.id %> --rule-selector Recommended",
"Display all the default rule values for the recommended rules, instead of only the rule values you've explicitly overriden in your `code-analyzer.yml` file. By default, only overriden rule values are displayed unless you specify the `--include-unmodified-rules` flag:\n<%= config.bin %> <%= command.id %> --rule-selector Recommended --include-unmodified-rules",
"Display the configuration state associated with all the rules that are applicable to the files targeted within the folder `./src`:\n<%= config.bin %> <%= command.id %> --target ./src",
"Display any relevant configuration settings associated with the rule name 'no-undef' from the 'eslint' engine:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:no-undef",
"Display any relevant configuration settings associated with PMD rules whose severity is 2 or 3:\n<%= config.bin %> <%= command.id %> --rule-selector \"pmd:(2,3)\"",
"Load an existing configuration file called `existing-config.yml`, and then write the configuration to a new file called `new-config.yml`, the configuration state that is applicable to all rules that are relevant to the workspace located in the current folder:\n<%= config.bin %> <%= command.id %> --config-file ./existing-config.yml --workspace . --output-file ./subfolder-config.yml"
],
"flags": {
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"workspace": {
"char": "w",
"description": "Use the `--workspace` flag to display only the configuration associated with the rules that apply to the files that make up your workspace. Typically, a workspace is a single project folder that contains all your files. But it can also consist of one or more folders, one or more files, and use glob patterns (wildcards). If you specify this flag multiple times, then your workspace is the sum of the files and folders.\n\nThis command uses the types of files in the workspace, such as JavaScript or Typescript, to determine the applicable configuration state. For example, if your workspace contains only JavaScript files, then the command doesn't display configuration state associated with TypeScript rules. The command uses a file's extension to determine what kind of file it is, such as \".ts\" for TypeScript.\n\nSome engines can be configured to add additional rules based on what it finds in your workspace. For example, if you set the engines.eslint.auto_discover_eslint_config value of your `code-analyzer.yml` file to true, then supplying your workspace allows the \"eslint\" engine to examine your files in order to find ESLint configuration files that could potentially add in additional rules.\n\nIf you specify `--target` but not `--workspace`, then the current folder '.' is used as your workspace.",
"name": "workspace",
"summary": "Set of files that make up your workspace.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"target": {
"char": "t",
"description": "Use the `--target` flag to display the configuration state associated with the rules that apply to only a subset of targeted files within your workspace. You can specify a target as a file, a folder, or a glob pattern. If you specify this flag multiple times, then the full list of targeted files is the sum of the files and folders.\n\nThe command uses the type of the targeted files, such as JavaScript or Typescript, to determine which configuration state is applicable. For example, if you target only JavaScript files, then the command doesn't display the configuration state associated with TypeScript rules. The command uses a file's extension to determine what kind of file it is, such as \".ts\" for TypeScript.\n\nEach targeted file must live within the workspace specified by the `–-workspace` flag.\n\nIf you specify `--workspace` but not `--target`, then all the files within your workspace are targeted.",
"name": "target",
"summary": "Subset of files within your workspace that you want to target for analysis.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"rule-selector": {
"char": "r",
"description": "Use the `--rule-selector` flag to display only the configuration associated with the rules based on specific criteria. You can select by engine, such as the rules associated with the \"retire-js\" or \"eslint\" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names.\n\nYou can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector \"pmd:(Performance,Security):2\"` reduces the output to only contain the configuration state associated with PMD rules that have the Performance or Security tag and a severity of 2. You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes.\n\nIf you don't specify this flag, then the command uses the \"all\" rule selector.\n\nRun `<%= config.bin %> <%= command.id %> --rule-selector Recommended` to display the configuration state associated with just the 'Recommended' rules, instead of all the rules.",
"name": "rule-selector",
"summary": "Selection of rules, based on engine name, severity level, rule name, tag, or a combination of criteria separated by colons and commas, and grouped by parentheses.",
"default": [
"all"
],
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"config-file": {
"char": "c",
"description": "Use this flag to apply the customizations from a custom Code Analyzer configuration file to be displayed alongside the current Code Analyzer configuration state.\n\nIf you don't specify this flag, then the command looks for and applies a file named `code-analyzer.yml` or `code-analyzer.yaml` in your current folder.",
"name": "config-file",
"summary": "Path to the existing configuration file used to customize the engines and rules.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"output-file": {
"char": "f",
"description": "If you specify a file within folder, such as `--output-file ./config/code-analyzer.yml`, the folder must already exist, or you get an error. If the file already exists, a prompt asks if you want to overwrite it.\n\nIf you don't specify this flag, the command outputs the configuration state to the terminal.",
"name": "output-file",
"summary": "Output file to write the configuration state to. The file is written in YAML format.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"include-unmodified-rules": {
"description": "The default behavior of the config command is to not include the unmodified rules with their default values in the rule override settings (for the rules selected via the `–-rule-selector` flag). This default behavior prevents your configuration file from being unnecessarily large. If you want to include the unmodified rules, in addition to the modified rules, then specify this flag.",
"name": "include-unmodified-rules",
"summary": "Include unmodified rules in the rule override settings.",
"allowNo": false,
"type": "boolean"
}
},
"hasDynamicHelp": false,
"hiddenAliases": [],
"id": "code-analyzer:config",
"pluginAlias": "@salesforce/plugin-code-analyzer",
"pluginName": "@salesforce/plugin-code-analyzer",
"pluginType": "jit",
"strict": true,
"summary": "Output the current state of configuration for Code Analyzer.",
"enableJsonFlag": false,
"isESM": true,
"relativePath": [
"lib",
"commands",
"code-analyzer",
"config.js"
],
"aliasPermutations": [],
"permutations": [
"code-analyzer:config",
"config:code-analyzer"
]
},
"code-analyzer:rules": {
"aliases": [],
"args": {},
"description": "You can also view details about the rules, such as the engine it's associated with, tags, and description.\n\nUse this command to determine the exact set of rules to analyze your code. The `code-analyzer run` command has similar flags as this command, so once you've determined the flag values for this command that list the rules you want to run, you specify the same values to the `code-analyzer run` command.\n\nWe're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://sfdc.co/CodeAnalyzerFeedback.",
"examples": [
"List rules using the default behavior: include rules from all engines that have a \"Recommended\" tag; display the rules using concise table format; and automatically apply rule or engine overrides if a `code-analyzer.yml` or `code-analyzer.yaml` file exists in the current folder:\n<%= config.bin %> <%= command.id %>",
"The previous example is equivalent to this example:\n<%= config.bin %> <%= command.id %> --rule-selector Recommended --view table --config-file ./code-analyzer.yml",
"List the recommended rules for the \"eslint\" engine:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:Recommended",
"List all the rules for the \"eslint\" engine:\n<%= config.bin %> <%= command.id %> --rule-selector eslint",
"The previous example is equivalent to this example:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:all",
"List the details about all rules for all engines; also write the rules in JSON format to a file called \"rules.json\" in the \"out\" folder, which must already exist:\n<%= config.bin %> <%= command.id %> --rule-selector all --output-file ./out/rules.json --view detail",
"Get a more accurate list of the rules that apply specifically to your workspace (all the files in the current folder):\n<%= config.bin %> <%= command.id %> --rule-selector all --workspace .",
"List the recommended rules associated with a workspace that targets all the files in the folder \"./other-source\" and only the Apex class files (extension .cls) under the folder \"./force-app\":\n<%= config.bin %> <%= command.id %> --rule-selector Recommended --workspace . --target ./other-source --target ./force-app/**/*.cls",
"List all the \"eslint\" engine rules that have a moderate severity (3) and the recommended \"retire-js\" engine rules with any severity:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:3 --rule-selector retire-js:Recommended",
"List all the \"pmd\" engine rules that have a severity of moderate (3) or high (2) and the \"Performance\" tag.\n<%= config.bin %> <%= command.id %> --rule-selector \"pmd:(2,3):Performance\"",
"Similar to the previous example, but apply the rule overrides and engine settings from the configuration file called `code-analyzer2.yml` in the current folder. If, for example, you changed the severity of an \"eslint\" rule from moderate (3) to high (2) in the configuration file, then that rule isn't listed:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:3 --rule-selector retire-js:Recommended --config-file ./code-analyzer2.yml",
"List the details of the \"getter-return\" rule of the \"eslint\" engine and the rules named \"no-inner-declarations\" in any engine:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:getter-return --rule-selector no-inner-declarations --view detail",
"List the details of the recommended \"eslint\" engine rules that have the tag \"problem\" and high severity level (2) that apply when targeting the files within the folder \"./force-app\":\n<%= config.bin %> <%= command.id %> --rule-selector eslint:Recommended:problem:2 --view detail --target ./force-app"
],
"flags": {
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"workspace": {
"char": "w",
"description": "Use the `--workspace` flag to return a more accurate list of the rules that apply to the files that make up your workspace. Typically, a workspace is a single project folder that contains all your files. But it can also consist of one or more folders, one or more files, and use glob patterns (wildcards). If you specify this flag multiple times, then your workspace is the sum of the files and folders. \n\nThe command uses the types of files in the workspace, such as JavaScript or Typescript, to determine which rules to list. For example, if your workspace contains only JavaScript files, the command doesn't list TypeScript rules. The command uses a file's extension to determine what kind of file it is, such as \".ts\" for TypeScript.\n\nSome engines may be configured to add additional rules based on what it finds in your workspace. For example, if you set the engines.eslint.auto_discover_eslint_config value of your `code-analyzer.yml` file to true, then supplying your workspace allows the \"eslint\" engine to examine your files in order to find ESLint configuration files that could potentially add in additional rules.\n\nIf you specify `--target` but not `--workspace`, then the current folder '.' is used as your workspace.",
"name": "workspace",
"summary": "Set of files that make up your workspace.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"target": {
"char": "t",
"description": "Use the `--target` flag to return a more accurate list of the rules that apply to only a subset of targeted files within your workspace. You can specify a target as a file, a folder, or a glob pattern. If you specify this flag multiple times, then the full list of targeted files is the sum of the files and folders.\n\nThe command uses the type of the targeted files, such as JavaScript or Typescript, to determine which rules to list. For example, if you target only JavaScript files, the command doesn't list TypeScript rules. The command uses a file's extension to determine what kind of file it is, such as \".ts\" for TypeScript.\n\nEach targeted file must live within the workspace specified by the –-workspace flag.\n\nIf you specify `--workspace` but not `--target`, then all the files within your workspace are targeted.",
"name": "target",
"summary": "Subset of files within your workspace that you want to target for analysis.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"rule-selector": {
"char": "r",
"description": "Use the `--rule-selector` flag to select the list of rules based on specific criteria. For example, you can select by engine, such as the rules associated with the \"retire-js\" or \"eslint\" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names. Every rule has a name, which is unique within the scope of an engine. Most rules have tags, although it's not required. An example of a tag is \"Recommended\". \n\nYou can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector \"pmd:(Performance,Security):2\"` lists rules associated only with the \"pmd\" engine that have the Security or Performance tags and a high severity (2). You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes. \n\nRun `<%= config.bin %> <%= command.id %> --rule-selector all` to list the possible values for engine name, rule name, tags, and severity levels that you can use with this flag.",
"name": "rule-selector",
"summary": "Selection of rules, based on engine name, severity level, rule name, tag, or a combination of criteria separated by colons.",
"default": [
"Recommended"
],
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"config-file": {
"char": "c",
"description": "Code Analyzer has an internal default configuration for its rule and engine properties. If you want to override these defaults, you can create a Code Analyzer configuration file.\n\nWe recommend that you name your Code Analyzer configuration file `code-analyzer.yml` or `code-analyzer.yaml` and put it at the root of your workspace. You then don't need to use this flag when you run the `<%= command.id %>` command from the root of your workspace, because it automatically looks for either file in the current folder, and if found, applies its rule overrides and engine settings. If you want to name the file something else, or put it in an alternative folder, then you must specify this flag.\n\nTo help you get started, use the `code-analyzer config` command to create your first Code Analyzer configuration file. With it, you can change the severity of an existing rule, change a rule's tags, and so on. Then use this flag to specify the file so that the command takes your customizations into account.",
"name": "config-file",
"summary": "Path to the configuration file used to customize the engines and rules.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"output-file": {
"char": "f",
"description": "If you don't specify this flag, the command outputs the rules to only the terminal. Use this flag to write the rules to a file; the format of the rules depends on the extension you provide. For example, `--output-file rules.csv` creates a comma-separated values file. You can specify one of these extensions:\n\n- .csv\n- .json\n\nTo output the rules to multiple files, specify this flag multiple times. For example, `--output-file rules.json --output-file rules.csv` creates both a JSON file and a CSV file.\n\nIf you specify a file within folder, such as `--output-file ./out/rules.json`, the folder must already exist, or you get an error. If the file already exists, it's overwritten without prompting.",
"name": "output-file",
"summary": "Name of the file where the selected rules are written. The file format depends on the extension you specify; the currently supported extensions are .json and .csv",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"view": {
"char": "v",
"description": "The format `table` is concise and shows minimal output, the format `detail` shows all available information. \n\nIf you specify neither `--view` nor `--output-file`, then the default table view is shown. If you specify `--output-file` but not `--view`, only summary information is shown in the terminal.",
"name": "view",
"summary": "Format to display the rules in the terminal.",
"hasDynamicHelp": false,
"multiple": false,
"options": [
"detail",
"table"
],
"type": "option"
}
},
"hasDynamicHelp": false,
"hiddenAliases": [],
"id": "code-analyzer:rules",
"pluginAlias": "@salesforce/plugin-code-analyzer",
"pluginName": "@salesforce/plugin-code-analyzer",
"pluginType": "jit",
"strict": true,
"summary": "List the rules that are available to analyze your code.",
"enableJsonFlag": false,
"isESM": true,
"relativePath": [
"lib",
"commands",
"code-analyzer",
"rules.js"
],
"aliasPermutations": [],
"permutations": [
"code-analyzer:rules",
"rules:code-analyzer"
]
},
"code-analyzer:run": {
"aliases": [],
"args": {},
"description": "You can scan your codebase with the recommended rules. Or use flags to filter the rules based on engines (such as \"retire-js\" or \"eslint\"), rule names, tags, and more. \n\nIf you want to preview the list of rules before you actually run them, use the `code-analyzer rules` command, which also has the `--config-file`, `--rule-selector`, `--target`, and `--workspace` flags that together define the list of rules to be run.\n\nWe're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://sfdc.co/CodeAnalyzerFeedback.",
"examples": [
"Analyze code using the default behavior: analyze all the files in the current folder (default workspace) using the Recommended rules; display the output in the terminal with the concise table view; and automatically apply rule or engine overrides if a `code-analyzer.yml` or `code-analyzer.yaml` file exists in the current folder:\n<%= config.bin %> <%= command.id %>",
"The previous example is equivalent to this example:\n<%= config.bin %> <%= command.id %> --rule-selector Recommended --workspace . --target . --view table --config-file ./code-analyzer.yml",
"Analyze the files using the recommended \"eslint\" rules and show details of the violations:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:Recommended --view detail",
"Analyze the files using all the \"eslint\" rules:\n<%= config.bin %> <%= command.id %> --rule-selector eslint",
"The previous example is equivalent to this example:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:all",
"Analyze the files using all rules for all engines:\n<%= config.bin %> <%= command.id %> --rule-selector all",
"Analyze the files using only rules in the \"pmd\" engine with a severity of high (2) or moderate (3), and the \"Performance\" tag.\n<%= config.bin %> <%= command.id %> --rule-selector \"pmd:(2,3):Performance\"",
"Analyze files using the recommended \"retire-js\" rules; target all the files in the folder \"./other-source\" and only the Apex class files (extension .cls) in the folder \"./force-app\":\n<%= config.bin %> <%= command.id %> --rule-selector retire-js:Recommended --target ./other-source --target ./force-app/**/*.cls",
"Specify a custom configuration file and output the results to the \"results.csv\" file in CSV format; the commands fails if it finds a violation that exceeds the moderate severity level (3):\n<%= config.bin %> <%= command.id %> --config-file ./code-analyzer2.yml --output-file results.csv --severity-threshold 3",
"Analyze the files using all the \"eslint\" engine rules that have a moderate severity (3) and the recommended \"retire-js\" engine rules with any severity:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:3 --rule-selector retire-js:Recommended",
"Analyze the files using only the \"getter-return\" rule of the \"eslint\" engine and any rule named \"no-inner-declarations\" from any engine:\n<%= config.bin %> <%= command.id %> --rule-selector eslint:getter-return --rule-selector no-inner-declarations"
],
"flags": {
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"workspace": {
"char": "w",
"description": "Typically, a workspace is a single project folder that contains all your files. But it can also consist of one or more folders, one or more files, and use glob patterns (wildcards). If you specify this flag multiple times, then your workspace is the sum of the files and folders.\n\nSome engines often need your entire code base to perform an analysis, even if you want to target only a subset of the files within your workspace , such as with the `--target` flag. For example, the Salesforce Graph Engine might need to compile your entire project in order to properly build a graph so it can perform a data flow analysis on the paths that start in your targeted files.\n\nIf you don't specify the `--workspace` flag, then the current folder '.' is used as your workspace.",
"name": "workspace",
"summary": "Set of files that make up your workspace.",
"default": [
"."
],
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"target": {
"char": "t",
"description": "You can specify a target as a file, a folder, or a glob pattern.\n\nIf you specify this flag multiple times, then the full list of targeted files is the sum of the files and folders.\n\nEach targeted file must live within the workspace that you specified with the `–-workspace` flag.\n\nIf you don't specify the `--target` flag, then all the files within your workspace (specified by the `--workspace` flag) are targeted for analysis.",
"name": "target",
"summary": "Subset of files within your workspace to be targeted for analysis.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"rule-selector": {
"char": "r",
"description": "Use the `--rule-selector` flag to select the list of rules to run based on specific criteria. For example, you can select by engine, such as the rules associated with the \"retire-js\" or \"eslint\" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names. Every rule has a name, which is unique within the scope of an engine. Most rules have tags, although it's not required. An example of a tag is \"Recommended\".\n\nYou can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector \"pmd:(Performance,Security):2\"` runs rules associated only with the \"pmd\" engine that have the Security or Performance tags and a high severity (2). You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes.\n\nRun `<%= config.bin %> code-analyzer rules --rule-selector all` to see the possible values for engine name, rule name, tags, and severity levels that you can use with this flag.",
"name": "rule-selector",
"summary": "Selection of rules, based on engine name, severity level, rule name, tag, or a combination of criteria separated by colons.",
"default": [
"Recommended"
],
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"severity-threshold": {
"char": "s",
"description": "You can specify either a number (2) or its equivalent string (\"High\").",
"name": "severity-threshold",
"summary": "Severity level of a found violation that must be met or exceeded to cause this command to fail with a non-zero exit code.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"view": {
"char": "v",
"description": "The format `table` is concise and shows minimal output, the format `detail` shows all available information.\n\nIf you specify neither `--view` nor `--output-file`, then the default table view is shown. If you specify `--output-file` but not `--view`, only summary information is shown.",
"name": "view",
"summary": "Format to display the command results in the terminal.",
"hasDynamicHelp": false,
"multiple": false,
"options": [
"detail",
"table"
],
"type": "option"
},
"output-file": {
"char": "f",
"description": "If you don't specify this flag, the command outputs the results to only the terminal. Use this flag to print the results to a file; the format of the results depends on the extension you provide. For example, `--output-file results.csv` creates a comma-separated values file. You can specify one of these extensions:\n\n- .csv\n- .html or .htm\n- .json\n- .sarif or .sarif.json\n- .xml\n\nTo output the results to multiple files, specify this flag multiple times. For example: `--output-file results.json --output-file report.html` creates both a JSON results file and an HTML file.\n\nIf you specify a file within a folder, such as `--output-file ./out/results.json`, the folder must already exist, or you get an error. If the file already exists, it's overwritten without prompting.",
"name": "output-file",
"summary": "Name of the file where the analysis results are written. The file format depends on the extension you specify, such as .csv, .html, .xml, and so on.",
"delimiter": ",",
"hasDynamicHelp": false,
"multiple": true,
"type": "option"
},
"config-file": {
"char": "c",
"description": "Code Analyzer has an internal default configuration for its rule and engine properties. If you want to override these defaults, you can create a Code Analyzer configuration file.\n\nWe recommend that you name your Code Analyzer configuration file `code-analyzer.yml` or `code-analyzer.yaml` and put it at the root of your workspace. You then don't need to use this flag when you run the `<%= command.id %>` command from the root of your workspace, because it automatically looks for either file in the current folder, and if found, applies its rule overrides and engine settings. If you want to name the file something else, or put it in an alternative folder, then you must specify this flag.\n\nTo help you get started, use the `code-analyzer config` command to create your first Code Analyzer configuration file. With it, you can change the severity of an existing rule, change a rule's tags, and so on. Then use this flag to specify the file so that the command takes your customizations into account.",
"name": "config-file",
"summary": "Path to the configuration file used to customize the engines and rules.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
}
},
"hasDynamicHelp": false,
"hiddenAliases": [],
"id": "code-analyzer:run",
"pluginAlias": "@salesforce/plugin-code-analyzer",
"pluginName": "@salesforce/plugin-code-analyzer",
"pluginType": "jit",
"strict": true,
"summary": "Analyze your code with a selection of rules to ensure good coding practices.",
"enableJsonFlag": false,
"isESM": true,
"relativePath": [
"lib",
"commands",
"code-analyzer",
"run.js"
],
"aliasPermutations": [],
"permutations": [
"code-analyzer:run",
"run:code-analyzer"
]
},
"community:create": {
"aliases": [
"force:community:create"
],
"args": {},
"deprecateAliases": true,
"description": "Run the \"community list template\" command to see the templates available in your org. See 'Which Experience Cloud Template Should I Use?' in Salesforce Help for more information about the different template types available. (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5)\n\nWhen you create a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED or AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED. Name and values are case-sensitive. See 'DigitalExperienceBundle' in the Metadata API Developer Guide for more information. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_digitalexperiencebundle.htm)\n\nThe site creation process is an async job that generates a jobId. To check the site creation status, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)\n\nIf the job doesn’t complete within 10 minutes, it times out. You receive an error message and must restart the site creation process. Completed jobs expire after 24 hours and are removed from the database.\n\nWhen you run this command, it creates the site in preview status, which means that the site isn't yet live. After you finish building your site, you can make it live.\n\nIf you have an Experience Builder site, publish the site using the \"community publish\" command to make it live.\n\nIf you have a Salesforce Tabs + Visualforce site, to activate the site and make it live, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm) Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nFor Experience Builder sites, activating the site sends a welcome email to site members.",
"examples": [
"Create an Experience Cloud site using template 'Customer Service' and URL path prefix 'customers':\n<%= config.bin %> <%= command.id %> --name 'My Customer Site' --template-name 'Customer Service' --url-path-prefix customers --description 'My customer site'",
"Create a site using 'Partner Central' template:\n<%= config.bin %> <%= command.id %> --name partnercentral --template-name 'Partner Central' --url-path-prefix partners",
"Create a site using the 'Build Your Own (LWR)' template with authentication type of UNAUTHENTICATED:\n<%= config.bin %> <%= command.id %> --name lwrsite --template-name 'Build Your Own (LWR)' --url-path-prefix lwrsite templateParams.AuthenticationType=UNAUTHENTICATED"
],
"flags": {
"json": {
"description": "Format output as json.",
"helpGroup": "GLOBAL",
"name": "json",
"allowNo": false,
"type": "boolean"
},
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"name": {
"char": "n",
"name": "name",
"required": true,
"summary": "Name of the site to create.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"template-name": {
"aliases": [
"templatename"
],
"char": "t",
"deprecateAliases": true,
"description": "An example of a template is Customer Service. Run the \"community template list\" command to see which templates are available in your org.",
"name": "template-name",
"required": true,
"summary": "Template to use to create a site.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"url-path-prefix": {
"aliases": [
"urlpathprefix"
],
"char": "p",
"deprecateAliases": true,
"description": "For example, if your domain name is https://MyDomainName.my.site.com and you create a customer site, enter 'customers' to create the unique URL https://MyDomainName.my.site.com/customers.",
"name": "url-path-prefix",
"summary": "URL to append to the domain created when Digital Experiences was enabled for this org.",
"default": "",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"description": {
"char": "d",
"description": "The description displays in Digital Experiences - All Sites in Setup and helps with site identification.",
"name": "description",
"summary": "Description of the site.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"target-org": {
"aliases": [
"targetusername",
"u"
],
"char": "o",
"deprecateAliases": true,
"name": "target-org",
"noCacheDefault": true,
"required": true,
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
"hasDynamicHelp": true,
"multiple": false,
"type": "option"
},
"loglevel": {
"deprecated": {
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
},
"hidden": true,
"name": "loglevel",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"api-version": {
"aliases": [
"apiversion"
],
"deprecateAliases": true,
"description": "Override the api version used for api requests made by this command",
"name": "api-version",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
}
},
"hasDynamicHelp": true,
"hiddenAliases": [],
"id": "community:create",
"pluginAlias": "@salesforce/plugin-community",
"pluginName": "@salesforce/plugin-community",
"pluginType": "jit",
"strict": false,
"summary": "Create an Experience Cloud site using a template.",
"enableJsonFlag": true,
"isESM": true,
"relativePath": [
"lib",
"commands",
"community",
"create.js"
],
"aliasPermutations": [
"force:community:create",
"community:force:create",
"community:create:force",
"force:create:community",
"create:force:community",
"create:community:force"
],
"permutations": [
"community:create",
"create:community"
]
},
"community:publish": {
"aliases": [
"force:community:publish"
],
"args": {},
"deprecateAliases": true,
"description": "Each time you publish a site, you update the live site with the most recent updates. When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access for site members.\n\nIn addition to publishing, you must activate a site to send a welcome email to all site members. Activation is also required to set up SEO for Experience Builder sites. To activate a site, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm) Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nAn email notification informs you when your changes are live on the published site. The site publish process is an async job that generates a jobId. To check the site publish status manually, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)\n\nIf the job doesn’t complete within 15 minutes, it times out. You receive an error message and must restart the site publish process. Completed jobs expire after 24 hours and are removed from the database.",
"examples": [
"Publish the Experience Builder site with name \"My Customer Site':\n<%= config.bin %> <%= command.id %> --name 'My Customer Site'"
],
"flags": {
"json": {
"description": "Format output as json.",
"helpGroup": "GLOBAL",
"name": "json",
"allowNo": false,
"type": "boolean"
},
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"name": {
"char": "n",
"name": "name",
"required": true,
"summary": "Name of the Experience Builder site to publish.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"target-org": {
"aliases": [
"targetusername",
"u"
],
"char": "o",
"deprecateAliases": true,
"name": "target-org",
"noCacheDefault": true,
"required": true,
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
"hasDynamicHelp": true,
"multiple": false,
"type": "option"
},
"api-version": {
"aliases": [
"apiversion"
],
"deprecateAliases": true,
"description": "Override the api version used for api requests made by this command",
"name": "api-version",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"loglevel": {
"deprecated": {
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
},
"hidden": true,
"name": "loglevel",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
}
},
"hasDynamicHelp": true,
"hiddenAliases": [],
"id": "community:publish",
"pluginAlias": "@salesforce/plugin-community",
"pluginName": "@salesforce/plugin-community",
"pluginType": "jit",
"strict": true,
"summary": "Publish an Experience Builder site to make it live.",
"enableJsonFlag": true,
"isESM": true,
"relativePath": [
"lib",
"commands",
"community",
"publish.js"
],
"aliasPermutations": [
"force:community:publish",
"community:force:publish",
"community:publish:force",
"force:publish:community",
"publish:force:community",
"publish:community:force"
],
"permutations": [
"community:publish",
"publish:community"
]
},
"community:list:template": {
"aliases": [
"force:community:template:list"
],
"args": {},
"deprecateAliases": true,
"description": "See 'Which Experience Cloud Template Should I Use?' (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5) in Salesforce Help for more information about the different template types available for Experience Cloud.",
"examples": [
"Retrieve the template list from an org with alias my-scratch-org:\n<%= config.bin %> <%= command.id %> --target-org my-scratch-org"
],
"flags": {
"json": {
"description": "Format output as json.",
"helpGroup": "GLOBAL",
"name": "json",
"allowNo": false,
"type": "boolean"
},
"flags-dir": {
"helpGroup": "GLOBAL",
"name": "flags-dir",
"summary": "Import flag values from a directory.",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"target-org": {
"aliases": [
"targetusername",
"u"
],
"char": "o",
"deprecateAliases": true,
"name": "target-org",
"noCacheDefault": true,
"required": true,
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
"hasDynamicHelp": true,
"multiple": false,
"type": "option"
},
"api-version": {
"aliases": [
"apiversion"
],
"deprecateAliases": true,
"description": "Override the api version used for api requests made by this command",
"name": "api-version",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
},
"loglevel": {
"deprecated": {
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
},
"hidden": true,
"name": "loglevel",
"hasDynamicHelp": false,
"multiple": false,
"type": "option"
}
},
"hasDynamicHelp": true,
"hiddenAliases": [],
"id": "community:list:template",
"pluginAlias": "@salesforce/plugin-community",
"pluginName": "@salesforce/plugin-community",
"pluginType": "jit",
"strict": true,
"summary": "Retrieve the list of templates available in your org.",
"enableJsonFlag": true,
"isESM": true,
"relativePath": [
"lib",
"commands",
"community",
"list",
"template.js"
],
"aliasPermutations": [
"force:community:template:list",
"community:force:template:list",
"community:template:force:list",
"community:template:list:force",
"force:template:community:list",
"template:force:community:list",
"template:community:force:list",
"template:community:list:force",
"force:template:list:community",
"template:force:list:community",
"template:list:force:community",
"template:list:community:force",
"force:community:list:template",
"community:force:list:template",
"community:list:force:template",
"community:list:template:force",
"force:list:community:template",
"list:force:communi