env Commands (Retiring)
env compute collaborator add
Examples for env compute collaborator add
Add a Heroku user as a collaborator on this Functions account.
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -h | --heroku-user HEROKU-USER
- Required
-
Email address of the Heroku user you're adding as a collaborator.
- Type: option
env create compute
Description for env create compute
Compute environments must be connected to a Salesforce org. By default the command uses your local environment's connected org. Use the '--connected-org' flag to specify a specific org. Run 'sf env list' to see a list of environments.
Examples for env create compute
Create a compute environment to run Salesforce Functions:
Connect the environment to a specific org:
Create an alias for the compute environment:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -o | --connected-org CONNECTED-ORG
- Optional
-
Username or alias for the org that the compute environment should be connected to.
- Type: option
- -a | --alias ALIAS
- Optional
-
Alias for the created environment.
- Type: option
env delete
Description for env delete
You must include the name of the environment to delete using '--target-compute'. Run 'sf env list' to see a list of environments.
Running this command will prompt a confirmation. If you want to skip this confirmation, use the '--confirm' flag and the environment alias to skip confirmation.
Examples for env delete
Delete a compute environment:
Delete without a confirmation step:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Environment name.
- Type: option
- --confirm CONFIRM
- Optional
-
Confirmation name.
- Type: option
env display
Description for env display
Specify an environment with either the username you used when you logged into the environment with "sf login", or the alias you gave the environment when you created it. Run "sf env list" to view all your environments and their aliases.
Output depends on the type of environment.
Examples for env display
Display details about the "myEnv" environment:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-env TARGET-ENV
- Optional
-
Environment alias or login user.
- Type: option
env list
Description for env list
By default, the command displays active environments.
Output is displayed in multiple tables, one for each environment type.
The compute environment table shows the alias, information about the connected orgs, the project name, and more.
Use the table manipulation flags, such as --filter and --sort, to change how the data is displayed.
Run "sf env display" to view details about a specific environment.
Examples for env list
List all active environments:
List both active and inactive environments:
Don't truncate the displayed output and instead wrap text that's wider than your terminal:
Display only the table data, not the headers, in comma-separated value (csv) format:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -a | --all
- Optional
-
Show all environments, even inactive ones.
- Type: boolean
- --columns COLUMNS
- Optional
-
List of columns to display.
- Type: option
- --csv
- Optional
-
Output in csv format [alias: --output=csv]
- Type: boolean
- --filter FILTER
- Optional
-
Filter property by partial string matching.
- Type: option
- --no-header
- Optional
-
Hide table header from output.
- Type: boolean
- --no-truncate
- Optional
-
Don't truncate output to fit screen.
- Type: boolean
- --output OUTPUT
- Optional
-
Format in which to display the output.
- Type: option
- Permissible values are: csv, json, yaml
- --sort SORT
- Optional
-
Column to sort by (prepend '-' for descending).
- Type: option
env log (Beta)
Examples for env log
Stream log output:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Compute environment name to retrieve logs.
- Type: option
- -n | --num NUM
- Optional
-
Number of lines to display.
- Type: option
env logdrain add
Description for env logdrain add
Both '--target-compute' and '--url' are required flags. '--url' should be a HTTP or HTTPS URL that can receive the log drain messages.
Examples for env logdrain add
Add a log drain:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Environment name.
- Type: option
- -l | --drain-url DRAIN-URL
- Optional
-
Endpoint that will receive sent logs.
- Type: option
env logdrain remove
Description for env logdrain remove
Both '--target-compute' and '--drain-url' are required flags.
Examples for env logdrain remove
Remove a logdrain:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Environment name.
- Type: option
- -l | --drain-url DRAIN-URL
- Optional
-
Log drain url to remove.
- Type: option
env open
Description for env open
Each of your environments is associated with an instance URL, such as https://login.salesforce.com. To open a specific web page, specify the portion of the URL after "<URL>/" with the --path flag.
Examples for env open
Open the compute environment with alias "test-compute":
View the URL but don't launch it in a browser:
Open the environment in the Google Chrome browser:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -p | --path PATH
- Optional
-
Path to append to the end of the login URL.
- Type: option
- -r | --url-only
- Optional
-
Display the URL, but don’t launch it in a browser.
- Type: boolean
- -e | --target-env TARGET-ENV
- Optional
-
Login user or alias of the environment to open.
- Type: option
- --browser BROWSER
- Optional
-
Browser in which to open the environment.
You can specify that the environment open in one of the following browsers: Firefox, Safari, Google Chrome, or Windows Edge. If you don’t specify --browser, the environment opens in your default browser. The exact names of the browser applications differ depending on the operating system you're on; check your documentation for details.
- Type: option
env var get
Description for env var get
You must provide the '--target-compute' flag and the key to retrieve.
Examples for env var get
Get a config variable:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Environment name.
- Type: option
env var list
Description for env var list
Use the '--json' flag to return config vars in JSON format.
Examples for env var list
List config vars:
List in JSON format:
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -e | --target-compute TARGET-COMPUTE
- Optional
-
Environment name.
- Type: option