Skip to content

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

@ghuntley

Description

@ghuntley

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliArea: CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions