Installation

To download swisstronikcli from GitHub Actions, you should log in to your GitHub account.

You can download binaries for each platform from GitHub releases page.

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

Linux

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

mv swisstronikcli-linux-amd64 swisstronikcli

Then make it executable:

chmod +x swisstronikcli

Now you can check if everything went fine:

./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:

mv swisstronikcli /usr/local/bin/swisstronikcli

MacOS

Please ensure, that you have installed the appropriate binary.

Rename extracted binary to swisstronikcli using one of following commands:

mv swisstronikcli-macos-amd64 swisstronikcli # For MacOS with Intel chip
mv swisstronikcli-macos-arm64 swisstronikcli # For MacOS with M1 chip

Then make it executable:

chmod +x swisstronikcli

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

./swisstronikcli

MacOS may report that it is unable to checkswisstronikcli:

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:

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:

./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:

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:

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.

Last updated