# Installation

{% hint style="info" %}
To download `swisstronikcli` from GitHub Actions, you should log in to your GitHub account.
{% endhint %}

You can download binaries for each platform from [GitHub releases page](https://github.com/SigmaGmbH/swisstronik-chain/releases).&#x20;

| Platform           | Binary name                                                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| Linux              | [swisstronikcli-linux-amd64](https://github.com/SigmaGmbH/swisstronik-chain/releases/download/v1.0.1/swisstronikcli-linux-amd64)     |
| MacOS (Intel chip) | [swisstronikcli-macos-amd64](https://github.com/SigmaGmbH/swisstronik-chain/releases/download/v1.0.1/swisstronikcli-macos-amd64.zip) |
| MacOS (M1 chip)    | [swisstronikcli-macos-arm64](https://github.com/SigmaGmbH/swisstronik-chain/releases/download/v1.0.1/swisstronikcli-macos-arm64.zip) |
| Windows            | [swisstronikcli-windows](https://github.com/SigmaGmbH/swisstronik-chain/releases/download/v1.0.1/swisstronikcli-windows.zip)         |

After downloading the appropriate binary, extract it from .zip archive and make it executable.

### Linux

Rename `swisstronikcli-linux-amd64` to `swisstronikcli` using following command:

```bash
mv swisstronikcli-linux-amd64 swisstronikcli
```

Then make it executable:

```bash
chmod +x swisstronikcli
```

Now you can check if everything went fine:

```bash
./swisstronikcli
```

The command above will output a list of accessible commands and flags:

```
Usage:
  swisstronikcli [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Create or query an application CLI configuration file
  debug       Commands for debug
  help        Help about any command
  keys        Manage your application's keys
  query       Querying subcommands
  status      Query remote node for status
  tx          Transactions subcommands

Flags:
  -b, --broadcast-mode string    Transaction broadcasting mode (sync|async|block) (default "sync")
      --chain-id string          Specify Chain ID for sending Tx (default "swisstronik")
      --fees string              Fees to pay along with transaction; eg: 10uswtr
      --from string              Name or address of private key with which to sign
      --gas-adjustment float     adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored  (default 1)
      --gas-prices string        Gas prices to determine the transaction fee (e.g. 10uswtr)
  -h, --help                     help for swisstronikcli
      --home string              directory for config and data (default "/Users/voldyrvovka/.swisstronik")
      --keyring-backend string   Select keyring's backend (default "test")
      --log_format string        The logging format (json|plain) (default "plain")
      --log_level string         The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --node string              <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
      --trace                    print out full stack trace on errors

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

**OPTIONAL**: To make `swisstronikcli` accessible anywhere, use the following command:

```bash
mv swisstronikcli /usr/local/bin/swisstronikcli
```

### MacOS

{% hint style="info" %}
Please ensure, that you have installed the appropriate binary.
{% endhint %}

Rename extracted binary to `swisstronikcli` using one of following commands:

```bash
mv swisstronikcli-macos-amd64 swisstronikcli # For MacOS with Intel chip
```

```bash
mv swisstronikcli-macos-arm64 swisstronikcli # For MacOS with M1 chip
```

Then make it executable:

```bash
chmod +x swisstronikcli
```

Now you can check if everything went fine using the following:

```bash
./swisstronikcli
```

MacOS may report that it is unable to check`swisstronikcli`:

<figure><img src="/files/4WQ99OZF8IojwqF39rg9" alt=""><figcaption></figcaption></figure>

To resolve this, click on `swisstronikcli` file and open the context menu. Select "**Open**", and MacOS will prompt you whether you want to open this file. Click "**Open**", after that MacOS will no longer attempt to check this file.

The command above will output a list of accessible commands and flags:

```
Usage:
  swisstronikcli [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Create or query an application CLI configuration file
  debug       Commands for debug
  help        Help about any command
  keys        Manage your application's keys
  query       Querying subcommands
  status      Query remote node for status
  tx          Transactions subcommands

Flags:
  -b, --broadcast-mode string    Transaction broadcasting mode (sync|async|block) (default "sync")
      --chain-id string          Specify Chain ID for sending Tx (default "swisstronik")
      --fees string              Fees to pay along with transaction; eg: 10uswtr
      --from string              Name or address of private key with which to sign
      --gas-adjustment float     adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored  (default 1)
      --gas-prices string        Gas prices to determine the transaction fee (e.g. 10uswtr)
  -h, --help                     help for swisstronikcli
      --home string              directory for config and data (default "/Users/voldyrvovka/.swisstronik")
      --keyring-backend string   Select keyring's backend (default "test")
      --log_format string        The logging format (json|plain) (default "plain")
      --log_level string         The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --node string              <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
      --trace                    print out full stack trace on errors

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

**OPTIONAL**: To make `swisstronikcli` accessible anywhere, use the following command:

```bash
mv swisstronikcli /usr/local/bin/swisstronikcli
```

### Windows

#### Native

After extraction, you should find `swisstronikcli-windows` file. You can use it by running the following command in the directory containing this file:

```powershell
./swisstronikcli-windows
```

You should see output with list of commands and flags

**OPTIONAL**: To make `swisstronikcli` accessible anywhere, use the following command in the Powershell terminal within the directory containing `swisstronikcli-windows`:

```powershell
mkdir "$home\appdata\local\swisstronikcli"
mv swisstronikcli-windows "$home/appdata/local/swisstronikcli/swisstronikcli.exe"
$prev_path = [Environment]::GetEnvironmentVariable('path', 'user');
$updated_path = $prev_path + ';' + "$home\appdata\local\swisstronikcli"
[Environment]::SetEnvironmentVariable('path', $updated_path, 'User');
```

Restart your terminal and check if it was installed correctly by using the following command:

```powershell
swisstronikcli
```

#### Windows Subsystem for Linux

`swisstronikcli-linux-amd64` is compatible with Windows Subsystem for Linux (WSL), allowing you to follow the instructions intended for [Linux](#linux).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swisstronik.com/swisstronik-docs/development/swisstronik-cli/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
