Skip to content

Commit 499d054

Browse files
update help markdown files for all "sf env" commands (#84)
1 parent 2cea21e commit 499d054

File tree

4 files changed

+75
-42
lines changed

4 files changed

+75
-42
lines changed

messages/display.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
1+
# summary
2+
3+
Display details about an environment.
4+
15
# description
26

3-
Display details about a specific environment
7+
Specify an environment with either the username you used when you ran the "sf login" command or the environment's alias. Run "sf env list" to view all your environments and their aliases.
8+
9+
Output depends on the type of environment. For example, scratch org details include the access token, alias, username of the associated Dev Hub, the creation and expiration date, the generated scratch org username, and more. Compute environment details include the associated orgs, the list of functions, the project name, and more.
410

511
# examples
612

7-
- sf env display -e my-scratch-org
8-
- sf env display -e user@name.com
13+
- Display details about a scratch org with alias my-scratch-org:
14+
15+
<%= config.bin %> <%= command.id %> --environment=my-scratch-org
16+
17+
- Specify a username instead of an alias:
18+
19+
<%= config.bin %> <%= command.id %> --environment=test-123456-abcdefg@example.com
20+
21+
- Specify JSON format and redirect output into a file:
22+
23+
<%= config.bin %> <%= command.id %> --environment=my-scratch-org --json > tmp/MyOrdDesc.json
924

1025
# flags.environment.summary
1126

12-
Environment name or alias to display.
27+
Environment alias or login user.
1328

1429
# error.NoResultsFound
1530

16-
No results found
31+
No results found.
1732

1833
# error.NoEnvFound
1934

2035
No environment found for %s.
2136

2237
# error.NoDefaultEnv
2338

24-
No default environment found. Use -e or --environment to specify which env to open.
39+
No default environment found. Use -e or --environment to specify an environment to open.
2540

2641
# error.NoAuthsAvailable
2742

messages/list.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
1+
# summary
2+
3+
List the environments you’ve created or logged into.
4+
15
# description
26

3-
List the environments you’ve created or logged into.
7+
By default, the command displays only active environments. For orgs, active means unexpired scratch orgs and orgs you’re currently logged into. For compute environments, active means the environments connected to orgs you’re currently logged into. Use the --all flag to list expired or deleted scratch orgs and compute environments that aren’t connected to logged-in orgs. Warning: the latter list could be very long.
8+
9+
Output is displayed in multiple tables, one for each environment type. For example, the Salesforce Orgs table lists the non-scratch orgs you’re logged into, such as sandboxes, Dev Hubs, production orgs, and so on. Scratch orgs and compute environments get their own tables.
10+
11+
For non-scratch orgs, the Username column refers to the user you logged into the org with. For scratch orgs it refers to the username that was generated for you when you created the scratch org. The first column indicates the default environment for each type.
12+
13+
Run "sf env display" to view details about a specific environment.
414

515
# examples
616

7-
- sf env list
8-
- sf env list --all
17+
- List all environments:
18+
19+
<%= config.bin %> <%= command.id %> --all
20+
21+
- Filter the output to list only connected orgs. Rows from only the Salesforce Orgs table are displayed because it’s the only table with a "Status" column.
22+
23+
<%= config.bin %> <%= command.id %> --filter "Status=Connected"
24+
25+
- List only scratch orgs that expire after May 30, 2021:
26+
27+
<%= config.bin %> <%= command.id %> --filter "Expiration>2021-05-30"
28+
29+
- Display only the Alias column and sort the aliases in descending order:
30+
31+
<%= config.bin %> <%= command.id %> --sort "-Alias" --columns "Alias"
932

1033
# flags.all.summary
1134

12-
Show all environments, including inactive orgs.
35+
Show all environments, even inactive ones.
1336

1437
# error.NoAuthsAvailable
1538

1639
There are no authentications available.
1740

1841
# error.NoResultsFound
1942

20-
No results found
43+
No results found.

messages/open.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,39 @@ Open an environment in your web browser.
66

77
You can open the following types of environments in a web browser: scratch orgs, sandboxes, Dev Hubs, and production orgs.
88

9-
If you run the command without flags, it attempts to open your default environment in your default web browser.
9+
If you run the command without flags, it attempts to open your default environment in your default web browser. Run "sf env list" to view your default environment.
1010

11-
# flags.path.summary
11+
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, such as /apex/YourPage to open a Visualforce page.
12+
13+
# examples
14+
15+
- Open your default environment:
16+
17+
<%= config.bin %> <%= command.id %>
18+
19+
- Open the Visualforce page /apex/StartHere in a scratch org with alias test-org:
1220

13-
Path to append to the end of the open URL.
21+
<%= config.bin %> <%= command.id %> --target-env test-org --path /apex/StartHere
1422

15-
# flags.path.description
23+
- View the URL but don't launch it in a browser:
24+
25+
<%= config.bin %> <%= command.id %> --target-env test-org --path /apex/StartHere --url-only
26+
27+
- Open the environment in the Google Chrome browser:
28+
29+
<%= config.bin %> <%= command.id %> --target-env test-org --path /apex/StartHere --browser chrome
30+
31+
# flags.path.summary
1632

17-
Each of your environments is associated with an instance URL, such as https://<mydomian>.my.salesforce.com. To open a specific web page at that URL, specify the portion of the URL after "<URL>/" with the --path flag, such as /apex/YourPage to open a Visualforce page.
33+
Path to append to the end of the login URL.
1834

1935
# flags.url-only.summary
2036

2137
Display the URL, but don’t launch it in a browser.
2238

2339
# flags.target-env.summary
2440

25-
Environment name or alias to open.
41+
Environment login user or alias to open.
2642

2743
# flags.target-env.description
2844

@@ -36,40 +52,20 @@ Browser in which to open the environment.
3652

3753
# flags.browser.description
3854

39-
Specify a browser by its app name according to your operating system. For example, Chrome’s app name is "google chrome" on macOS, "google-chrome" on Linux and "chrome" on Windows. So to open an environment in Chrome on macOS, specify --browser "google chrome". If you don’t specify --browser, the environment opens in your default browser.
40-
41-
For convenience, "chrome", "firefox", and "edge" are mapped to the OS specific app name.
42-
43-
# examples
44-
45-
- To open your default environment, run the command without flags:
46-
47-
<%= config.bin %> env open
48-
49-
- This example opens the Visualforce page /apex/StartHere in a scratch org with alias "test-org":
50-
51-
<%= config.bin %> env open --target-env test-org --path /apex/StartHere
52-
53-
- If you want to view the URL for the preceding command, but not launch it in a browser:
54-
55-
<%= config.bin %> env open --target-env test-org --path /apex/StartHere --url-only
56-
57-
- The preceding examples open the environment in your default web browser. To use a different browser, set the --browser flag to its OS-specific name. For example, to use Chrome on macOS:
58-
59-
<%= config.bin %> env open --target-env test-org --path /apex/StartHere --browser "google chrome"
55+
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.
6056

6157
# error.NoDefaultEnv
6258

63-
No default target-env found. Use --target-env to specify which env to open.
59+
No default target-env found. Use --target-env to specify the environment to open.
6460

6561
# error.NoEnvFound
6662

6763
No environment found for %s.
6864

6965
# error.EnvironmentNotSupported
7066

71-
The environment %s doesn't support bring opened.
67+
The environment %s doesn't support being opened.
7268

7369
# error.ApplicationNotFound
7470

75-
Unable to find application named %s.
71+
Can't find application named %s.

src/commands/env/open.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default class EnvOpen extends Command {
2727
path: Flags.string({
2828
char: 'p',
2929
summary: messages.getMessage('flags.path.summary'),
30-
description: messages.getMessage('flags.path.description'),
3130
}),
3231
'url-only': Flags.boolean({
3332
char: 'r',

0 commit comments

Comments
 (0)