Skip to content

Commit 5215fe9

Browse files
committed
Merge branch 'main' into entfactor
2 parents 2cfcfac + 29d804e commit 5215fe9

File tree

84 files changed

+1304
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1304
-222
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ vendor
1515
yarn-error.log
1616
gotests.coverage
1717
.idea
18+
.gitpod.yml
1819
.DS_Store
1920

2021
# Front-end ignore

cli/cliflag/cliflag.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import (
1818

1919
"github.com/spf13/cobra"
2020
"github.com/spf13/pflag"
21+
22+
"github.com/coder/coder/cli/cliui"
2123
)
2224

2325
// IsSetBool returns the value of the boolean flag if it is set.
@@ -176,7 +178,7 @@ func fmtUsage(u string, env string) string {
176178
if strings.HasSuffix(u, ".") {
177179
dot = ""
178180
}
179-
u = fmt.Sprintf("%s%s\nConsumes $%s", u, dot, env)
181+
u = fmt.Sprintf("%s%s\n"+cliui.Styles.Placeholder.Render("Consumes $%s"), u, dot, env)
180182
}
181183

182184
return u

cli/cliui/cliui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var Styles = struct {
4848
Field: defaultStyles.Code.Copy().Foreground(lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}),
4949
Keyword: defaultStyles.Keyword,
5050
Paragraph: defaultStyles.Paragraph,
51-
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#005fff"}),
51+
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#4d46b3"}),
5252
Prompt: defaultStyles.Prompt.Foreground(lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}),
5353
FocusedPrompt: defaultStyles.FocusedPrompt.Foreground(lipgloss.Color("#651fff")),
5454
Fuchsia: defaultStyles.SelectedMenuItem.Copy(),

