Force.com CLI

What is it?

The Force.com CLI allows you to work with Force.com data directly from the command line. You can Browse and Create Force.com objects, view, edit, create, and delete records, execute APEX code and SOQL queries, and more.


Getting started

Once installed, you'll have access to the `force` command from your command shell. A Salesforce.com account is required. If you do not have one, sign-up for a free developer account:

$ force login

You're now ready to use the Force.com CLI:

$ force help
Usage:
  force [command]

Available Commands:
  active       Show or set the active force.com account
  apex         Execute anonymous Apex code
  apiversion   Display/Set current API version
  bigobject    Manage big objects
  bulk         Load csv file or query data using Bulk API
  completion   Generate the autocompletion script for the specified shell
  create       Creates a new, empty Apex Class, Trigger, Visualforce page, or Component.
  datapipe     Manage DataPipes
  describe     Describe the types of metadata available in the org
  eventlogfile List and fetch event log file
  export       Export metadata to a local directory
  fetch        Export specified artifact(s) to a local directory
  field        Manage SObject fields
  help         Help about any command
  import       Import metadata from a local directory
  limits       Display current limits
  log          Fetch debug logs
  login        Log into Salesforce and store a session token
  logins       List force.com logins used
  logout       Log out from Force.com
  notify       Should notifications be used
  oauth        Manage ConnectedApp credentials
  open         Open a browser window, logged into an authenticated Salesforce org
  package      Manage installed packages
  password     See password status or reset password
  pubsub       Subscribe to a pub/sub channel
  push         Deploy metadata from a local directory
  query        Execute a SOQL statement
  quickdeploy  Quick deploy validation id
  record       Create, modify, or view records
  rest         Execute a REST request
  search       Execute a SOSL statement
  security     Displays the OLS and FLS for a given SObject
  sobject      Manage standard & custom objects
  test         Run apex tests
  trace        Manage trace flags
  usedxauth    Authenticate with SFDX Scratch Org User
  version      Display current version
  whoami       Show information about the active account

Flags:
  -a, --account username    account username to use
  -V, --apiversion string   API version to use
  -h, --help                help for force

Use "force [command] --help" for more information about a command.