Swisstronik Docs
  • 🇨🇭About Swisstronik
    • What is Swisstronik?
    • Swisstronik vs Ethereum
    • Useful links
  • 🌐General
    • Intel SGX
    • Governance
      • On-Chain Proposal
      • Formatting a Proposal
      • Submitting a Proposal
      • Governable Parameters
    • Community Pool
    • Accounts
    • Transactions
    • Gas and Fees
    • Coin & Tokens
  • ⚒️Development
    • Endpoints
    • Connect wallets
      • MetaMask (EVM) - Manual
      • Keplr (Cosmos)
      • Testnet Metamask (EVM) - Chainlist
      • Testnet MetaMask (EVM) - Manual
      • Testnet Keplr (Cosmos)
    • Get test coins
    • SwisstronikJS SDK
      • SwisstronikJS Functions
      • Swisstronik & Ethereum transactions
      • Transaction - code sample
      • Swisstronik & Ethereum calls
      • Call - code sample
    • Swisstronik CLI
      • Installation
      • Configuration
      • Key management
      • Queries
      • Sending SWTR
      • For SDI Issuers
    • Guides
      • Contract deployment - Hardhat
        • 1. Setting up the Hardhat environment
        • 2. Configure hardhat.config.js
        • 3. Write and compile the smart contract
        • 4. Deploy the smart contract
        • 5. Interact with the contract - Transaction
        • 6. Interact with the contract - Call
      • Contract deployment - Remix IDE
      • Deployment & Interaction PERC-20
        • ERC-20 & PERC-20
        • Sample PERC20 contract
        • Deployment & Interaction with contract
        • How to use encryption
      • Contract verification
      • SDI for dapp developers
    • Local testnet
    • Web3JS, Ethers, Viem and other third-party libraries
  • 🖥️Node setup
    • Setup SGX
      • Supported Hardware
      • Setup Intel SGX
    • Setup node
      • Mainnet
        • v1.0.1 Upgrade
      • Testnet
        • Install from .deb package
        • Configure node
        • Upgrade your testnet node
          • Swisstronik v3 Testnet
          • Swisstronik v4 Testnet
          • Swisstronik v5 Testnet
          • Swisstronik v5.1 Testnet
          • Swisstronik v6 Testnet
          • Swisstronik v7 Testnet
          • Swisstronik v8 Testnet
        • Seed Node
        • Live Peers
        • Genesis Mirror Download
    • CLI Cheatsheet
  • 🤝Delegators
    • What is a delegator?
    • Delegator Guide (CLI)
    • Delegators Security
Powered by GitBook
On this page
  • Linux
  • MacOS
  • Windows
  1. Development
  2. Swisstronik CLI

Installation

PreviousSwisstronik CLINextConfiguration

Last updated 10 months ago

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

You can download binaries for each platform from .

Platform
Binary name

Linux

MacOS (Intel chip)

MacOS (M1 chip)

Windows

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 .

⚒️
GitHub releases page
Linux
swisstronikcli-linux-amd64
swisstronikcli-macos-amd64
swisstronikcli-macos-arm64
swisstronikcli-windows