cli/configssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func configSSH() *cobra.Command {
144144
cmd := &cobra.Command{
145145
Annotations: workspaceCommand,
146146
Use: "config-ssh",
147-
Short: "Populate your SSH config with Host entries for all of your workspaces",
147+
Short: "Add an SSH Host entry for your workspaces \"ssh coder.workspace\"",
148148
Example: formatExamples(
149149
example{
150150
Description: "You can use -o (or --ssh-option) so set SSH options to be used for all your workspaces",

cli/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func create() *cobra.Command {
2525
cmd := &cobra.Command{
2626
Annotations: workspaceCommand,
2727
Use: "create [name]",
28-
Short: "Create a workspace from a template",
28+
Short: "Create a workspace",
2929
RunE: func(cmd *cobra.Command, args []string) error {
3030
client, err := CreateClient(cmd)
3131
if err != nil {

cli/dotfiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func dotfiles() *cobra.Command {
2222
cmd := &cobra.Command{
2323
Use: "dotfiles [git_repo_url]",
2424
Args: cobra.ExactArgs(1),
25-
Short: "Check out and install a dotfiles repository.",
25+
Short: "Checkout and install a dotfiles repository from a Git URL",
2626
Example: formatExamples(
2727
example{
2828
Description: "Check out and install a dotfiles repository without prompts",

cli/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func list() *cobra.Command {
6666
cmd := &cobra.Command{
6767
Annotations: workspaceCommand,
6868
Use: "list",
69-
Short: "List all workspaces",
69+
Short: "List workspaces",
7070
Aliases: []string{"ls"},
7171
Args: cobra.ExactArgs(0),
7272
RunE: func(cmd *cobra.Command, args []string) error {

cli/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func login() *cobra.Command {
4545
)
4646
cmd := &cobra.Command{
4747
Use: "login <url>",
48-
Short: "Authenticate with a Coder deployment",
48+
Short: "Authenticate with Coder deployment",
4949
Args: cobra.ExactArgs(1),
5050
RunE: func(cmd *cobra.Command, args []string) error {
5151
rawURL := args[0]

cli/logout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
func logout() *cobra.Command {
1515
cmd := &cobra.Command{
1616
Use: "logout",
17-
Short: "Remove the local authenticated session",
17+
Short: "Unauthenticate your local session",
1818
RunE: func(cmd *cobra.Command, args []string) error {
1919
client, err := CreateClient(cmd)
2020
if err != nil {

cli/portforward.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func portForward() *cobra.Command {
3232
)
3333
cmd := &cobra.Command{
3434
Use: "port-forward <workspace>",
35-
Short: "Forward one or more ports from the local machine to the remote workspace",
35+
Short: "Forward ports from machine to a workspace",
3636
Aliases: []string{"tunnel"},
3737
Args: cobra.ExactArgs(1),
3838
Example: formatExamples(

cli/publickey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func publickey() *cobra.Command {
1818
cmd := &cobra.Command{
1919
Use: "publickey",
2020
Aliases: []string{"pubkey"},
21-
Short: "Output your public key for Git operations",
21+
Short: "Output your Coder public key used for Git operations",
2222
RunE: func(cmd *cobra.Command, args []string) error {
2323
client, err := CreateClient(cmd)
2424
if err != nil {

cli/resetpassword.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/coder/coder/cli/cliflag"
1111
"github.com/coder/coder/cli/cliui"
1212
"github.com/coder/coder/coderd/database"
13+
"github.com/coder/coder/coderd/database/migrations"
1314
"github.com/coder/coder/coderd/userpassword"
1415
)
1516

@@ -20,7 +21,7 @@ func resetPassword() *cobra.Command {
2021

2122
root := &cobra.Command{
2223
Use: "reset-password <username>",
23-
Short: "Reset a user's password by directly updating the database",
24+
Short: "Directly connect to the database to reset a user's password",
2425
Args: cobra.ExactArgs(1),
2526
RunE: func(cmd *cobra.Command, args []string) error {
2627
username := args[0]
@@ -35,7 +36,7 @@ func resetPassword() *cobra.Command {
3536
return xerrors.Errorf("ping postgres: %w", err)
3637
}
3738

38-
err = database.EnsureClean(sqlDB)
39+
err = migrations.EnsureClean(sqlDB)
3940
if err != nil {
4041
return xerrors.Errorf("database needs migration: %w", err)
4142
}

cli/root.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func Root(subcommands []*cobra.Command) *cobra.Command {
106106
Use: "coder",
107107
SilenceErrors: true,
108108
SilenceUsage: true,
109-
Long: `Coder — A tool for provisioning self-hosted development environments.
109+
Long: `Coder — A tool for provisioning self-hosted development environments with Terraform.
110110
`,
111111
PersistentPreRun: func(cmd *cobra.Command, args []string) {
112112
if cliflag.IsSetBool(cmd, varNoVersionCheck) &&
@@ -168,21 +168,21 @@ func Root(subcommands []*cobra.Command) *cobra.Command {
168168

169169
cmd.SetUsageTemplate(usageTemplate())
170170

171-
cmd.PersistentFlags().String(varURL, "", "Specify the URL to your deployment.")
171+
cmd.PersistentFlags().String(varURL, "", "URL to a deployment.")
172172
cliflag.Bool(cmd.PersistentFlags(), varNoVersionCheck, "", envNoVersionCheck, false, "Suppress warning when client and server versions do not match.")
173173
cliflag.Bool(cmd.PersistentFlags(), varNoFeatureWarning, "", envNoFeatureWarning, false, "Suppress warnings about unlicensed features.")
174174
cliflag.String(cmd.PersistentFlags(), varToken, "", envSessionToken, "", fmt.Sprintf("Specify an authentication token. For security reasons setting %s is preferred.", envSessionToken))
175-
cliflag.String(cmd.PersistentFlags(), varAgentToken, "", "CODER_AGENT_TOKEN", "", "Specify an agent authentication token.")
175+
cliflag.String(cmd.PersistentFlags(), varAgentToken, "", "CODER_AGENT_TOKEN", "", "An agent authentication token.")
176176
_ = cmd.PersistentFlags().MarkHidden(varAgentToken)
177-
cliflag.String(cmd.PersistentFlags(), varAgentURL, "", "CODER_AGENT_URL", "", "Specify the URL for an agent to access your deployment.")
177+
cliflag.String(cmd.PersistentFlags(), varAgentURL, "", "CODER_AGENT_URL", "", "URL for an agent to access your deployment.")
178178
_ = cmd.PersistentFlags().MarkHidden(varAgentURL)
179-
cliflag.String(cmd.PersistentFlags(), varGlobalConfig, "", "CODER_CONFIG_DIR", configdir.LocalConfig("coderv2"), "Specify the path to the global `coder` config directory.")
179+
cliflag.String(cmd.PersistentFlags(), varGlobalConfig, "", "CODER_CONFIG_DIR", configdir.LocalConfig("coderv2"), "Path to the global `coder` config directory.")
180180
cliflag.StringArray(cmd.PersistentFlags(), varHeader, "", "CODER_HEADER", []string{}, "HTTP headers added to all requests. Provide as \"Key=Value\"")
181181
cmd.PersistentFlags().Bool(varForceTty, false, "Force the `coder` command to run as if connected to a TTY.")
182182
_ = cmd.PersistentFlags().MarkHidden(varForceTty)
183183
cmd.PersistentFlags().Bool(varNoOpen, false, "Block automatically opening URLs in the browser.")
184184
_ = cmd.PersistentFlags().MarkHidden(varNoOpen)
185-
cliflag.Bool(cmd.PersistentFlags(), varVerbose, "v", "CODER_VERBOSE", false, "Enable verbose output")
185+
cliflag.Bool(cmd.PersistentFlags(), varVerbose, "v", "CODER_VERBOSE", false, "Enable verbose output.")
186186

187187
return cmd
188188
}

cli/schedule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func schedules() *cobra.Command {
5757
scheduleCmd := &cobra.Command{
5858
Annotations: workspaceCommand,
5959
Use: "schedule { show | start | stop | override } <workspace>",
60-
Short: "Modify scheduled stop and start times for your workspace",
60+
Short: "Schedule automated start and stop times for workspaces",
6161
}
6262

6363
scheduleCmd.AddCommand(

0 commit comments

Comments
 (0)