Skip to content

Commit e4705ce

Browse files
Update kv and pg help text based on feedback from docs team (#504)
Updates help text for all pg and kv commands based on feedback from docs team. GROW-2707 GitOrigin-RevId: 8936f4b65a20f6b8043f12101a3200fbf9e688d4
1 parent 1b7fd75 commit e4705ce

17 files changed

Lines changed: 102 additions & 107 deletions

cmd/kv.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import "github.com/spf13/cobra"
55
func newKVCmd(children ...*cobra.Command) *cobra.Command {
66
cmd := &cobra.Command{
77
Use: "kv",
8-
Aliases: []string{"keyvalue"},
9-
Short: "Manage Key Value store instances (early access)",
8+
Aliases: []string{"keyvalues", "keyvalue"},
9+
Short: "Manage Render Key Value instances (early access)",
1010
}
1111
cmd.AddCommand(children...)
1212
return cmd

cmd/kvcreate.go

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ import (
1717
func newKVCreateCmd(deps *dependencies.Dependencies) *cobra.Command {
1818
cmd := &cobra.Command{
1919
Use: "create",
20-
Short: "Create a new Key Value store instance",
20+
Short: "Create a new Render Key Value instance",
2121
Args: cobra.NoArgs,
22-
Long: `Create a new Key Value store instance on Render.
22+
Long: `Create a new Render Key Value instance.
2323
2424
In interactive mode, a prompt guides you through each option one at a time.
2525
In non-interactive mode (--output text/json/yaml), flags use defaults if not supplied.
2626
Use --confirm to skip all prompts (including final confirmation) and create immediately.
27-
Output will be human-readable; use --output json/yaml/text for machine-readable output.
28-
29-
Examples:
30-
# Interactive wizard (guided prompts for each option)
27+
Output will be human-readable; use --output json/yaml/text for machine-readable output.`,
28+
Example: ` # Interactive wizard (guided prompts for each option)
3129
render ea kv create
3230
3331
# Specify all options; wizard still asks for confirmation before creating
@@ -45,27 +43,25 @@ Examples:
4543
--ip-allow-list "cidr=10.0.0.0/8,description=internal"`,
4644
}
4745

48-
cmd.Flags().String("name", "", "Key Value instance name (generated if not provided)")
49-
cmd.Flags().String("workspace", "", "Workspace ID or name. Defaults to the active workspace (set via 'render workspace set').")
50-
cmd.Flags().String("project", "", "Project ID or name (optional). Scopes environment lookup; if the project has exactly one environment it is used automatically.")
51-
cmd.Flags().String("environment", "", "Environment ID or name (optional). Example: Production or evm-abc123def456")
46+
cmd.Flags().String("name", "", "Set the Key Value instance name (generated if not provided)")
47+
cmd.Flags().String("workspace", "", "Set the workspace to create the Key Value in (ID or name). Defaults to the active workspace (set via 'render workspace set').")
48+
cmd.Flags().String("project", "", "Scope environment lookup to a project (ID or name, optional); if the project has exactly one environment it is used automatically.")
49+
cmd.Flags().String("environment", "", "Set the environment to create the Key Value in (ID or name, optional). Example: Production or evm-abc123def456")
5250

5351
cmd.Flags().String("plan", "",
54-
"Plan name. Examples: free | starter | standard | pro | pro_plus. Account-specific plan names are accepted.")
52+
"Set the plan to one of: free | starter | standard | pro | pro_plus. Custom enterprise plan names are also accepted.")
5553

5654
regionFlag := command.NewEnumInput(types.RegionValues(), false)
57-
cmd.Flags().Var(regionFlag, "region", "Region: frankfurt | ohio | oregon | singapore | virginia")
55+
cmd.Flags().Var(regionFlag, "region", "Set the region: frankfurt | ohio | oregon | singapore | virginia")
5856

5957
maxmemFlag := command.NewEnumInput(kvtypes.MemoryPolicyInputValues(), false)
6058
cmd.Flags().Var(maxmemFlag, "memory-policy",
61-
"Controls what the instance does when it runs out of memory to store new data.\n"+
62-
"Shortcuts: cache (sets allkeys_lru, recommended for caching) | queue (sets noeviction, recommended for job queues).\n"+
63-
"Technical values: noeviction | allkeys_lru | allkeys_lfu | allkeys_random | volatile_lru | volatile_lfu | volatile_random | volatile_ttl")
59+
"Set the eviction policy used when the instance runs out of memory.\n"+
60+
"Accepts a friendly alias — cache (= allkeys_lru, for caching) or queue (= noeviction, for job queues)\n"+
61+
"or any raw policy: noeviction | allkeys_lru | allkeys_lfu | allkeys_random | volatile_lru | volatile_lfu | volatile_random | volatile_ttl")
6462

6563
cmd.Flags().StringArray("ip-allow-list", nil,
66-
"Restrict inbound traffic to specific IP ranges. Repeat the flag for multiple entries.\n"+
67-
"Format: cidr=<range>,description=<label>\n"+
68-
"Example: --ip-allow-list \"cidr=203.0.113.5/32,description=office\"")
64+
"Restrict inbound traffic to specific IP ranges (format: cidr=<range>,description=<label>). Repeat the flag for multiple entries.")
6965

7066
cmd.RunE = func(cmd *cobra.Command, args []string) error {
7167
var input kvtypes.KeyValueCreateInput
@@ -123,7 +119,7 @@ func runKVCreateAndPrint(cmd *cobra.Command, deps *dependencies.Dependencies, in
123119

124120
func kvCreateSuccessMessage(kv *keyvalue.KeyValueOut) string {
125121
return fmt.Sprintf(
126-
"Created Key Value store\n\n%s\n",
122+
"Created Render Key Value\n\n%s\n",
127123
text.KeyValueDetail(kv),
128124
)
129125
}

cmd/kvcreate_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ func TestKVCreate_InvalidRegion(t *testing.T) {
430430
assert.Contains(t, result.Stderr, `"oregon"`)
431431
assert.Contains(t, result.Stderr, `"virginia"`)
432432
assert.Contains(t, result.Stdout, "Usage:")
433-
assert.Contains(t, result.Stdout, "Region: frankfurt | ohio | oregon | singapore | virginia")
433+
assert.Contains(t, result.Stdout, "Set the region: frankfurt | ohio | oregon | singapore | virginia")
434434
assert.Empty(t, server.KV.Instances)
435435
}
436436

@@ -446,8 +446,8 @@ func TestKVCreate_InvalidMemoryPolicy(t *testing.T) {
446446
assert.Contains(t, result.Stderr, `"queue"`)
447447
assert.Contains(t, result.Stderr, `"noeviction"`)
448448
assert.Contains(t, result.Stdout, "Usage:")
449-
assert.Contains(t, result.Stdout, "Shortcuts: cache")
450-
assert.Contains(t, result.Stdout, "Technical values: noeviction")
449+
assert.Contains(t, result.Stdout, "Accepts a friendly alias — cache")
450+
assert.Contains(t, result.Stdout, "or any raw policy: noeviction")
451451
assert.Empty(t, server.KV.Instances)
452452
}
453453

cmd/kvdelete.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
func newKVDeleteCmd(deps *dependencies.Dependencies) *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "delete <keyValueID|keyValueName>",
16-
Short: "Delete a Key Value store instance",
16+
Short: "Delete a Render Key Value instance",
1717
Args: cobra.ExactArgs(1),
1818
SilenceUsage: true,
19-
Long: `Delete a Key Value store instance on Render.
19+
Long: `Delete a Render Key Value instance.
2020
2121
Without --confirm, this command previews what would be deleted and makes no
2222
changes. Pass --confirm to actually delete the instance.
@@ -45,7 +45,7 @@ Key Value ID instead (which works across workspaces).`,
4545
}
4646

4747
cmd.Flags().String("environment", "",
48-
"Environment ID or name (optional). Narrows name lookup when the same Key Value name exists in multiple environments.")
48+
"Narrow lookup to an environment (ID or name, optional) when the same Key Value name exists in multiple environments.")
4949

5050
cmd.RunE = func(cmd *cobra.Command, args []string) error {
5151
// No interactive flow yet; collapse --output interactive (the default in a TTY)

cmd/kvget.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
func newKVGetCmd(deps *dependencies.Dependencies) *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "get <keyValueID|keyValueName>",
16-
Short: "Get details of a Key Value store instance",
16+
Short: "Get details of a Render Key Value instance",
1717
Args: cobra.ExactArgs(1),
1818
SilenceUsage: true,
19-
Long: `Get details and connection info for a Key Value store instance on Render.
19+
Long: `Get details and connection info for a Render Key Value instance.
2020
2121
The positional argument accepts either a Key Value ID (red-...) or a name.
2222
If the name matches more than one instance, narrow the search with
@@ -46,9 +46,9 @@ Key Value ID instead (which works across workspaces).`,
4646
}
4747

4848
cmd.Flags().String("project", "",
49-
"Project ID or name (optional). Narrows name lookup within the active workspace.")
49+
"Narrow lookup to a project (ID or name, optional) within the active workspace.")
5050
cmd.Flags().String("environment", "",
51-
"Environment ID or name (optional). Narrows name lookup when the same Key Value name exists in multiple environments.")
51+
"Narrow lookup to an environment (ID or name, optional) when the same Key Value name exists in multiple environments.")
5252
cmd.Flags().Bool("include-sensitive-connection-info", false,
5353
"Include connection strings and credentials in the output")
5454

cmd/kvlist.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
func newKVListCmd(deps *dependencies.Dependencies) *cobra.Command {
1818
cmd := &cobra.Command{
1919
Use: "list",
20-
Short: "List Key Value store instances",
20+
Short: "List Render Key Value instances",
2121
Args: cobra.NoArgs,
2222
SilenceUsage: true,
23-
Long: `List Key Value store instances in the active workspace.
23+
Long: `List Render Key Value instances in the active workspace.
2424
2525
Use --project to narrow results to a single project, --environment to narrow
2626
to a single environment, or both — when both are supplied, the environment is
@@ -42,9 +42,9 @@ resolved within that project.`,
4242
}
4343

4444
cmd.Flags().String("project", "",
45-
"Project ID or name (optional). Narrows results to environments in this project.")
45+
"Narrow results to environments in a project (ID or name, optional).")
4646
cmd.Flags().String("environment", "",
47-
"Environment ID or name (optional). Narrows results to this environment.")
47+
"Narrow results to a single environment (ID or name, optional).")
4848

4949
cmd.RunE = func(cmd *cobra.Command, args []string) error {
5050
command.DefaultFormatNonInteractive(cmd)

cmd/kvresume.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
func newKVResumeCmd(deps *dependencies.Dependencies) *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "resume <keyValueID|keyValueName>",
16-
Short: "Resume a suspended Key Value store instance",
16+
Short: "Resume a suspended Render Key Value instance",
1717
Args: cobra.ExactArgs(1),
1818
SilenceUsage: true,
19-
Long: `Resume a suspended Key Value store instance on Render.
19+
Long: `Resume a suspended Render Key Value instance.
2020
2121
The positional argument accepts either a Key Value ID (red-...) or a name.
2222
If the name matches more than one instance, narrow the search with
@@ -39,7 +39,7 @@ Key Value ID instead (which works across workspaces).`,
3939
}
4040

4141
cmd.Flags().String("environment", "",
42-
"Environment ID or name (optional). Narrows name lookup when the same Key Value name exists in multiple environments.")
42+
"Narrow lookup to an environment (ID or name, optional) when the same Key Value name exists in multiple environments.")
4343

4444
cmd.RunE = func(cmd *cobra.Command, args []string) error {
4545
command.DefaultFormatNonInteractive(cmd)

cmd/kvsuspend.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
func newKVSuspendCmd(deps *dependencies.Dependencies) *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "suspend <keyValueID|keyValueName>",
16-
Short: "Suspend a Key Value store instance",
16+
Short: "Suspend a Render Key Value instance",
1717
Args: cobra.ExactArgs(1),
1818
SilenceUsage: true,
19-
Long: `Suspend a Key Value store instance on Render.
19+
Long: `Suspend a Render Key Value instance.
2020
2121
Without --confirm, this command previews what would be suspended and makes no
2222
changes. Pass --confirm to actually suspend the instance.
@@ -45,7 +45,7 @@ Key Value ID instead (which works across workspaces).`,
4545
}
4646

4747
cmd.Flags().String("environment", "",
48-
"Environment ID or name (optional). Narrows name lookup when the same Key Value name exists in multiple environments.")
48+
"Narrow lookup to an environment (ID or name, optional) when the same Key Value name exists in multiple environments.")
4949

