aer
Aer Exec

aer exec

Execute anonymous Apex code

Synopsis

Execute anonymous Apex code.

The Apex code can be provided as a positional argument or piped via stdin. Use the –path flag to specify source directories containing additional Apex classes.

aer exec [apex-code] [flags]

Options

      --allow-callouts             allow outbound HTTP callouts to endpoints permitted by Remote Site Settings or Named Credentials
      --bootstrap-db string        bootstrap SQLite database to seed before execution
      --db string                  SQLite database file to use (for debugging, default: in-memory)
      --debug                      Enable debug mode with DAP server
  -d, --default-namespace string   treat loaded code as if it belongs to the specified namespace
      --enforce-governor-limits    enforce governor limit checks during anonymous execution
      --feature strings            enable optional features (PersonAccounts, HealthCloud, LiveAgent, MultiCurrency)
  -h, --help                       help for exec
      --package strings            package files to load (can be specified multiple times)
      --package-dir strings        directories containing .pkg files to load (can be specified multiple times)
  -p, --path strings               source paths containing Apex classes (can be specified multiple times)
      --profile file[="-"]         write Apex profiling data to file (use --profile without a file to open in Perfetto)
      --sandbox                    set Organization.IsSandbox to true
      --timezone string            default timezone for users (e.g., America/Los_Angeles, America/Chicago)
      --trace file[="-"]           write Apex execution trace to file (use --trace without a file to open in Perfetto)

Options inherited from parent commands

  -q, --quiet           suppress progress output
  -v, --verbose count   increase verbosity (repeat for more detail)

SEE ALSO

  • aer - aer is the Apex Execution Runtime
© 2012–2026 October Swimmer.