How to alias multiple CLI versions

If you’re an Enterprise customer with more than 1 Kubernetes Cluster that’s running Astronomer, those clusters might be running different platform versions and therefore compatible with different versions of our CLI.

To facilitate switching between multiple CLI versions (as an alternative to un-installing, re-installing), try the following:

  1. Run which astro to see where your astro folder can be found locally
  2. Run astro version to pull your current CLI version (Version #1)
  3. Run mv /usr/local/bin/astro /usr/local/bin/astro-cli75 to rename that current folder to astro-cli75 (as an example)
  4. Install CLI version 2 (that’ll get installed to /usr/local/bin/astro
  5. Then run ls -la /usr/local/bin/astro* to see 2 versions with different names, each pertaining to the particular CLI version you installed on each

Note: For more info on our CLI, feel free to reference our CLI Quickstart Doc or the CLI GitHub repo.

1 Like