5050
cmd.RunE = func(cmd *cobra.Command, args []string) error {
5151
command.DefaultFormatNonInteractive(cmd)

cmd/kvupdate.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,24 @@ import (
1616
func newKVUpdateCmd(deps *dependencies.Dependencies) *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "update <keyValueID|keyValueName>",
19-
Short: "Update a Key Value store instance",
19+
Short: "Update a Render Key Value instance",
2020
Args: cobra.ExactArgs(1),
2121
SilenceUsage: true,
22-
Long: `Update an existing Key Value store instance on Render.
22+
Long: `Update an existing Render Key Value instance.
2323
2424
The positional argument is the target Key Value (ID red-... or name). At least
2525
one mutating flag must be supplied. Use --name to rename the instance; the
2626
positional argument always identifies the target and is never the new name.
2727
28+
Environment, project, workspace, and region are immutable. A Key Value instance
29+
cannot be moved between them; the --environment flag is for name disambiguation
30+
only.
31+
2832
Name lookup is scoped to your active workspace. If a name isn't found, switch
2933
workspaces with 'render workspace set <name|ID>' and try again, or pass the
3034
Key Value ID instead (which works across workspaces). If a name matches more
3135
than one instance, narrow the search with --environment <id|name>.
3236
33-
Environment, project, workspace, and region are immutable. A KV cannot be
34-
moved between them; the --environment flag is for name disambiguation only.
35-
3637
The --ip-allow-list flag replaces the server-side list; pass it once per entry.
3738
To remove all allow-list entries, pass --clear-ip-allow-list. The two flags are
3839
mutually exclusive.`,
@@ -57,20 +58,18 @@ mutually exclusive.`,
5758
render ea kv update red-abc123def456ghi789jkl0 --plan pro --output json`,
5859
}
5960

60-
memoryPolicyDesc := `Controls what the instance does when it runs out of memory to store new data.
61-
Shortcuts: cache (sets allkeys_lru, recommended for caching) | queue (sets noeviction, recommended for job queues).
62-
Technical values: noeviction | allkeys_lru | allkeys_lfu | allkeys_random | volatile_lru | volatile_lfu | volatile_random | volatile_ttl`
61+
memoryPolicyDesc := `Set the eviction policy used when the instance runs out of memory.
62+
Accepts a friendly alias — cache (= allkeys_lru, for caching) or queue (= noeviction, for job queues)
63+
or any raw policy: noeviction | allkeys_lru | allkeys_lfu | allkeys_random | volatile_lru | volatile_lfu | volatile_random | volatile_ttl`
6364

64-
ipAllowListDesc := `Replace the IP allow-list with the supplied entries. Repeat the flag for multiple entries.
65-
Format: cidr=<range>,description=<label>
66-
Example: --ip-allow-list "cidr=203.0.113.5/32,description=office"`
65+
ipAllowListDesc := `Replace the IP allow-list with the supplied entries (format: cidr=<range>,description=<label>). Repeat the flag for multiple entries.`
6766

6867
cmd.Flags().String("environment", "",
69-
"Environment ID or name (optional). Narrows name lookup when the same Key Value name exists in multiple environments")
68+
"Narrow lookup to an environment (ID or name, optional) when the same Key Value name exists in multiple environments")
7069

7170
cmd.Flags().String("name", "", "Rename the Key Value instance")
7271
cmd.Flags().String("plan", "",
73-
"Plan name. Examples: free | starter | standard | pro | pro_plus. Account-specific plan names are accepted")
72+
"Set the plan to one of: free | starter | standard | pro | pro_plus. Custom enterprise plan names are also accepted.")
7473

7574
maxmemFlag := command.NewEnumInput(kvtypes.MemoryPolicyInputValues(), false)
7675
cmd.Flags().Var(maxmemFlag, "memory-policy", memoryPolicyDesc)

cmd/pg.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ func newPgCmd(children ...*cobra.Command) *cobra.Command {
66
cmd := &cobra.Command{
77
Use: "pg",
88
Aliases: []string{"postgres"},
9-
Short: "Manage Postgres databases",
10-
Long: `Manage Postgres databases.
9+
Short: "Manage Render Postgres databases",
10+
Long: `Manage Render Postgres databases.
1111
1212
Lives under 'ea' while the command surface stabilizes. Postgres itself is
1313
generally available, but the flag set and output format for these commands may

0 commit comments

Comments
 (0)