Sia Commands in 1.4.0

These commands are for version 1.4.0 of Sia.

If you’re comfortable with the command-line, you can interact with Sia in powerful ways. This is a list of all the commands that Sia understands, and a brief description of what they do.

These can be accessed at any time by using siac help.

All commands start with siac and are followed by a flag or a command.

Usage

siac [flags]

siac [command]

You can also use the Terminal in Sia-UI. When doing so, you can type commands without adding siac.

Consensus

Print the current state of consensus such as current block, block height, and target.

Usage

siac consensus [flags]

Flags

-h or --help - help for consensus

-v or --verbose - Display full consensus information

Example output

Synced: Yes

Block:      00000000000000009e74c12f68393e108e3d7d2faad15b46c8a76dd42015fb58

Height:     211104

Target:     [0 0 0 0 0 0 0 9 143 142 0 142 95 25 215 124 32 25 172 35 130 182 56 62 38 203 72 1 134 122 250 161]

Difficulty: 1929422247688414200

Gateway

View and manage the gateway's connected peers.

Usage

siac gateway [flags] or siac gateway [command]

Flags

-h or --help - help for gateway

Example output

Address: 73.195.240.187:9981 (this is the address of your Sia node)

Active peers: 8

Help

Help about any command.

Usage

siac [flags] or siac [command]

Example output

Sia Client v1.4.0

Usage:

  siac [flags]

  siac [command]

Available Commands

  consensus   Print the current state of consensus

  gateway     Perform gateway actions

  help        Help about any command

  host        Perform host actions

  hostdb      Interact with the renter's host database.

  miner       Perform miner actions

  renter      Perform renter actions

  stop        Stop the Sia daemon

  update      Update Sia

  utils       various utilities for working with Sia's types

  version     Print version information

  wallet      Perform wallet actions

Host

View or modify host settings.

Usage

siac host [flags] or siac host [command]

Available Commands

  announce    Announce yourself as a host

  config      Modify host settings

  contracts   Show host contracts

  folder      Add, remove, or resize a storage folder

  sector      Add or delete a sector (add not supported)

Flags

-h or --help - help for host

-v or --verbose - Display detailed host info

Hostdb

View the list of active hosts, the list of all hosts, or query specific hosts. If the '-v' flag is set, a list of recent scans will be provided, with the most recent scan on the right. a '0' indicates that the host was offline, and a ‘1' indicates that the host was online.

Usage

siac hostdb [flags] or siac hostdb [command]

Available Commands

  view        View the full information for a host.

Flags

-h or --help - help for host

-v or --verbose - Display detailed host info

-n, or --numhosts int - Number of hosts to display from the hostdb

Miner

Perform miner actions and view miner status.

Usage

siac miner [flags] or siac miner [command]

Available Commands

  start       Start cpu mining

  stop        Stop mining

Flags

-h or --help - help for miner

Renter

Perform renter actions - upload, download, rename, delete, load, or share files.

Usage

siac renter [flags] or siac renter [command]

Available Commands

  allowance            View the current allowance

  contracts            View the Renter's contracts

  createbackup         Create a backup of the renter's siafiles

  delete               Delete a file

  download             Download a file

  downloads            View the download queue

  export               export renter data to various formats

  list                 List the status of all files

  loadbackup           Load a backup of the renter's siafiles

  prices               Display the price of storage and bandwidth

  recoveryscanprogress Returns the recovery scan progress.

  rename               Rename a file

  setallowance         Set the allowance

  triggerrecoveryscan  Triggers a recovery scan.

  upload               Upload a file or folder

  uploads              View the upload queue

Flags

-h or --help - help for renter

-v or --verbose - Display detailed renter info

Stop

Stop the Sia daemon.

Usage

siac stop [flags]

Flags

-h or --help - help for stop

Update

Check for (and/or download) available updates for Sia.

Usage

siac update [flags] or siac update [command]

Available Commands

  check       Check for available updates

Flags

-h or --help - help for update

Utils

Various utilities for working with Sia's types. These commands do not require siad.

Usage

siac utils [command]

Available Commands

  bash-completion Creates bash completion file.

  checksig        verify a signature of the specified hash

  decoderawtxn    convert a base64-encoded transaction to JSON

  encoderawtxn    convert a JSON-encoded transaction to base64

  hastings        convert a currency amount to Hastings

  man-generation  Creates unix style manpages.

  sighash         calculate the SigHash of a transaction

  verify-seed     verify seed is formatted correctly

Flags

-h or --help - help for utils

Version

Print version information.

Usage

siac version [flags]

Flags

-h or --help - help for version

Example output

Sia Client

Version 1.4.0

Git Revision 0e2bb7053

Build Time   Sun Mar 31 13:09:34 EDT 2019

Sia Daemon

Version 1.4.0

Git Revision 0e2bb7053

Build Time   Sun Mar 31 13:09:34 EDT 2019

Wallet

Perform wallet actions - generate a new address, send coins to another wallet, or view info about the wallet.

Usage

siac wallet [flags] or siac wallet [command]

Available Commands

  address         Get a new wallet address

  addresses       List all addresses

  balance         View wallet balance

  broadcast       Broadcast a transaction

  change-password Change the wallet password

  init            Initialize and encrypt a new wallet

  init-seed       Initialize and encrypt a new wallet using a pre-existing seed

  load            Load a wallet seed, v0.3.3.x wallet, or siag keyset

  lock            Lock the wallet

  seeds           View information about your seeds

  send            Send either siacoins or siafunds to an address

  sign            Sign a transaction

  sweep           Sweep siacoins and siafunds from a seed.

  transactions    View transactions

  unlock          Unlock the wallet

Flags

-h or --help - help for wallet

Units

The smallest unit of siacoins is the hasting. One siacoin is 10^24 hastings. Other supported units are:

  pS (pico,  10^-12 SC)

  nS (nano,  10^-9 SC)

  uS (micro, 10^-6 SC)

  mS (milli, 10^-3 SC)

  SC

  KS (kilo, 10^3 SC)

  MS (mega, 10^6 SC)

  GS (giga, 10^9 SC)

  TS (tera, 10^12 SC)

Global flags

  -a, --addr string            which host/port to communicate with (i.e. the host/port siad is listening on) (default "localhost:9980")

      --apipassword string     the password for the API's http authentication

  -h, --help                   help for siac

  -d, --sia-directory string   location of the sia directory (default "/Users/steve/Library/Application Support/Sia")

      --useragent string       the useragent used by siac to connect to the daemon's API (default "Sia-Agent")a


How did we do?