Skip to content

Add version of the coder CLI to the "$ coder" header #4699

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

Closed
ghuntley opened this issue Oct 21, 2022 · 2 comments
Closed

Add version of the coder CLI to the "$ coder" header #4699

ghuntley opened this issue Oct 21, 2022 · 2 comments
Labels
cli Area: CLI

Comments

@ghuntley
Copy link
Contributor

Make this

[ghuntley@ghuntley-dev:~]$ /usr/local/bin/coder 
Coder — A tool for provisioning self-hosted development environments with Terraform.

Usage:
  coder [command]

Get Started:
  - Start a Coder server:                                                       

      $ coder server 

  - Get started by creating a template from an example:                         

      $ coder templates init 

Commands:
  completion     Generate the autocompletion script for the specified shell
  dotfiles       Checkout and install a dotfiles repository from a Git URL
  features       List Enterprise features
  help           Help about any command
  licenses       Add, delete, and list licenses
  login          Authenticate with Coder deployment
  logout         Unauthenticate your local session
  port-forward   Forward ports from machine to a workspace
  publickey      Output your Coder public key used for Git operations
  reset-password Directly connect to the database to reset a user's password
  server         Start a Coder server
  state          Manually manage Terraform state to fix broken workspaces
  templates      Manage templates
  tokens         Manage personal access tokens
  users          Manage users
  version        Show coder version

Workspace Commands:
  config-ssh     Add an SSH Host entry for your workspaces "ssh coder.workspace"
  create         Create a workspace
  delete         Delete a workspace
  list           List workspaces
  schedule       Schedule automated start and stop times for workspaces
  show           Display details of a workspace's resources and agents
  speedtest      Run upload and download tests from your machine to a workspace
  ssh            Start a shell into a workspace
  start          Start a workspace
  stop           Stop a workspace
  update         Update a workspace

Flags:
      --experimental          Enable experimental features. Experimental features are not
                              ready for production.
                              Consumes $CODER_EXPERIMENTAL
      --global-config coder   Path to the global coder config directory.
                              Consumes $CODER_CONFIG_DIR (default
                              "/home/ghuntley/.config/coderv2")
      --header stringArray    HTTP headers added to all requests. Provide as "Key=Value".
                              Consumes $CODER_HEADER
  -h, --help                  help for coder
      --no-feature-warning    Suppress warnings about unlicensed features.
                              Consumes $CODER_NO_FEATURE_WARNING
      --no-version-warning    Suppress warning when client and server versions do not match.
                              Consumes $CODER_NO_VERSION_WARNING
      --token string          Specify an authentication token. For security reasons setting
                              CODER_SESSION_TOKEN is preferred.
                              Consumes $CODER_SESSION_TOKEN
      --url string            URL to a deployment.
                              Consumes $CODER_URL
  -v, --verbose               Enable verbose output.
                              Consumes $CODER_VERBOSE

Use "coder [command] --help" for more information about a command.

Into this

[ghuntley@ghuntley-dev:~]$ /usr/local/bin/coder 
Coder v0.10.2+fbbecf0  — A tool for provisioning self-hosted development environments with Terraform.

Usage:
  coder [command]

Get Started:
  - Start a Coder server:                                                       

      $ coder server 

  - Get started by creating a template from an example:                         

      $ coder templates init 

Commands:
  completion     Generate the autocompletion script for the specified shell
  dotfiles       Checkout and install a dotfiles repository from a Git URL
  features       List Enterprise features
  help           Help about any command
  licenses       Add, delete, and list licenses
  login          Authenticate with Coder deployment
  logout         Unauthenticate your local session
  port-forward   Forward ports from machine to a workspace
  publickey      Output your Coder public key used for Git operations
  reset-password Directly connect to the database to reset a user's password
  server         Start a Coder server
  state          Manually manage Terraform state to fix broken workspaces
  templates      Manage templates
  tokens         Manage personal access tokens
  users          Manage users
  version        Show coder version

Workspace Commands:
  config-ssh     Add an SSH Host entry for your workspaces "ssh coder.workspace"
  create         Create a workspace
  delete         Delete a workspace
  list           List workspaces
  schedule       Schedule automated start and stop times for workspaces
  show           Display details of a workspace's resources and agents
  speedtest      Run upload and download tests from your machine to a workspace
  ssh            Start a shell into a workspace
  start          Start a workspace
  stop           Stop a workspace
  update         Update a workspace

Flags:
      --experimental          Enable experimental features. Experimental features are not
                              ready for production.
                              Consumes $CODER_EXPERIMENTAL
      --global-config coder   Path to the global coder config directory.
                              Consumes $CODER_CONFIG_DIR (default
                              "/home/ghuntley/.config/coderv2")
      --header stringArray    HTTP headers added to all requests. Provide as "Key=Value".
                              Consumes $CODER_HEADER
  -h, --help                  help for coder
      --no-feature-warning    Suppress warnings about unlicensed features.
                              Consumes $CODER_NO_FEATURE_WARNING
      --no-version-warning    Suppress warning when client and server versions do not match.
                              Consumes $CODER_NO_VERSION_WARNING
      --token string          Specify an authentication token. For security reasons setting
                              CODER_SESSION_TOKEN is preferred.
                              Consumes $CODER_SESSION_TOKEN
      --url string            URL to a deployment.
                              Consumes $CODER_URL
  -v, --verbose               Enable verbose output.
                              Consumes $CODER_VERBOSE

Use "coder [command] --help" for more information about a command.

Like

[ghuntley@ghuntley-dev:~]$ wget
BusyBox v1.35.0 () multi-call binary.

Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
	[--post-data STR | --post-file FILE] [-Y on/off]
	[--no-check-certificate] [-P DIR] [-U AGENT] [-T SEC] URL...

So that it is easier to spot when people are using older versions of our CLI

@ghuntley ghuntley added simple cli Area: CLI labels Oct 23, 2022
@johnhorsema
Copy link
Contributor

Can I take this? I have made a pull request here: #4709

@sreya
Copy link
Collaborator

sreya commented Oct 25, 2022

Closed by #4709

@sreya sreya closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI
Projects
None yet
Development

No branches or pull requests

3 participants