apex Commands

Use the apex commands to create Apex classes, execute anonymous blocks, view your logs, run Apex tests, and view Apex test results.

  • apex get log
    Fetch the specified log or given number of most recent logs from the org.
  • apex get test
    Display test results for a specific asynchronous test run.
  • apex list log
    Display a list of IDs and general information about debug logs.
  • apex run
    Execute anonymous Apex code entered on the command line or from a local file.
  • apex run test
    Invoke Apex tests in an org.
  • apex tail log
    Activate debug logging and display logs in the terminal.