Skip to content

chore(cli): lighten flags on help page #9606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var usageTemplate = template.Must(
},
"keyword": func(s string) string {
return pretty.Sprint(
pretty.FgColor(cliui.Color("#0173ff")),
pretty.FgColor(cliui.Color("#87ceeb")),
s,
)
},
Expand Down
20 changes: 10 additions & 10 deletions cli/testdata/coder_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,38 @@ coder v0.0.0-devel
Global options are applied to all commands. They can be set using environment
variables or flags.

--debug-options bool
--debug-options bool
Print all options, how they're set, then exit.

--disable-direct-connections bool, $CODER_DISABLE_DIRECT_CONNECTIONS
--disable-direct-connections bool, $CODER_DISABLE_DIRECT_CONNECTIONS
Disable direct (P2P) connections to workspaces.

--global-config string, $CODER_CONFIG_DIR (default: ~/.config/coderv2)
--global-config string, $CODER_CONFIG_DIR (default: ~/.config/coderv2)
Path to the global `coder` config directory.

--header string-array, $CODER_HEADER
--header string-array, $CODER_HEADER
Additional HTTP headers added to all requests. Provide as key=value.
Can be specified multiple times.

--header-command string, $CODER_HEADER_COMMAND
--header-command string, $CODER_HEADER_COMMAND
An external command that outputs additional HTTP headers added to all
requests. The command must output each header as `key=value` on its
own line.

--no-feature-warning bool, $CODER_NO_FEATURE_WARNING
--no-feature-warning bool, $CODER_NO_FEATURE_WARNING
Suppress warnings about unlicensed features.

--no-version-warning bool, $CODER_NO_VERSION_WARNING
--no-version-warning bool, $CODER_NO_VERSION_WARNING
Suppress warning when client and server versions do not match.

--token string, $CODER_SESSION_TOKEN
--token string, $CODER_SESSION_TOKEN
Specify an authentication token. For security reasons setting
CODER_SESSION_TOKEN is preferred.

--url url, $CODER_URL
--url url, $CODER_URL
URL to a deployment.

-v, --verbose bool, $CODER_VERBOSE
-v, --verbose bool, $CODER_VERBOSE
Enable verbose output.

———
Expand Down
22 changes: 11 additions & 11 deletions cli/testdata/coder_agent_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ coder v0.0.0-devel
Starts the Coder workspace agent.

OPTIONS:
--log-human string, $CODER_AGENT_LOGGING_HUMAN (default: /dev/stderr)
--log-human string, $CODER_AGENT_LOGGING_HUMAN (default: /dev/stderr)
Output human-readable logs to a given file.

--log-json string, $CODER_AGENT_LOGGING_JSON
--log-json string, $CODER_AGENT_LOGGING_JSON
Output JSON logs to a given file.

--log-stackdriver string, $CODER_AGENT_LOGGING_STACKDRIVER
--log-stackdriver string, $CODER_AGENT_LOGGING_STACKDRIVER
Output Stackdriver compatible logs to a given file.

--auth string, $CODER_AGENT_AUTH (default: token)
--auth string, $CODER_AGENT_AUTH (default: token)
Specify the authentication type to use for the agent.

--debug-address string, $CODER_AGENT_DEBUG_ADDRESS (default: 127.0.0.1:2113)
--debug-address string, $CODER_AGENT_DEBUG_ADDRESS (default: 127.0.0.1:2113)
The bind address to serve a debug HTTP server.

--log-dir string, $CODER_AGENT_LOG_DIR (default: /tmp)
--log-dir string, $CODER_AGENT_LOG_DIR (default: /tmp)
Specify the location for the agent log files.

--no-reap bool
--no-reap bool
Do not start a process reaper.

--pprof-address string, $CODER_AGENT_PPROF_ADDRESS (default: 127.0.0.1:6060)
--pprof-address string, $CODER_AGENT_PPROF_ADDRESS (default: 127.0.0.1:6060)
The address to serve pprof.

--prometheus-address string, $CODER_AGENT_PROMETHEUS_ADDRESS (default: 127.0.0.1:2112)
--prometheus-address string, $CODER_AGENT_PROMETHEUS_ADDRESS (default: 127.0.0.1:2112)
The bind address to serve Prometheus metrics.

--ssh-max-timeout duration, $CODER_AGENT_SSH_MAX_TIMEOUT (default: 72h)
--ssh-max-timeout duration, $CODER_AGENT_SSH_MAX_TIMEOUT (default: 72h)
Specify the max timeout for a SSH connection, it is advisable to set
it to a minimum of 60s, but no more than 72h.

