CLI Commands

Updated 7 months ago by Copado Solutions

The Copado CLI is a Salesforce CLI plugin that allows you to perform a wide range of tasks, from logging in to your main Salesforce org to setting a user story or pushing changes to Git.

In this article we will go over all the commands you can execute with the Copado CLI.


Auth Commands

Use sfdx copado:auth to display the list of auth commands available:

  • sfdx copado:auth:set
    Use this command to configure the CLI to work with a Copado user org credential using either the username or the alias. Examples:
    • sfdx copado:auth:set -u [copadouser@mycompany.com]
    • sfdx copado:auth:set -a [myCopadoOrgAlias]

  • sfdx copado:auth:display
    Use this command to show the username that has been used to authenticate the Copado CLI.

Config Commands

Use sfdx copado:config to display the list of config commands. The available options are:

  • sfdx copado:config:list
    Use this command to show the Copado CLI configuration.

  • sfdx copado:config:set
    Use this command to set or update a configuration variable. Examples:
    • sfdx copado:config:set defaultlistview=[MyNewlyCreatedListView]
    • sfdx copado:config:set externalid=[Jira_External_Id__c]

Work Commands

Use sfdx copado:work to display the list of work commands.

  • sfdx copado:work:set
    Use this command to set a user story to work with and create or check out the feature branch. Examples:
    • sfdx copado:work:set -e [Jira002]
      This command will set a user story with the external Id set in the configuration.

    • sfdx copado:work:set -i [user story Id]
      This command will set the user story using the Salesforce Id.

    • sfdx copado:work:set -s [user story name]
      This command will set the user story using the name.

  • sfdx copado:work:display
    Use this command to show information about the current user story. You can create a list view to display additional fields when using this command. Examples:
    • sfdx copado:work:display -i [user story Id]
      This command will look for the user story using the user story Id.

    • sfdx copado:work:display -s [user story name]
      This command will look for the user story using the user story name.

  • sfdx copado:work:list
    This command will show the configured list view in the CLI.

  • sfdx copado:work:open
    This command will open the user story.

  • sfdx copado:work:push
    Push local changes to Git and Copado. This will create all the required data records and attachments in Copado. This will also create the remote feature branch.

  • Please note that when pushing changes through the Copado CLI, Copado pushes the entire file.

  • sfdx copado:work:submit
    Use work:submit commands to submit a user story and apply validations. Examples:
    • sfdx copado:work:submit -v
      This command will execute a deployment validation.

    • sfdx copado:work:submit -p
      This command will mark a user story as promote.

    • sfdx copado:work:submit -d
      This command will mark a user story as promote and deploy.


How did we do?