---
schema_version: "1"
id: 77f8256e2438f3939542fbe00f4ddc1d57d583720979cb0337ff0da2567d3181
title: Command Properties
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfcliplugin/guides/code/command-properties.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/command-properties.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 49b5c75ba12ec4134cbe5c79cd0fcb0c9e711732c50aceb95c837353f943fa64
products:
  - Salesforce CLI Plugin Developer Guide
  - salesforcedx
---
# Command Properties

If you extend the base [`SfCommand` class](https://salesforcecli.github.io/sf-plugins-core/classes/sfCommand.SfCommand-1.html), you get lots of out-of-the-box functionality to develop highly usable commands. Our command generator (`sf dev generate command`) creates a Typescript class for your new command that automatically extends `SfCommand`.

Here's a brief overview of the various class properties you can set to alter the behavior of your command. See [`SfCommand` class](https://salesforcecli.github.io/sf-plugins-core/classes/sfcommand.html) and the [oclif docs](https://oclif.io/) to dig a little deeper. To see many of these properties in action, look at the [`DeployMetadata` class](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/main/src/commands/project/deploy/start.ts#L34), which implements the `sf project deploy start` core Salesforce CLI command.

- `summary` - String that briefly describes the purpose of the command. Displayed with the `--help | -h` flags.
- `description` - String that provides a more in-depth explanation of the command. Displayed with the `--help` flag.
- `examples` - Array of strings that provide examples of how to use the command. Displayed with the `--help` flag. Rather than "hard code" the CLI command name in the corresponding messages Markdown file, such as `sf hello world`, use the string `<%= config.bin %> <%= command.id %>` instead. The CLI framework automatically inserts the command.
- `aliases` - Array of strings that describe the different names that this command can be invoked by. You typically use the `aliases` property for only backward compatibility when you're changing the name of a command.
- `state` - Set to `beta` if you want your command to warn users that it's still in development.
- `hidden` - Set to `true` if you want to hide your command from users.
- `configurationVariablesSection` - [`HelpSection`](https://github.com/salesforcecli/sf-plugins-core/blob/main/src/util.ts#L17) that describes the configuration variables that you can use with this command. Only used for displaying help with the `--help` flag.
- `envVariablesSection` - [`HelpSection`](https://github.com/salesforcecli/sf-plugins-core/blob/main/src/util.ts#L17) that describes the environment variables that can be used with this command. Only used for displaying help with the `--help` flag.
- `errorCodes` - [`HelpSection`](https://github.com/salesforcecli/sf-plugins-core/blob/main/src/util.ts#L17) that describes the error codes that the command can return. Only used for displaying help with the `--help` flag.
- `requiresProject` - Set to `true` if you want the command to throw an error if the user isn't running the command from inside a Salesforce project directory.
- `enableJsonFlag` - Set to `false` to disable the `--json` flag for your command.
