One CLI to rule them all...

qforce is a set of commands to help with salesforce development process. This is still very experimental so expect things to change a lot. Originally developed to support my own work while working across operating systems.

$ npm install -g qforce
$ qforce COMMAND
running command...
$ qforce (-v|--version|version)
qforce/0.2.2 darwin-x64 node-v10.13.0
$ qforce --help [COMMAND]
USAGE
  $ qforce COMMAND
...


  • qforce dev:code

    Open all files committed in a branch in VS Code

    Usage

      $ qforce dev:code [FEATUREBRANCH] [DEVELOPBRANCH]
    

    Options

      -f, --force
      -h, --help       show CLI help
      -n, --name=name  name to print
    
  • qforce dev:config

    To set configuration variables for use as defaults for other commands.

    Usage

      $ qforce dev:config [FILE]
    

    Options

      -g, --global                             To set or retrieve setting from global.
      -h, --help                               show CLI help
      -u, --targetusername=targetusername      Set or retrieve targetusername.
      --bulkStatusInterval=bulkStatusInterval  Interval in milliseconds for polling bluk job status.
      --bulkStatusRetries=bulkStatusRetries    Number of retries to poll status of bulk job.
      --exeFilePath=exeFilePath                Path to file to execute for exe command.
      --exeResultsPath=exeResultsPath          Path to save log of exe command execution.
      --init                                   Initiate qforce settings.
      --queryFilePath=queryFilePath            Path of query file to use with query command.
      --queryResultsPath=queryResultsPath      Path to save results of query command.
    
  • qforce dev:deploy

    To calculate and apply patch based on a branch. It will first check for all files committed in given [FEATUREBRANCH] and then copy them from currently checked out branch to .qforce/deploy folder.

    Usage

      $ qforce dev:deploy [FEATUREBRANCH] [DEVELOPBRANCH]
    

    Options

      -d, --diff                           Set to true if passing commit hash.
      -h, --help                           show CLI help
      -u, --username=username
      --lastDeployCommit=lastDeployCommit  Commit hash of the last commit.
    
  • qforce dev:feature

    To retrieve and deploy source based on YAML file.

    Usage

      $ qforce dev:feature FEATURENAME
    

    Options

      -d, --deploy             Deploys source already retrieved.
      -h, --help               show CLI help
      -r, --retrieve           Retrieve source based on YAML configuration.
    
      -s, --start              Start a new feature. Will create YAML file and folder
                               if not already exist.
    
      -u, --username=username
    
  • qforce dev:migrate

    Migrate data from one org to another based on a migration plan.

    Usage

      $ qforce dev:migrate
    

    Options

      -f, --file=file                Path of migration plan file. Must be relative to cwd and in unix format.
      -s, --source=source            source org username or alias.
      -d, --destination=destination  destination org username or alias
      -n, --name=name                Name of the step to execute.
      --sample                       Copy sample migration plan files to current directory.
      -h, --help                     show CLI help
    
  • qforce dev:patch

    To calculate and apply patch based on diff between feature branch and its main branch. While working on a feature, this is a handy way to copy changes from one branch to another or share with colleagues.

    Usage

      $ qforce dev:patch [FEATUREBRANCH] [DEVELOPBRANCH]
      # If patchPath is not set in .qforce/settings.json, then it can be provided as follows
      $ qforce dev:patch --patchPath path/to/patch/folder [FEATUREBRANCH] [DEVELOPBRANCH]
    

    Options

      -a, --apply                Set to true if want to apply calculated patch to current branch.
      -h, --help                 show CLI help
      -p, --patchPath=patchPath  Path to save the patch file.
    
  • qforce dev:release

    To manage yml based release build, retrieve and deploy.

    Usage

      $ qforce dev:release [RELEASENAME]
    

    Options

      -R, --removeFeature=removeFeature  Removes one or more features from the
                                         release specified.
    
      -a, --addFeature=addFeature        Adds one or more features to the release
                                         specified.
    
      -b, --build                        To recalculate components based on features
                                         listed.
    
      -d, --deploy                       Deploys source already retrieved.
    
      -h, --help                         show CLI help
    
      -r, --retrieve                     Retrieve source based on YAML
                                         configuration.
    
      -s, --start                        Start a new release. Will create YAML file
                                         and folder if not already exist.
    
      -u, --username=username
    
  • qforce dev:snippet

    Generates VS Code snippets to help using qforce. Aliases are saved in qforce.code-snippets file inside .vscode directory.

    Usage

      $ qforce dev:snippet
    

    Options

      -a, --alias=alias  Alias for the snippet
      -e, --exe          Create alias for anonymous apex at default exe path.
      -h, --help         show CLI help
      -i, --init         To initialize snippet file.
      -p, --path=path    Path to file that needs to be converted to snippet.
                         Required if query/exe flags not passed
      -q, --query        Create alias for query at default query path.
    
  • qforce dx:describe

    A wrapper for sfdx command to get description of an object.

    Usage

      $ qforce dx:describe
    

    Options

      -a, --all                To get all sObjects.
      -h, --help               show CLI help
      -r, --result=result      Relative path to save results.
      -s, --sobject=sobject    sObject name.
      -u, --username=username
    
  • qforce dx:exe

    Execute anonymous apex.

    Usage

      $ qforce dx:exe
    

    Options

      -f, --file=file          Relative path of apex file in unix format.
      -h, --help               show CLI help
      -r, --result=result      Relative path to save results.
      -u, --username=username
    
  • qforce dx:ol

    List of available orgs.

    Usage

      $ qforce dx:ol
    

    Options

      -h, --help     show CLI help
      -v, --verbose
    
  • qforce dx:open

    Open an org.

    Usage

      $ qforce dx:open
    

    Options

      -h, --help               show CLI help
      -p, --path=path
      -u, --username=username
    
  • qforce dx:query

    Run a SOQL and save results to csv.

    Usage

      $ qforce dx:query
    

    Options

      -f, --file=file          Relative path of query file in unix format.
      -h, --help               show CLI help
      -q, --query=query        SOQL query as string.
      -r, --result=result      Relative path to save results of query.
      -u, --username=username