Gathering detailed insights and metrics for @salesforce/plugin-command-reference
Gathering detailed insights and metrics for @salesforce/plugin-command-reference
Gathering detailed insights and metrics for @salesforce/plugin-command-reference
Gathering detailed insights and metrics for @salesforce/plugin-command-reference
Generate the Salesforce CLI command reference guide.
npm install @salesforce/plugin-command-reference
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1 Stars
1,491 Commits
6 Watching
19 Branches
15 Contributors
Updated on 24 Nov 2024
TypeScript (69.32%)
Handlebars (26.12%)
JavaScript (3.99%)
Shell (0.38%)
Batchfile (0.2%)
Cumulative downloads
Total Downloads
Last day
3.1%
3,389
Compared to previous day
Last week
-6.7%
22,754
Compared to previous week
Last month
0.5%
103,403
Compared to previous month
Last year
15.8%
1,475,386
Compared to previous year
Generate the Salesforce CLI command reference guide.
First install the plugin.
1$ sf plugins install @salesforce/plugin-command-reference
Ensure any plugins are installed that you with to generate documentation for.
1$ sf plugins:install salesforce@plugin-auth
Now we can generate the documentation for all core plug-ins.
1# notice we can use the oclif shorthand for the plugin name. @salesforce/plugin-foo => foo 2$ sf commandreference --plugins auth
Note: Warnings will occur for missing properties in plugins. Those have to be fixed in the plugin itself.
To add this to your plugin to catch warning at development time, add it as a dev plugin in the project.json.
1"oclif": { 2 "devPlugins": [ 3 "@salesforce/plugin-command-reference" 4 ] 5}
Then you can run this in your plugin's CI.
1./bin/dev commandreference --plugins <name-of-your-plugin> --error-on-warnings
If you need to make changes to this repository, the easiest thing to do is to link it to your Salesforce CLI. After you cloned this plugin, run the following from this plugin directory:
1sf plugins link .
How do you know if the output is correct, given your change?
1# Install the current version of the plugin (use `@sf` until the plugin is publishing the sf version as main) 2sf plugins install @salesforce/plugin-command-reference@sf 3# installs all JIT plugins (if you intend to produce ditamaps for them) 4sf jit install 5# run using a relatively current version of plugins, saving the output as a "gold file" 6sf commandreference generate --plugins login env deploy-retrieve settings functions info sobject limits schema custom-metadata data community signups user org packaging templates apex auth dev @salesforce/sfdx-plugin-lwc-test -d outputGold
While working on your branch
1sf plugins link . 2# run the same command from above, but with your new version of the plugin, writing to a new output file 3sf commandreference generate --plugins login env deploy-retrieve settings functions info sobject limits schema custom-metadata data community signups user org packaging templates apex auth dev @salesforce/sfdx-plugin-lwc-test -d outputNew
Now diff the output. Changes should be intentional!
sf commandreference generate
generate the command reference guide located
USAGE
$ sf commandreference generate [--json] [--flags-dir <value>] [-d <value>] [-p <value>... | -a] [-s <value>] [--hidden]
[--error-on-warnings] [-c <value>]
FLAGS
-a, --all include all relevant plugins in the generation
-c, --config-path=<value> A path to the directory containing a plugin or cli
-d, --output-dir=<value> [default: ./tmp/root] output directory to put generated files
-p, --plugins=<value>... comma separated list of plugin names to be part of the generation. Defaults to the oclif
plugin in the current working directory
-s, --ditamap-suffix=<value> [default: unified] unique suffix to append to generated ditamap
--error-on-warnings fail the command if there are any warnings
--hidden show hidden commands
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
generate the command reference guide located
generate the command reference guide located
EXAMPLES
Generate the command reference guide
$ sf commandreference generate
Generate the command reference for a set of plugins
$ sf commandreference generate --plugins pluginA,pluginB
Generate the command reference for all plugins
$ sf commandreference generate --all --output-dir ./docs
Generate the command reference for all plugins in a directory
$ sf commandreference generate --all --config-path /path/to/plugin --output-dir ./docs
See code: src/commands/commandreference/generate.ts
sf jit install
Install all JIT plugins.
USAGE
$ sf jit install [--json] [--flags-dir <value>] [-d]
FLAGS
-d, --dry-run List the plugins that would be installed.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
EXAMPLES
$ sf jit install
See code: src/commands/jit/install.ts
No vulnerabilities found.
No security vulnerabilities found.