diff --git a/INSTALLATION.md b/INSTALLATION.md index b2c5afe07..30ca1303e 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -1,8 +1,10 @@ # Installation -## macOS +## Package managers -The STACKIT CLI is available to download and install through the [Homebrew](https://brew.sh/) package manager. +### macOS + +The STACKIT CLI can be installed through the [Homebrew](https://brew.sh/) package manager. 1. First, you need to register the [STACKIT tap](https://github.com/stackitcloud/homebrew-tap) via: @@ -13,44 +15,54 @@ brew tap stackitcloud/tap 2. You can then install the CLI via: ```shell -brew install stackit-cli +brew install stackit ``` -## Linux +### Linux -We will soon distribute the STACKIT CLI via [Snap](https://snapcraft.io/). For the moment, you can either install via [Homebrew](https://brew.sh/) or refer to the [manual installation](#manual-installation) guide. +We are working on distributing the CLI using a package manager for Linux. For the moment, you can either install via [Homebrew](https://brew.sh/) or refer to the [manual installation](#manual-installation) guide. -## Windows +### Windows -We will soon distribute the STACKIT CLI via [Chocolatey](https://chocolatey.org/). For the moment, please refer to the [manual installation](#manual-installation) guide. +We are working on distributing the CLI using a package manager for Windows. For the moment, please refer to the [manual installation](#manual-installation) guide. ## Manual installation -Alternatively, you can get the STACKIT CLI by downloading a pre-compiled binary or compiling it from source. +You can also get the STACKIT CLI by compiling it from source or downloading a pre-compiled binary. -### Pre-compiled binary +### Compile from source -1. Download the binary corresponding to your operating system and CPU architecture from our [Releases](https://github.com/stackitcloud/stackit-cli/releases) page -2. Extract the contents of the file to your file system and move it to your preferred location (e.g. your home directory) -3. (For macOS only) Right click on the executable, select "Open". You will see a dialog stating the identity of the developer cannot be confirmed. Click on "Open" to allow the app to run on your Mac. We soon plan to certificate the STACKIT CLI to be trusted by macOS +If you have Go 1.16+ installed, you can directly install via: -### Compile from source +```shell +go install github.com/stackitcloud/stackit-cli@latest +``` + +> For more information, please refer to the [`go install` documentation](https://go.dev/ref/mod#go-install) + +Alternativelly, you can: 1. Clone the repository 2. Build the application locally by running: ```bash - $ make build + make build ``` To use the application from the root of the repository, you can run: ```bash - $ ./bin/stackit + ./bin/stackit ``` 3. Skip building and run the Go application directly using: ```bash - $ go run . + go run . ``` + +### Pre-compiled binary + +1. Download the binary corresponding to your operating system and CPU architecture from our [Releases](https://github.com/stackitcloud/stackit-cli/releases) page +2. Extract the contents of the file to your file system and move it to your preferred location (e.g. your home directory) +3. (For macOS only) Right click on the executable, select "Open". You will see a dialog stating the identity of the developer cannot be confirmed. Click on "Open" to allow the app to run on your Mac. We soon plan to certificate the STACKIT CLI to be trusted by macOS diff --git a/README.md b/README.md index cb96ec394..4dcde9087 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ After successful authentication, the CLI stores credentials in your OS keychain. To authenticate as a user, run the command below and follow the steps in your browser. ```bash -$ stackit auth login +stackit auth login ``` ### Activate a service account @@ -84,7 +84,7 @@ $ stackit auth login To authenticate using a service account, run: ```bash -$ stackit auth activate-service-account +stackit auth activate-service-account ``` For more details on how to setup authentication using a service account, check our [authentication guide](./AUTHENTICATION.md). @@ -94,19 +94,19 @@ For more details on how to setup authentication using a service account, check o You can configure the CLI using the command: ```bash -$ stackit config +stackit config ``` The configurations are stored in `~/stackit/cli-config.json` and are valid for all commands. For example, you can set a default `project-id` by running: ```bash -$ stackit config set --project-id xxxx-xxxx-xxxxx +stackit config set --project-id xxxx-xxxx-xxxxx ``` To remove it, you can run: ```bash -$ stackit config unset --project-id +stackit config unset --project-id ``` Run the `config set` command with the flag `--help` to get a list of all of the available configuration options. @@ -114,7 +114,7 @@ Run the `config set` command with the flag `--help` to get a list of all of the You can lookup your current configuration by checking the configuration file or by running: ```bash -$ stackit config list +stackit config list ``` You can also edit the configuration file manually.