|
| 1 | +# Setup |
| 2 | + |
| 3 | +## Download and Run |
| 4 | + |
| 5 | +Download the latest release [here][cli-releases] and extract it to your |
| 6 | +favorite application folder. |
| 7 | + |
| 8 | +:::info |
| 9 | + |
| 10 | +Oasis is currently providing official builds for x86 Linux only. If you want |
| 11 | +to run it on another platform, you will have to [build it from source][cli-source]. |
| 12 | + |
| 13 | +::: |
| 14 | + |
| 15 | +:::info |
| 16 | + |
| 17 | +We suggest that you update your system path to include a directory containing |
| 18 | +`oasis` binary or create a symbolic link to `oasis` in your |
| 19 | +system path, so you can access it globally. |
| 20 | + |
| 21 | +::: |
| 22 | + |
| 23 | +Run the Oasis CLI by typing `oasis`: |
| 24 | + |
| 25 | +``` |
| 26 | +$ oasis |
| 27 | +CLI for interacting with the Oasis network |
| 28 | +
|
| 29 | +Usage: |
| 30 | + oasis [command] |
| 31 | +
|
| 32 | +Available Commands: |
| 33 | + accounts Account operations |
| 34 | + addressbook Manage addresses in the local address book |
| 35 | + completion Generate the autocompletion script for the specified shell |
| 36 | + contracts WebAssembly smart contracts operations |
| 37 | + help Help about any command |
| 38 | + inspect Inspect the network |
| 39 | + network Manage network endpoints |
| 40 | + paratime Manage paratimes |
| 41 | + registry Registry operations |
| 42 | + tx Raw transaction operations |
| 43 | + wallet Manage accounts in the local wallet |
| 44 | +
|
| 45 | +Flags: |
| 46 | + --config string config file to use |
| 47 | + -h, --help help for oasis |
| 48 | + -v, --version version for oasis |
| 49 | +
|
| 50 | +Use "oasis [command] --help" for more information about a command. |
| 51 | +``` |
| 52 | + |
| 53 | +When running Oasis CLI for the first time, it will generate a configuration |
| 54 | +file and populate it with the current Mainnet and Testnet networks. It will also |
| 55 | +configure all [Oasis-supported ParaTimes][paratimes]. |
| 56 | + |
| 57 | +## Configuration |
| 58 | + |
| 59 | +The configuration folder of Oasis CLI is located: |
| 60 | + |
| 61 | +- on Windows: |
| 62 | + - `%USERPROFILE%\AppData\Roaming\Oasis\` |
| 63 | +- on macOS: |
| 64 | + - `/Users/$USER/Library/Application Support/Oasis/` |
| 65 | +- on Linux: |
| 66 | + - `$HOME/.config/oasis/` |
| 67 | + |
| 68 | +There, you will find `cli.toml` which contains configuration of the networks, |
| 69 | +ParaTimes and your wallet. Additionally, each file-based account in your wallet |
| 70 | +will have a separate, password-encrypted `.toml` file in the same folder named |
| 71 | +after the name of the account and `.wallet` extension. |
| 72 | + |
| 73 | +You can have multiple profiles of your wallet. To use a different profile, pass |
| 74 | +`--config` parameter pointing to a specific `cli.toml` file. |
| 75 | + |
| 76 | +``` |
| 77 | +$ oasis wallet create myaccount |
| 78 | +$ oasis wallet list |
| 79 | +ACCOUNT KIND ADDRESS |
| 80 | +myaccount file (ed25519-adr8:0) oasis1qq59js97ytn2xcnscyx9n25z5y4dc6z6qcqsydyr |
| 81 | +$ mv ~/.config/oasis ~/.config/oasis_work |
| 82 | +$ oasis wallet list |
| 83 | +ACCOUNT KIND ADDRESS |
| 84 | +$ oasis wallet list --config ~/.config/oasis_work/cli.toml |
| 85 | +ACCOUNT KIND ADDRESS |
| 86 | +myaccount file (ed25519-adr8:0) oasis1qq59js97ytn2xcnscyx9n25z5y4dc6z6qcqsydyr |
| 87 | +``` |
| 88 | + |
| 89 | +## Backing up your wallet |
| 90 | + |
| 91 | +To back up your wallet, simply archive the folder containing `cli.toml` and |
| 92 | +`.wallet` files. |
| 93 | + |
| 94 | +[cli-releases]: https://github.com/oasisprotocol/cli/releases |
| 95 | +[cli-source]: https://github.com/oasisprotocol/cli |
| 96 | +[paratimes]: ../../../dapp/README.mdx |
0 commit comments