--tailnet-listen-port int, $CODER_AGENT_TAILNET_LISTEN_PORT (default: 0)
--tailnet-listen-port int, $CODER_AGENT_TAILNET_LISTEN_PORT (default: 0)
Specify a static port for Tailscale to use for listening.

———
Expand Down
18 changes: 9 additions & 9 deletions cli/testdata/coder_config-ssh_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,39 @@ coder v0.0.0-devel
$ coder config-ssh --dry-run

OPTIONS:
--coder-binary-path string, $CODER_SSH_CONFIG_BINARY_PATH
--coder-binary-path string, $CODER_SSH_CONFIG_BINARY_PATH
Optionally specify the absolute path to the coder binary used in
ProxyCommand. By default, the binary invoking this command ('config
ssh') is used.

-n, --dry-run bool, $CODER_SSH_DRY_RUN
-n, --dry-run bool, $CODER_SSH_DRY_RUN
Perform a trial run with no changes made, showing a diff at the end.

--force-unix-filepaths bool, $CODER_CONFIGSSH_UNIX_FILEPATHS
--force-unix-filepaths bool, $CODER_CONFIGSSH_UNIX_FILEPATHS
By default, 'config-ssh' uses the os path separator when writing the
ssh config. This might be an issue in Windows machine that use a
unix-like shell. This flag forces the use of unix file paths (the
forward slash '/').

--ssh-config-file string, $CODER_SSH_CONFIG_FILE (default: ~/.ssh/config)
--ssh-config-file string, $CODER_SSH_CONFIG_FILE (default: ~/.ssh/config)
Specifies the path to an SSH config.

--ssh-host-prefix string, $CODER_CONFIGSSH_SSH_HOST_PREFIX
--ssh-host-prefix string, $CODER_CONFIGSSH_SSH_HOST_PREFIX
Override the default host prefix.

-o, --ssh-option string-array, $CODER_SSH_CONFIG_OPTS
-o, --ssh-option string-array, $CODER_SSH_CONFIG_OPTS
Specifies additional SSH options to embed in each host stanza.

--use-previous-options bool, $CODER_SSH_USE_PREVIOUS_OPTIONS
--use-previous-options bool, $CODER_SSH_USE_PREVIOUS_OPTIONS
Specifies whether or not to keep options from previous run of
config-ssh.

--wait yes|no|auto, $CODER_CONFIGSSH_WAIT (default: auto)
--wait yes|no|auto, $CODER_CONFIGSSH_WAIT (default: auto)
Specifies whether or not to wait for the startup script to finish
executing. Auto means that the agent startup script behavior
configured in the workspace template is used.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
12 changes: 6 additions & 6 deletions cli/testdata/coder_create_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ coder v0.0.0-devel
$ coder create <username>/<workspace_name>

OPTIONS:
--parameter string-array, $CODER_RICH_PARAMETER
--parameter string-array, $CODER_RICH_PARAMETER
Rich parameter value in the format "name=value".

--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
Specify a file path with values for rich parameters defined in the
template.

--start-at string, $CODER_WORKSPACE_START_AT
--start-at string, $CODER_WORKSPACE_START_AT
Specify the workspace autostart schedule. Check coder schedule start
--help for the syntax.

--stop-after duration, $CODER_WORKSPACE_STOP_AFTER
--stop-after duration, $CODER_WORKSPACE_STOP_AFTER
Specify a duration after which the workspace should shut down (e.g.
8h).

-t, --template string, $CODER_TEMPLATE_NAME
-t, --template string, $CODER_TEMPLATE_NAME
Specify a template name.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
4 changes: 2 additions & 2 deletions cli/testdata/coder_delete_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ coder v0.0.0-devel
Aliases: rm

OPTIONS:
--orphan bool
--orphan bool
Delete a workspace without deleting its resources. This can delete a
workspace in a broken state, but may also lead to unaccounted cloud
resources.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
6 changes: 3 additions & 3 deletions cli/testdata/coder_dotfiles_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ coder v0.0.0-devel
$ coder dotfiles --yes git@github.com:example/dotfiles.git

OPTIONS:
-b, --branch string
-b, --branch string
Specifies which branch to clone. If empty, will default to cloning the
default branch or using the existing branch in the cloned repo on
disk.

--symlink-dir string, $CODER_SYMLINK_DIR
--symlink-dir string, $CODER_SYMLINK_DIR
Specifies the directory for the dotfiles symlink destinations. If
empty, will use $HOME.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
8 changes: 4 additions & 4 deletions cli/testdata/coder_list_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ coder v0.0.0-devel
Aliases: ls

OPTIONS:
-a, --all bool
-a, --all bool
Specifies whether all workspaces will be listed or not.

-c, --column string-array (default: workspace,template,status,healthy,last built,outdated,starts at,stops after)
-c, --column string-array (default: workspace,template,status,healthy,last built,outdated,starts at,stops after)
Columns to display in table output. Available columns: workspace,
template, status, healthy, last built, outdated, starts at, stops
after, daily cost.

-o, --output string (default: table)
-o, --output string (default: table)
Output format. Available formats: table, json.

--search string (default: owner:me)
--search string (default: owner:me)
Search for a workspace with a query.

———
Expand Down
10 changes: 5 additions & 5 deletions cli/testdata/coder_login_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ coder v0.0.0-devel
Authenticate with Coder deployment

OPTIONS:
--first-user-email string, $CODER_FIRST_USER_EMAIL
--first-user-email string, $CODER_FIRST_USER_EMAIL
Specifies an email address to use if creating the first user for the
deployment.

--first-user-password string, $CODER_FIRST_USER_PASSWORD
--first-user-password string, $CODER_FIRST_USER_PASSWORD
Specifies a password to use if creating the first user for the
deployment.

--first-user-trial bool, $CODER_FIRST_USER_TRIAL
--first-user-trial bool, $CODER_FIRST_USER_TRIAL
Specifies whether a trial license should be provisioned for the Coder
deployment or not.

--first-user-username string, $CODER_FIRST_USER_USERNAME
--first-user-username string, $CODER_FIRST_USER_USERNAME
Specifies a username to use if creating the first user for the
deployment.

--use-token-as-session bool
--use-token-as-session bool
By default, the CLI will generate a new session token when logging in.
This flag will instead use the provided token as the session token.

Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_logout_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coder v0.0.0-devel
Unauthenticate your local session

OPTIONS:
-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
6 changes: 3 additions & 3 deletions cli/testdata/coder_ping_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ coder v0.0.0-devel
Ping a workspace

OPTIONS:
-n, --num int (default: 10)
-n, --num int (default: 10)
Specifies the number of pings to perform.

-t, --timeout duration (default: 5s)
-t, --timeout duration (default: 5s)
Specifies how long to wait for a ping to complete.

--wait duration (default: 1s)
--wait duration (default: 1s)
Specifies how long to wait between pings.

———
Expand Down
4 changes: 2 additions & 2 deletions cli/testdata/coder_port-forward_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ coder v0.0.0-devel
$ coder port-forward <workspace> --tcp 1.2.3.4:8080:8080

OPTIONS:
-p, --tcp string-array, $CODER_PORT_FORWARD_TCP
-p, --tcp string-array, $CODER_PORT_FORWARD_TCP
Forward TCP port(s) from the workspace to the local machine.

--udp string-array, $CODER_PORT_FORWARD_UDP
--udp string-array, $CODER_PORT_FORWARD_UDP
Forward UDP port(s) from the workspace to the local machine. The UDP
connection has TCP-like semantics to support stateful UDP protocols.

Expand Down
4 changes: 2 additions & 2 deletions cli/testdata/coder_publickey_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ coder v0.0.0-devel
Aliases: pubkey

OPTIONS:
--reset bool
--reset bool
Regenerate your public key. This will require updating the key on any
services it's registered with.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_rename_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coder v0.0.0-devel
Rename a workspace

OPTIONS:
-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_reset-password_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coder v0.0.0-devel
Directly connect to the database to reset a user's password

OPTIONS:
--postgres-url string, $CODER_PG_CONNECTION_URL
--postgres-url string, $CODER_PG_CONNECTION_URL
URL of a PostgreSQL database to connect to.

———
Expand Down
6 changes: 3 additions & 3 deletions cli/testdata/coder_restart_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ coder v0.0.0-devel
Restart a workspace

OPTIONS:
--build-option string-array, $CODER_BUILD_OPTION
--build-option string-array, $CODER_BUILD_OPTION
Build option value in the format "name=value".

--build-options bool
--build-options bool
Prompt for one-time build options defined with ephemeral parameters.

-y, --yes bool
-y, --yes bool
Bypass prompts.

———
Expand Down
Loading