github.com/avahowell/sia@v0.5.1-beta.0.20160524050156-83dcc3d37c94/siac/README.md (about)

     1  Siac Usage
     2  ==========
     3  
     4  `siac` is the command line interface to Sia, for use by power users and
     5  those on headless servers. It comes as a part of the command line
     6  package, and can be run as `./siac` from the same folder, or just by
     7  calling `siac` if you move the binary into your path.
     8  
     9  Most of the following commands have online help. For example, executing
    10  `siac wallet send help` will list the arguments for that command,
    11  while `siac host help` will list the commands that can be called
    12  pertaining to hosting. `siac help` will list all of the top level
    13  command groups that can be used.
    14  
    15  You can change the address of where siad is pointing using the `-a`
    16  flag. For example, `siac -a :9000 status` will display the status of
    17  the siad instance launched on the local machine with `siad -a :9000`.
    18  
    19  Common tasks
    20  ------------
    21  * `siac status` view block height
    22  
    23  Wallet:
    24  * `siac wallet init [-p]` initilize a wallet
    25  * `siac wallet unlock` unlock a wallet
    26  * `siac wallet status` retrieve wallet balance
    27  * `siac wallet address` get a wallet address
    28  * `siac wallet send [amount] [dest]` sends siacoin to an address
    29  
    30  Renter:
    31  * `siac renter list` list all renter files
    32  * `siac renter upload [filepath] [nickname]` upload a file
    33  * `siac renter download [nickname] [filepath]` download a file
    34  * `siac renter share [nickname] [filepath]` create a .sia file
    35  * `siac renter load [filepath]` load a .sia file
    36  
    37  
    38  Full Descriptions
    39  -----------------
    40  
    41  #### Wallet tasks
    42  
    43  * `siac wallet init [-p]` encrypts and initializes the wallet. If the
    44  `-p` flag is provided, an encryption password is requested from the
    45  user. Otherwise the initial seed is used as the encryption
    46  password. The wallet must be initialized and unlocked before any
    47  actions can be performed on the wallet.
    48  
    49  Examples:
    50  ```bash
    51  user@hostname:~$ siac -a :9920 wallet init
    52  Seed is:
    53   cider sailor incur sober feast unhappy mundane sadness hinder aglow imitate amaze duties arrow gigantic uttered inflamed girth myriad jittery hexagon nail lush reef sushi pastry southern inkling acquire
    54  
    55  Wallet encrypted with password: cider sailor incur sober feast unhappy mundane sadness hinder aglow imitate amaze duties arrow gigantic uttered inflamed girth myriad jittery hexagon nail lush reef sushi pastry southern inkling acquire
    56  ```
    57  
    58  ```bash
    59  user@hostname:~$ siac -a :9920 wallet init -p
    60  Wallet password:
    61  Seed is:
    62   potato haunted fuming lordship library vane fever powder zippers fabrics dexterity hoisting emails pebbles each vampire rockets irony summon sailor lemon vipers foxes oneself glide cylinder vehicle mews acoustic
    63  
    64  Wallet encrypted with given password
    65  ```
    66  
    67  * `siac wallet unlock` prompts the user for the encryption password
    68  to the wallet, supplied by the `init` command. The wallet must be
    69  initialized and unlocked before any actions can take place.
    70  
    71  * `siac wallet status` prints information about your wallet.
    72  
    73  Example:
    74  ```bash
    75  user@hostname:~$ siac wallet status
    76  Wallet status:
    77  Encrypted, Unlocked
    78  Confirmed Balance:   61516458.00 SC
    79  Unconfirmed Balance: 64516461.00 SC
    80  Exact:               61516457999999999999999999999999 H
    81  ```
    82  
    83  * `siac wallet address` returns a never seen before address for sending
    84  siacoins to.
    85  
    86  * `siac wallet send [amount] [dest]` Sends `amount` siacoins to
    87  `dest`. `amount` is in the form XXXXUU where an X is a number and U is
    88  a unit, for example MS, S, mS, ps, etc. If no unit is given hastings
    89  is assumed. `dest` must be a valid siacoin address.
    90  
    91  * `siac wallet lock` locks a wallet. After calling, the wallet must be unlocked
    92  using the encryption password in order to use it further
    93  
    94  * `siac wallet seeds` returns the list of secret seeds in use by the
    95  wallet. These can be used to regenerate the wallet
    96  
    97  * `siac wallet addseed` prompts the user for his encryption password,
    98  as well as a new secret seed. The wallet will then incorporate this
    99  seed into itself. This can be used for wallet recovery and merging.
   100  
   101  #### Host tasks
   102  * `host config [setting] [value]`
   103  
   104  is used to configure hosting.
   105  
   106  | Setting      | Value                                            |
   107  | ------------ | ------------------------------------------------ |
   108  | totalstorage | The total size you will be hosting from in bytes |
   109  | minfilesize  | The minimum file size you can host in bytes      |
   110  | maxfilesize  | The maximum file size you can host in bytes      |
   111  | minduration  | The smallest duration you can host for in blocks |
   112  | maxduration  | The largest duration you can host for in blocks  |
   113  | price        | Number of Siacoins per Gigabyte per month.       |
   114  
   115  You can call this many times to configure you host before
   116  announcing. Alternatively, you can manually adjust these parameters
   117  inside the `host/config.json` file.
   118  
   119  * `siac host announce` makes an host announcement. You may optionally
   120  supply a specific address to be announced; this allows you to announce a domain
   121  name. Announcing a second time after changing settings is not necessary, as the
   122  announcement only contains enough information to reach your host.
   123  
   124  * `siac host status` outputs some of your hosting settings.
   125  
   126  Example:
   127  ```bash
   128  user@hostname:~$ siac host status
   129  Host settings:
   130  Storage:      2.0000 TB (1.524 GB used)
   131  Price:        0.000 SC per GB per month
   132  Collateral:   0
   133  Max Filesize: 10000000000
   134  Max Duration: 8640
   135  Contracts:    32
   136  ```
   137  
   138  * `siac host hostdb` prints a list of all the know active hosts on the
   139  network. It can also be called through `siac hostdb`
   140  
   141  #### Renter tasks
   142  * `siac renter upload [filename] [nickname]` uploads a file to the sia
   143  network. `filename` is the path to the file you want to upload, and
   144  nickname is what you will use to refer to that file in the
   145  network. For example, it is common to have the nickname be the same as
   146  the filename.
   147  
   148  * `siac renter list` displays a list of the your uploaded files
   149  currently on the sia network by nickname, and their filesizes.
   150  
   151  * `siac renter download [nickname] [destination]` downloads a file
   152  from the sia network onto your computer. `nickname` is the name used
   153  to refer to your file in the sia network, and `destination` is the
   154  path to where the file will be. If a file already exists there, it
   155  will be overwritten.
   156  
   157  * `siac renter rename [nickname] [newname]` changes the nickname of a
   158    file.
   159  
   160  * `siac renter share [nickname] [filepath]` writes a .sia file
   161  pointing to the file specified by `nickname` on the network. The file
   162  is written to `filepath`. Note that the `.sia` extension will not be
   163  automatically added, and must be part of the path.
   164  
   165  * `siac renter shareascii [nickname]` writes the .sia file specified
   166    by `nickname` to stdout base64 encoded.
   167  
   168  * `siac renter load [filename]` parses the .sia file at `filename` and
   169  adds it to the renters collection of files, so that it can be
   170  downloaded.
   171  
   172  * `siac renter loadascii [data]` parses the siafile passed as an
   173  argument and adds it to your collection of files for download. Data
   174  will be a very large field.
   175  
   176  * `siac renter delete [nickname]` removes a file from your list of
   177  stored files. This does not remove it from the network, but only from
   178  your saved list.
   179  
   180  * `siac renter queue` shows the download queue. This is only relevant
   181  if you have multiple downloads happening simultaneously.
   182  
   183  #### Gateway tasks
   184  * `siac gateway add [address:port]` manually adds a peer to your list
   185  of connected clients
   186  
   187  * `siac gateway remove [address:port]` manually removes a peer from
   188  your list of connected peers
   189  
   190  * `siac gateway status` prints a list of all the peers you are
   191  connected to
   192  
   193  #### Miner tasks
   194  * `siac miner status` returns information about the miner. It is only
   195  valid for when siad is running.
   196  
   197  * `siac miner start` starts running the CPU miner on one thread. This
   198  is virtually useless outside of debugging.
   199  
   200  * `siac miner stop` halts the CPU miner.
   201  
   202  #### General commands
   203  * `siac status` prints the current block ID, current block height, and
   204  current target.
   205  
   206  * `siac stop` sends the stop signal to siad to safely terminate. This
   207  has the same affect as C^c on the terminal.
   208  
   209  * `siac version` displays the version string of siac.
   210  
   211  * `siac update` checks the server for updates.