Skip to content
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
44 changes: 28 additions & 16 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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
Comment thread
joaopalet marked this conversation as resolved.
```

To use the application from the root of the repository, you can run:

```bash
$ ./bin/stackit <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
./bin/stackit <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
```

3. Skip building and run the Go application directly using:

```bash
$ go run . <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
go run . <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
```

### 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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ 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

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).
Expand All @@ -94,27 +94,27 @@ 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.

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.
Expand Down